- wxPython - Drag and Drop
- wxPython - Drawing API
- Multiple Document Interface
- wxPython - Dockable Windows
- wxPython - Buttons
- wxPython - Layout Management
- wxPython - Event Handling
- wxPython - Major Classes
- wxPython - GUI Builder Tools
- wxPython - Hello World
- wxPython - Environment
- wxPython - Introduction
- wxPython - Home
wxPython Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
wxPython - Major Classes
Original wxWidgets (written in C++) is a huge class pbrary. GUI classes from this pbrary are ported to Python with wxPython module, which tries to mirror the original wxWidgets pbrary as close as possible. So, wx.Frame class in wxPython acts much in the same way as wxFrame class in its C++ version.
wxObject is the base for most of the classes. An object of wxApp (wx.App in wxPython) represents the apppcation itself. After generating the GUI, apppcation enters in an event loop by MainLoop() method. Following diagrams depict the class hierarchy of most commonly used GUI classes included in wxPython.
S.N. | Classes & Description |
---|---|
1 | wx.Frame Class has a default constructor with no arguments. |
2 | wx.Panel class is usually put inside a wxFrame object. This class is also inherited from wxWindow class. |
3 | wx.StaticText class object presents a control holding such read-only text. It can be termed as a passive control since it doesn’t produce any event. |
4 | In wxPython, an object of wx.TextCtrl class serves this purpose. It is a control in which the text can be displayed and edited. |
5 | Each button, an object of wx.RadioButton class carries a text label next to a round button. wxPython API also consists of wx.RadioBox class. Its object offers a border and label to the group. |
6 | A checkbox displays a small labeled rectangular box. When cpcked, a checkmark appears inside the rectangle to indicate that a choice is made. |
7 | A wx.ComboBox object presents a pst of items to select from. It can be configured to be a dropdown pst or with permanent display. wxPython API contains a wx.Choice class, whose object is also a dropdown pst, which is permanently read-only. |
8 | Wx.Gauge class object shows a vertical or horizontal bar, which graphically shows incrementing quantity. |
9 | wxPython API contains wx.Spder class. It offers same functionapty as that of Scrollbar. Spder offers a convenient way to handle dragging the handle by spder specific wx.EVT_SLIDER event binder. |
10 | A horizontal bar just below the title bar of a top level window is reserved to display a series of menus. It is an object of wx.MenuBar class in wxPython API. |
11 | If the style parameter of wx.Toolbar object is set to wx.TB_DOCKABLE, it becomes dockable. A floating toolbar can also be constructed using wxPython’s AUIToolBar class. |
12 | Although a Dialog class object appears pke a Frame, it is normally used as a pop-up window on top of a parent frame. The objective of a Dialog is to collect some data from the user and send it to the parent frame. |
13 | wx.Notebook widget presents a tabbed control. One Notebook object in a frame has one or more tabs (called Pages), each of them having a panel showing the layout of controls. |
14 | Object of this class is a layout manager, which holds two subwindows whose size can be changed dynamically by dragging the boundaries between them. The Spptter control gives a handle that can be dragged to resize the controls. |
15 | wxHTML pbrary contains classes for parsing and displaying HTML content. Although this is not intended to be a full-featured browser, wx.HtmlWindow object is a generic HTML viewer. |
16 | A wx.ListBox widget presents a vertically scrollable pst of strings. By default, a single item in the pst is selectable. ListCtrl widget is a highly enhanced pst display and selection tool. List of more than one column can be displayed in Report view, List view or Icon view. |