What is the best way to do this?
local win = Window(My Window
-- widget creation
before starting the event loop opens max but the widgets retain the original size. C creating the widgets after maximize allow the widget to know the windows maximized size, but opens the window in its regular state (not maximized) but with the widgets are sized appropriately for a maximized window.
How do I open a window maximized but have properly sized widgets? Resizing all the widgets in the handler for the windows onResize event should work but is error-prone and tedious for large numbers of widgets.
Access to the windows maximized size without calling maximize(), or even knowing the user's screen size would solve this neatly. In Python this is easy, as widgets have relative as well as absolute positions.
Another possibility is to have widgets that can automatically resize when the container resizes (whether or not this happens for a given widget would be user-selectable in the Widget constructors). This would be tedious for you to code, however, with needing to rewrite every widget.
Is there a technique I'm missing? Is anything other than resizing everything in the window's onResize event possible?