the wxpython gui library the sampleframe is subclass of the wx frame classit thus inherits all of the functionality of top level frame (windowwithin the __init__(method of the sampleframe the super classes __init__(method is called this is used to set the size of the frame and to give the frame title note that the frame also indicates that it does not have parent window when the panel is created it is necessary to specify the window (or in this case framewithin which it will be displayed this is common pattern within wxpython also note that the setsize method of the panel class also allows the position to be specified and that the colour class is the wxpython colour class widget/control classes although there are very many widgets/controls available to the developerthe most commonly used includewx button/wx togglebutton/wx radiobutton these are widgets that provide button like behaviour within gui wx textctrl this widget allows text to be displayed and edited can be single line or multiple line widget depending upon configuration wx statictext used to display one or more lines of read-only text in many libraries this widgets is known as label wx staticline line used in dialogs to separate groups of widgets the line may be vertical or horizontal wx listbox this widget is used to allow user to select one option from list of options wx menubar/wx menu/wx menuitem the components that can be used to construct set of menus for user interface wx toolbar this widget is used to display bar of buttons and/or other widgets usually placed below the menubar in wx frame the inheritance hierarchy of these widgets is given below note that they all inherit from the class control (hence why they are often referred to as controls as well as widgets or gui components