back to gui 

wxFrame

generated from ../src/mod_gui/control/frame.cpp

A frame is a window whose size and position can (usually) be changed by the user. It usually has thick borders and a title bar, and can optionally contain a menu bar, toolbar and status bar. A frame can contain any window that is not a frame or dialog.

Constants

Style

Name Description
DEFAULT_FRAME_STYLE
ICONIZE
CAPTION
MINIMIZE
MINIMIZE_BOX
MAXIMIZE
MAXIMIZE_BOX
STAY_ON_TOP
SYSTEM_MENU
SIMPLE_BORDER
RESIZE_BORDER
FRAME_FLOAT_ON_PARENT
FRAME_TOOL_WINDOW

Constructor

wxFrame

wxFrame()
 
wxFrame(Parent, 
        Id, 
        Title, 
        Position = wxDefaultPosition, 
        Size = wxDefaultSize, 
        Style = 0)
 
Name Type Default Description
Parent wxWindow The parent of the wxFrame. Pass null, when you don't have a parent.
Id Integer The windows identifier. -1 can be used when you don't need a unique id.
Title String The caption of the frame.
Position wxPoint wxDefaultPosition The position of the frame.
Size wxSize wxDefaultSize The size of the frame.
Style Integer 0 The style of the frame.

Creates a new wxFrame object

Properties

Name Type Description
menuBar wxMenuBar Set/Get the menubar
statusBar wxStatusBar Set/Get the statusbar
statusBarFields Integer Set/Get the number of statusbar fields. A statusbar is created when there isn't a statusbar created yet.
statusBarPane Integer Set/Get the pane used to display menu and toolbar help. -1 disables help display.
toolBar wxToolBar Set/Get the toolbar

Methods

create

create(Parent, 
       Id, 
       Title, 
       Position = wxDefaultPosition, 
       Size = wxDefaultSize, 
       Style = 0) : Boolean
 
Name Type Default Description
Parent wxWindow The parent of the wxFrame. Pass null, when you don't have a parent.
Id Integer The windows identifier. -1 can be used when you don't need a unique id.
Title String The caption of the frame.
Position wxPoint wxDefaultPosition The position of the frame.
Size wxSize wxDefaultSize The size of the frame.
Style Integer 0 The style of the frame.

Creates a new wxFrame object

createStatusBar

createStatusBar(Field = 1, 
                Style = 0, 
                Id = -1) : wxStatusBar
 
Name Type Default Description
Field Integer 1 The number of fields. Default is 1.
Style Integer 0 The style of the statusbar.
Id Integer -1 A unique id for the statusbar.

Creates a status bar at the bottom of the frame.
Remark: The width of the status bar is the whole width of the frame (adjusted automatically when resizing), and the height and text size are chosen by the host windowing system

createToolBar

createToolBar(Style = wxBorder.NONE | wxToolBar.HORIZONTAL, 
              Id = -1) : wxToolBar
 
Name Type Default Description
Style Integer wxBorder.NONE | wxToolBar.HORIZONTAL The toolbar style
Id Integer -1 A unique id for the toolbar

Creates a toolbar at the top or left of the frame.

processCommand

processCommand(Id)
 
Name Type Default Description
Id Integer Identifier of a menu.

Simulates a menu command.

setStatusText

setStatusText(Text, 
              Field = 0)
 
Name Type Default Description
Text String The text to set in the status field
Field Integer 0 The number of the field (zero indexed)

Sets the text of the given status field. When no field is specified, the first one is used.

setStatusWidths

setStatusWidths(Widths)
 
Name Type Default Description
Widths Array Contains an array of status field width in pixels. A value of -1 indicates that the field is variable width. At least one field must be -1.

Sets the widths of the fields in the status bar. When the array contains more elements then fields, those elements are discarded. See also statusWidths.

Events

onClose Called when the frame is closed. The type of the argument that your handler receives is wxCloseEvent.
onIconize An event being sent when the frame is iconized (minimized). Currently only wxMSW and wxGTK generate such events. The type of the argument that your handler receives is wxIconizeEvent. When you handle this event, don't forget to set skip to true. Otherwise the frame will not be iconized.
onMaximize An event being sent when the frame is maximized. The type of the argument that your handler receives is wxMaximizeEvent. When you handle this event, don't forget to set skip to true. Otherwise the frame will not be maximized.



Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.