|
|
On 1/26/22 16:49 Apprentice wrote:
The solution I could find to close the window was like this.
Of course if someone has a better solution, thank you too!
BtExit->callback([](Fl_Widget *, void
*data) {
((Fl_Window*)data)->hide();
}, (void*)WinInformations);
If you add more and more code to your lambda _expression_ it seems to
become easier to add a static callback...
That said, if you want to close the window that contains the BtExit
button you don't need to "send" the window in the data pointer, you
can also use the window() method on the exit button which is always
in the Fl_Widget pointer, something like
BtExit->callback([](Fl_Widget *button,
void *) {
button->window()->hide();
};
should work (untested).
--
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/2b0d1e01-aa14-f02b-e2b5-368f7bbffa08%40online.de.
[ Direct Link to Message ] | |
|
| |