wxPython Static Box
In this article we are going to learn about Static Box in wxPython. A static box is a rectangle drawn around other windows to denote a logical grouping of items.
Note that while the previous versions required that windows appearing inside a static box be created as its siblings (i.e. use the same parent as the static box itself), since wxWidgets 2.9.1 it is also possible to create them as children of wx.StaticBox itself and you are actually encouraged to do it like this if compatibility with the previous versions is not important.
Syntax: wx.StaticBox.StaticBox((parent, id=ID_ANY, label=””, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBoxNameStr)
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
Parameter Input Type Description parent wx.Window Parent window. Must not be None. id wx.WindowID Window identifier. The value wx.ID_ANY indicates a default value. label string Text to be displayed in the static box, the empty string for no label. pos wx.Point Window position. If wx.DefaultPosition is specified then a default position is chosen. size wx.Size Checkbox size. If wx.DefaultSize is specified then a default size is chosen. style long Window style. There are no StaticBox-specific styles, but generic ALIGN_LEFT, ALIGN_CENTRE_HORIZONTAL and ALIGN_RIGHT can be used here to change the position of the static box label when using wxGTK name string Window name