|
|
Thanks for the tip. I'll see if I can create the command using `Fl::add_timeout()` I'll read about it now.
My idea is also to have a window just from msg that appears for about 3 seconds and close alone, she will not have a button, only msg!
Em quarta-feira, 26 de janeiro de 2022 às 11:15:20 UTC-3, Matthias Melcher escreveu:
`sleep(100)` will not work. The correct version would be to pop open your window and return to the main call, and then react to events as they happen later. If you want the window to close after a certain time, even if the user did not click a button, you can create a timed callback with `Fl::add_timeout()`, but you must make sure to remove the timeout if the user closes the window in the conventional way.
It's not good style, but you can also busy-wait until the dialog is closed, something like:
`while (myWindow->visible()) Fl::wait();`
--
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/956a522c-22e4-4ea3-9f2d-95063c95244fn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |