Open emersonrp opened 3 months ago
The relevant section seems to be in etg\statbox.py
:
# TODO: The window-label ctor is only available on MSW and GTK so disable
# for now. Maybe replace it with a factory function that returns None on
# OSX??
c.find('wxStaticBox').findOverload('wxWindow *label').ignore()
# "unfix" the 2nd ctor and Create method so the required parameter lists
# are different enough for them to be overloaded.
#for name in ['wxStaticBox', 'Create']:
# m = c.find(name).findOverload('wxWindow *label')
# m.find('id').default = ''
And in e.g. ext\wxWidgets\include\wx\msw\statbox.h
// Indicate that we have the ctor overload taking wxWindow as label.
#define wxHAS_WINDOW_LABEL_IN_STATIC_BOX
wxWidgets' C++ implementation has an overloaded constructor that allows building a StaticBox with a wxWindow object substituted for the default text label. This allows for adding, for instance, a checkbox that might be used to enable/disable the controls within the StaticBox. It would be extremely shiny if wxPython exposed / supported this functionality.
https://docs.wxwidgets.org/latest/classwx_static_box.html#aedd6c9352e976dcc55e8112143cca6f7