![]() |
|
#1
|
||||
|
||||
[FLTK] Howto refresh a widget immediatelyI have a small program, where the I do a somewhat lengthy process from FLTK. I wanted to be able to track the status of this process in my dialog, so I added an Fl_Output widget where I can drop the status at certain points, such as:
CPP / C++ / C Code:
This works fine, except that it does not "refresh" the screen until my entire process is completed. Is there a way that I can make FLTK refresh the widget immediately when I change it? __________________
The best damn Sports Blog period. |
|
#2
|
||||
|
||||
|
I got two equally good answers to this problem. The first is to set the widget damage to 1, like:
CPP / C++ / C Code:
This immediately redraws the widget. The second is to call Fl::check(), which checks everything to make sure that a redraw is not needed everywhere. CPP / C++ / C Code:
Both worked equally well as far as I could tell. I choose to use the first, because it seems to be more efficient, as it only checks the applicable widget. However, I could not perceive a performance difference in either of these methods. __________________
The best damn Sports Blog period. |
|
#3
|
||||
|
||||
|
Okay, I jumped the gun a bit. Setting damage to 1 does not seem to work. So the only valid answer I have is:
CPP / C++ / C Code:
Sorry... But this does seem to work __________________
The best damn Sports Blog period. |
|
#4
|
||||
|
||||
|
and Yet One Question - how to refresh it in fltk2.0?
|
|
#5
|
|||
|
|||
|
Quote:
I can not try but it sounds like it should do it. Regards Mark |
|
#6
|
||||
|
||||
|
Quote:
fltk::check(); //too log_b->damage();//too log_b->redraw();//too in any combination... |
|
#7
|
||||
|
||||
|
Oh you are kidding! This doesn't work under 2.0? I am going to have to download the cvs to play with, but it amazes me that this is not carried through...
__________________
The best damn Sports Blog period. |
|
#8
|
||||
|
||||
|
Quote:
CPP / C++ / C Code:
|
|
#9
|
|||
|
|||
|
Quote:
You propably want to do: CPP / C++ / C Code:
|
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The