Closed SamSandq closed 2 months ago
Before window_panel(w, panel);
your window is an empty container and window_defbutton()
does nothing, because any button exists in the window. For this reason exists window_defbutton()
and not button_set_default()
. Really in both cases the SDK is working fine.
I accept that it is working, but... having made all the definitions before instantiating the window, it makes sense that the default button declaration/definition also would be taken into account when creating the window.
I believe a note to the effect that the call to window_defbutton(...)
must be made after the window has been created should be added to the documentation.
Added a tip in function documentation: https://nappgui.com/en/gui/window.html#f28
In my code I had the following, where dialogue is an layout with an OK button:
The ok button does not show up as a default button. However, if I write
it works fine.
So the placement does matter. If it isn't a bug, it should be documented.