Contents Up Previous Next

Panel

A panel is a subwindow for placing panel items, such as buttons and text items. Its parent must be a frame. A panel inherits most properties from canvas, except for scrollbar functionality.

Note that a dialog box may be used in a similar way to a panel.

The following callbacks are valid for the panel class:

OnCommand
Called with a panel identifier, an item identifier and a command event identifier when a command event is received by a panel item that does not have an associated callback. If you have created a panel or dialog box from a resource, you will need to intercept OnCommand.
OnDefaultAction
Called with a panel identifier and an item identifier, when a double click has been received from a listbox.
OnEvent
Called with a panel identifier and a mouse event identifier. This can only be guaranteed only when the panel is in user edit mode (to be implemented).
OnPaint
Called with a panel identifier when the panel receives a repaint event from the window manager.
OnSize
The function is called with the window identifier, width and height.

See also window-add-callback.

panel-create
panel-create-from-resource
panel-set-button-font
panel-set-label-font
panel-set-label-position
panel-new-line


panel-create

long ( panel-create long parent-id optional long x optional long y
optional long width optional long height optional string style optional string name)

Creates a panel. parent-id must be a valid frame ID.

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).

name gives the panel a name that can be retrieved with window-get-name.


panel-create-from-resource

long ( panel-create-from-resource long parent-id string resource-name)

Creates a panel from the given wxWindows resource. The resource file containing this resource must first have been loaded with load-resource-file.

Panel items on a panel or dialog box that has been created from a resource, do not have conventional callbacks. Therefore you need to intercept the OnCommand event for the panel or dialog box and test the name and event of the item passed to this callback.


panel-set-button-font

long ( panel-set-button-font long panel-id long font-id)

Sets the font used for panel or dialog box item buttons (or contents). See also panel-set-label-font.


panel-set-label-font

long ( panel-set-label-font long panel-id long font-id)

Sets the font used for panel or dialog box item labels. See also panel-set-button-font.


panel-set-label-position

long ( panel-set-label-position long panel-id string position)

Change the current label orientation for panel items: position may be wxVERTICAL or wxHORIZONTAL.


panel-new-line

long ( panel-new-line long panel-id)

Insert a new line, that is, make subsequent panel items appear at the start of the next line.