|
|
On 10/5/22 21:15, roger tunnicliffe wrote:
I have some code as follows:-
void win2_showChart(Fl_Widget *w, void *data)
{
win2_accountNo_callback(win2,&xNull);
for (int k;k<1000000;k++){;}
win2_tabs->hide();
win2_chart->show();
win2->redraw();
}
win2_accountNo_callback sets a new value for FL_Output,
however unless I put in the "timer" to "slow something down ??"
it will not display correctly. I thought that's what
win2->redraw was supposed to do ?
Hmm, you shouldn't have to slow anything down to get a widget to
update.
redraw() schedules that widget (and its children) to redraw when
you return
to the application loop, and redrawing is handled by that, to
ensure the
widgets are drawn in order (parents first, then children).
It looks like you're even telling the parent window to redraw,
which should
redraw everything in that window.
If it's not redrawing properly, possible causes are:
* Child widgets are created outside their parent's xywh
boundaries
* Child widgets are not parented properly, which can happen
if the groups aren't end()ed.
It would in this case help to see more of your code, esp. the
part where you
construct the widgets (win2, win2_tabs, win2_chart, etc), or if
you can replicate by
creating a small, self contained single file that is an easily
buildable application
so we can see what's going on.
Sometimes you can discover the issue yourself in the process of
building
a simplified app, i.e. catch a bug in the construction.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/c8523fca-d91c-02eb-8a11-0d0448766e76%40seriss.com.
[ Direct Link to Message ] | |
|
| |