A panel is a subwindow for placing panel items, such as the wxButton and wxText item. Its parent must be a wxFrame. A panel inherits most properties from canvas, except for scrollbar functionality.
Note that a wxDialogBox may be used in a similar way to a panel.
The following event handlers are valid for the panel class:
wxPanel resource
wxPanel create
wxPanel on-command
wxPanel set-button-font
wxPanel set-label-font
wxPanel set-label-position
wxPanel new-line
string resource
The name of the resource the panel or dialog is to be loaded from, if any. Initially the empty string.
void ( create)
Creates a panel.
The following slots may be initialized if not loading from a resource.
The following slots should be initialized if loading from a resource (see Resource overview for further details).
The style parameter may be a combination of the following, using the bitwise 'or' operator.
wxABSOLUTE_POSITIONING | A hint to the windowing system not to try native Windowing system layout (Motif only). This is the recommended style for all Motif panels and dialog boxes. |
wxBORDER | Draws a thin border around the panel. |
wxVSCROLL | Gives the dialog box a vertical scrollbar (XView only). |
void ( on-default-action wxItem item)
A panel receives this message in response to a double click in a listbox.
void ( on-command wxItem item wxCommandEvent command-event)
A panel or dialog box receives this message in response to a command (such as a button press), if the item has not overriden on-command. See wxCommandEvent for a list of event types associated with wxCommandEvent.
bool ( set-button-font wxFont font)
Sets the font used for panel or dialog box item buttons (or contents). See also set-label-font.
bool ( set-label-font wxFont font)
Sets the font used for panel or dialog box item labels. See also set-button-font.
bool ( set-label-position string position)
Change the current label orientation for panel items: position may be wxVERTICAL or wxHORIZONTAL.
bool ( new-line)
Insert a new line, that is, make subsequent panel items appear at the start of the next line.