How to redraw all windows and widgets?

12 views
Skip to first unread message

Gonzalo Garramuno

unread,
Mar 19, 2022, 6:15:07 AM3/19/22
to fltkg...@googlegroups.com
I would like to refresh all windows, groups and widgets so as to change the language of the UI based on a user selection on Fl_Choice. How can I do that? I tried:


void redraw_all_windows()
{
Fl_Window* w = Fl::first_window();
if ( ! w ) return;

for ( ; (w = Fl::next_window(w)); )
{
w->redraw();
}

Fl::check();
}

But that did not work (it seems the redraw event is not propagated down the line).



Gonzalo Garramuno
ggar...@gmail.com




Gonzalo Garramuno

unread,
Mar 19, 2022, 8:04:57 AM3/19/22
to fltkg...@googlegroups.com


> El 19 mar. 2022, a las 07:15, Gonzalo Garramuno <ggar...@gmail.com> escribió:
>
> I would like to refresh all windows, groups and widgets so as to change the language of the UI based on a user selection on Fl_Choice. How can I do that? I tried:

Never mind me. I was not thinking. I need to recreate all widgets and windows in order for gettext() to refresh the views.


Gonzalo Garramuno
ggar...@gmail.com




Reply all
Reply to author
Forward
0 new messages