> Actually I have already spent so much time to configure progress bar of
> FLTK. but i couldn't manage it out.. I just want that when i open any
> file, by reading lines from the file, progress bar will show the
> percentage of completed lines.

OK - you need to give us more info: What fltk version, what host OS, etc.

What you are trying to do souds like it should work easily enough, though...

> but when the file reading loop starts, Fl::check() make time interval i
> think so. progress bar is showing without any problem. but the speed of
> line reading is reduced 100 times may be. I don't know whats wrong with
> it. How can i make a real-time progress bar that works in real-time. real-
> time means if i print out something from a loop, progress bar should show
> the same percentage and timing as cout or printf shows.

Are you updating the GUI for every single line you read from the file? If so, 
you probably do not want to do that - updating the display is "expensive" so 
triggering updates where there's no change the user can even see if pointless, 
but will slow your code down.

Similarly, calling printf/cout is expensive too (though not as slow as updating 
the GUI usually!) so if you are interested in speed you must not put that 
inside the loop either!

For the progress bar case, it probably makes sense to compute the progress 
value, and only update the display widget if the value is substantially changed 
- I usually go for every 3% or so... See if that helps.



SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to