Package wx :: Class Window
[frames | no frames]

Type Window

object --+        
         |        
    Object --+    
             |    
    EvtHandler --+
                 |
                Window

Known Subclasses:
Canvas, CaptionBar, ColDragWindow, Control, DynamicSashWindow, EmptyChild, GLCanvas, HtmlHelpWindow, ImageView, MDIClientWindow, MenuBar, MultiClient, MultiCloser, MultiCreator, MultiSash, MultiSizer, MultiSplit, MultiViewLeaf, Panel, PlotCanvas, PopupWindow, PyWindow, RowDragWindow, SashWindow, SplashScreenWindow, SplitterWindow, StatusBar, TopLevelWindow, TreeCompanionWindow

wx.Window is the base class for all windows and represents any visible object on the screen. All controls, top level windows and so on are wx.Windows. Sizers and device contexts are not however, as they don't appear on screen themselves.

Styles

wx.SIMPLE_BORDER Displays a thin border around the window.
wx.DOUBLE_BORDER Displays a double border. Windows and Mac only.
wx.SUNKEN_BORDER Displays a sunken border.
wx.RAISED_BORDER Displays a raised border.
wx.STATIC_BORDER Displays a border suitable for a static control. Windows only.
wx.NO_BORDER Displays no border, overriding the default border style for the window.
wx.TRANSPARENT_WINDOW The window is transparent, that is, it will not receive paint events. Windows only.
wx.TAB_TRAVERSAL Use this to enable tab traversal for non-dialog windows.
wx.WANTS_CHARS Use this to indicate that the window wants to get all char/key events for all keys - even for keys like TAB or ENTER which are usually used for dialog navigation and which wouldn't be generated without this style. If you need to use this style in order to get the arrows or etc., but would still like to have normal keyboard navigation take place, you should create and send a wxNavigationKeyEvent in response to the key events for Tab and Shift-Tab.
wx.NO_FULL_REPAINT_ON_RESIZE Disables repainting the window completely when its size is changed. You will have to repaint the new window area manually if you use this style. As of version 2.5.1 this style is on by default. Use wx.FULL_REPAINT_ON_RESIZE to deactivate it.
wx.VSCROLL Use this style to enable a vertical scrollbar.
wx.HSCROLL Use this style to enable a horizontal scrollbar.
wx.ALWAYS_SHOW_SB If a window has scrollbars, disable them instead of hiding them when they are not needed (i.e. when the size of the window is big enough to not require the scrollbars to navigate it). This style is currently only implemented for wxMSW and wxUniversal and does nothing on the other platforms.
wx.CLIP_CHILDREN Use this style to eliminate flicker caused by the background being repainted, then children being painted over them. Windows only.
wx.FULL_REPAINT_ON_RESIZE Use this style to force a complete redraw of the window whenever it is resized instead of redrawing just the part of the window affected by resizing. Note that this was the behaviour by default before 2.5.1 release and that if you experience redraw problems with the code which previously used to work you may want to try this.

Extra Styles

wx.WS_EX_VALIDATE_RECURSIVELY By default, Validate/TransferDataTo/FromWindow() only work on direct children of the window (compatible behaviour). Set this flag to make them recursively descend into all subwindows.
wx.WS_EX_BLOCK_EVENTS wx.CommandEvents and the objects of the derived classes are forwarded to the parent window and so on recursively by default. Using this flag for the given window allows to block this propagation at this window, i.e. prevent the events from being propagated further upwards. Dialogs have this flag on by default.
wx.WS_EX_TRANSIENT Don't use this window as an implicit parent for the other windows: this must be used with transient windows as otherwise there is the risk of creating a dialog/frame with this window as a parent which would lead to a crash if the parent is destroyed before the child.
wx.WS_EX_PROCESS_IDLE This window should always process idle events, even if the mode set by wx.IdleEvent.SetMode is wx.IDLE_PROCESS_SPECIFIED.
wx.WS_EX_PROCESS_UI_UPDATES This window should always process UI update events, even if the mode set by wx.UpdateUIEvent.SetMode is wxUPDATE_UI_PROCESS_SPECIFIED.

Method Summary
Window __init__(self, parent, id, pos, size, style, name)
Construct and show a generic Window.
bool AcceptsFocus(self)
Can this window have focus?
bool AcceptsFocusFromKeyboard(self)
Can this window be given focus by keyboard navigation? if not, the only way to give it focus (provided it accepts it at all) is to click it.
  AddChild(self, child)
Adds a child window.
int AdjustForLayoutDirection(self, x, width, widthTotal)
Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32.
  AssociateHandle(self, handle)
Associate the window with a new native handle
  CacheBestSize(self, size)
Cache the best size so it doesn't need to be calculated again, (at least until some properties of the window change.)
bool CanSetTransparent(self)
Returns True if the platform supports setting the transparency for this window.
  CaptureMouse(self)
Directs all mouse input to this window.
  Center(self, direction)
Centers the window.
  CenterOnParent(self, dir)
Center with respect to the the parent window
  Centre(self, direction)
Centers the window.
  CentreOnParent(self, dir)
Center with respect to the the parent window
  ClearBackground(self)
Clears the window by filling it with the current background colour.
Point ClientToScreen(self, pt)
Converts to screen coordinates from coordinates relative to this window.
(x,y) ClientToScreenXY(x, y)
Converts to screen coordinates from coordinates relative to this window.
bool Close(self, force)
This function simply generates a EVT_CLOSE event whose handler usually tries to close the window.
Point ConvertDialogPointToPixels(self, pt)
Converts a point or size from dialog units to pixels.
Size ConvertDialogSizeToPixels(self, sz)
Converts a point or size from dialog units to pixels.
Point ConvertPixelPointToDialog(self, pt)
Size ConvertPixelSizeToDialog(self, sz)
bool Create(self, parent, id, pos, size, style, name)
Create the GUI part of the Window for 2-phase creation mode.
bool Destroy(self)
Destroys the window safely.
bool DestroyChildren(self)
Destroys all children of a window.
bool Disable(self)
Disables the window, same as Enable(false).
  DissociateHandle(self)
Dissociate the current native handle from the window
Point DLG_PNT(self, pt)
Converts a point or size from dialog units to pixels.
Size DLG_SZE(self, sz)
Converts a point or size from dialog units to pixels.
  DragAcceptFiles(self, accept)
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
bool Enable(self, enable)
Enable or disable the window for user input.
Window FindFocus()
Returns the window or control that currently has the keyboard focus, or None. (Static method)
Window FindWindowById(self, winid)
Find a chld of this window by window ID
Window FindWindowByName(self, name)
Find a child of this window by name
  Fit(self)
Sizes the window so that it fits around its subwindows.
  FitInside(self)
Similar to Fit, but sizes the interior (virtual) size of a window.
  Freeze(self)
Freezes the window or, in other words, prevents any updates from taking place on screen, the window is not redrawn at all.
AcceleratorTable GetAcceleratorTable(self)
Gets the accelerator table for this window.
  GetAdjustedBestSize(*args, **kwargs)
Use GetEffectiveMinSize instead.
bool GetAutoLayout(self)
Returns the current autoLayout setting
Colour GetBackgroundColour(self)
Returns the background colour of the window.
int GetBackgroundStyle(self)
Returns the background style of the window.
  GetBestFittingSize(*args, **kwargs)
Use GetEffectiveMinSize instead.
Size GetBestSize(self)
This function returns the best acceptable minimal size for the window, if applicable.
(width, height) GetBestSizeTuple()
This function returns the best acceptable minimal size for the window, if applicable.
Size GetBestVirtualSize(self)
Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)
int GetBorder(self, flags)
GetBorder(self) -> int
Window GetCapture()
Returns the window which currently captures the mouse or None (Static method)
Caret GetCaret(self)
Returns the caret associated with the window.
int GetCharHeight(self)
Get the (average) character size for the current font.
int GetCharWidth(self)
Get the (average) character size for the current font.
PyObject GetChildren(self)
Returns a list of the window's children.
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
Point GetClientAreaOrigin(self)
Get the origin of the client area of the window relative to the window's top left corner (the client area may be shifted because of the borders, scrollbars, other decorations...)
Rect GetClientRect(self)
Get the client area position and size as a wx.Rect object.
Size GetClientSize(self)
This gets the size of the window's 'client area' in pixels.
(width, height) GetClientSizeTuple()
This gets the size of the window's 'client area' in pixels.
LayoutConstraints GetConstraints(self)
Returns a pointer to the window's layout constraints, or None if there are none.
Sizer GetContainingSizer(self)
Return the sizer that this window is a member of, if any, otherwise None.
Cursor GetCursor(self)
Return the cursor associated with this window.
VisualAttributes GetDefaultAttributes(self)
Get the default attributes for an instance of this class.
DropTarget GetDropTarget(self)
Returns the associated drop target, which may be None.
Size GetEffectiveMinSize(self)
This function will merge the window's best size into the window's minimum size, giving priority to the min size components, and returns the results.
EvtHandler GetEventHandler(self)
Returns the event handler for this window.
long GetExtraStyle(self)
Returns the extra style bits for the window.
Font GetFont(self)
Returns the default font used for this window.
Colour GetForegroundColour(self)
Returns the foreground colour of the window.
(width, height, descent, externalLeading) GetFullTextExtent(string, font)
Get the width, height, decent and leading of the text using the current or specified font.
Window GetGrandParent(self)
Returns the parent of the parent of this window, or None if there isn't one.
long GetHandle(self)
Returns the platform-specific handle (as a long integer) of the physical window.
String GetHelpText(self)
Gets the help text to be used as context-sensitive help for this window.
  GetHelpTextAtPoint(*args, **kwargs)
GetHelpTextAtPoint(self, Point pt, wxHelpEvent::Origin origin) -> String
int GetId(self)
Returns the identifier of the window.
String GetLabel(self)
Generic way of getting a label from any window, for identification purposes.
int GetLayoutDirection(self)
Get the layout direction (LTR or RTL) for this window.
int GetMaxHeight(self)
Size GetMaxSize(self)
int GetMaxWidth(self)
int GetMinHeight(self)
Size GetMinSize(self)
int GetMinWidth(self)
String GetName(self)
Returns the windows name.
Window GetParent(self)
Returns the parent window of this window, or None if there isn't one.
Point GetPosition(self)
Get the window's position.
(x,y) GetPositionTuple()
Get the window's position.
Rect GetRect(self)
Returns the size and position of the window as a wx.Rect object.
Point GetScreenPosition(self)
Get the position of the window in screen coordinantes.
(x,y) GetScreenPositionTuple()
Get the position of the window in screen coordinantes.
Rect GetScreenRect(self)
Returns the size and position of the window in screen coordinantes as a wx.Rect object.
int GetScrollPos(self, orientation)
Returns the built-in scrollbar position.
int GetScrollRange(self, orientation)
Returns the built-in scrollbar range.
int GetScrollThumb(self, orientation)
Returns the built-in scrollbar thumb size.
Size GetSize(self)
Get the window size.
Sizer GetSizer(self)
Return the sizer associated with the window by a previous call to SetSizer or None if there isn't one.
(width, height) GetSizeTuple()
Get the window size.
(width, height) GetTextExtent(string)
Get the width and height of the text using the current font.
bool GetThemeEnabled(self)
Return the themeEnabled flag.
ToolTip GetToolTip(self)
get the associated tooltip or None if none
Window GetTopLevelParent(self)
Returns the first frame or dialog in this window's parental hierarchy.
Rect GetUpdateClientRect(self)
Get the update rectangle region bounding box in client coords.
Region GetUpdateRegion(self)
Returns the region specifying which parts of the window have been damaged.
Validator GetValidator(self)
Returns a pointer to the current validator for the window, or None if there is none.
Size GetVirtualSize(self)
Get the the virtual size of the window in pixels.
(width, height) GetVirtualSizeTuple()
Get the the virtual size of the window in pixels.
Size GetWindowBorderSize(self)
Return the size of the left/right and top/bottom borders.
long GetWindowStyle(self)
Gets the window style that was passed to the constructor or Create method.
long GetWindowStyleFlag(self)
Gets the window style that was passed to the constructor or Create method.
int GetWindowVariant(self)
bool HasCapture(self)
Returns true if this window has the current mouse capture.
bool HasFlag(self, flag)
Test if the given style is set for this window.
bool HasMultiplePages(self)
bool HasScrollbar(self, orient)
Does the window have the scrollbar for this orientation?
bool HasTransparentBackground(self)
Returns True if this window's background is transparent (as, for example, for wx.StaticText) and should show the parent window's background.
bool Hide(self)
Equivalent to calling Show(False).
int HitTest(self, pt)
Test where the given (in client coords) point lies
int HitTestXY(self, x, y)
Test where the given (in client coords) point lies
  InheritAttributes(self)
This function is (or should be, in case of custom controls) called during window creation to intelligently set up the window visual attributes, that is the font and the foreground and background colours.
bool InheritsBackgroundColour(self)
  InitDialog(self)
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.
  InvalidateBestSize(self)
Reset the cached best size value so it will be recalculated the next time it is needed.
bool IsBeingDeleted(self)
Is the window in the process of being deleted?
bool IsDoubleBuffered(self)
Returns True if the window contents is double-buffered by the system, i.e.
bool IsEnabled(self)
Returns true if the window is enabled for input, false otherwise.
bool IsExposed(self, x, y, w, h)
Returns true if the given point or rectangle area has been exposed since the last repaint.
bool IsExposedPoint(self, pt)
Returns true if the given point or rectangle area has been exposed since the last repaint.
bool IsExposedRect(self, rect)
Returns true if the given point or rectangle area has been exposed since the last repaint.
bool IsFrozen(self)
Returns True if the window has been frozen and not thawed yet.
bool IsRetained(self)
Returns true if the window is retained, false otherwise.
bool IsShown(self)
Returns true if the window is shown, false if it has been hidden.
bool IsShownOnScreen(self)
Returns True if the window is physically visible on the screen, i.e.
bool IsTopLevel(self)
Returns true if the given window is a top-level one.
bool Layout(self)
Invokes the constraint-based layout algorithm or the sizer-based algorithm for this window.
bool LineDown(self)
This is just a wrapper for ScrollLines(1).
bool LineUp(self)
This is just a wrapper for ScrollLines(-1).
  Lower(self)
Lowers the window to the bottom of the window hierarchy.
  MakeModal(self, modal)
Disables all other windows in the application so that the user can only interact with this window.
  Move(self, pt, flags)
Moves the window to the given position.
  MoveAfterInTabOrder(self, win)
Moves this window in the tab navigation order after the specified sibling window.
  MoveBeforeInTabOrder(self, win)
Same as MoveAfterInTabOrder except that it inserts this window just before win instead of putting it right after it.
  MoveXY(self, x, y, flags)
Moves the window to the given position.
bool Navigate(self, flags)
Does keyboard navigation from this window to another, by sending a wx.NavigationKeyEvent.
int NewControlId()
Generate a control id for the controls which were not given one. (Static method)
int NextControlId(winid)
Get the id of the control following the one with the given autogenerated) id (Static method)
bool PageDown(self)
This is just a wrapper for ScrollPages(1).
bool PageUp(self)
This is just a wrapper for ScrollPages(-1).
EvtHandler PopEventHandler(self, deleteHandler)
Removes and returns the top-most event handler on the event handler stack.
bool PopupMenu(self, menu, pos)
Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu.
bool PopupMenuXY(self, menu, x, y)
Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu.
  PostCreate(self, pre)
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.
  PrepareDC(self, dc)
Call this function to prepare the device context for drawing a scrolled image.
int PrevControlId(winid)
Get the id of the control preceding the one with the given autogenerated) id (Static method)
  PushEventHandler(self, handler)
Pushes this event handler onto the event handler stack for the window.
  Raise(self)
Raises the window to the top of the window hierarchy.
  Refresh(self, eraseBackground, rect)
Mark the specified rectangle (or the whole window) as "dirty" so it will be repainted.
  RefreshRect(self, rect, eraseBackground)
Redraws the contents of the given rectangle: the area inside it will be repainted.
bool RegisterHotKey(self, hotkeyId, modifiers, keycode)
Registers a system wide hotkey.
  ReleaseMouse(self)
Releases mouse input captured with wx.Window.CaptureMouse.
  RemoveChild(self, child)
Removes a child window.
bool RemoveEventHandler(self, handler)
Find the given handler in the event handler chain and remove (but not delete) it from the event handler chain, returns True if it was found and False otherwise (this also results in an assert failure so this function should only be called when the handler is supposed to be there.)
bool Reparent(self, newParent)
Reparents the window, i.e the window will be removed from its current parent window (e.g.
Point ScreenToClient(self, pt)
Converts from screen to client window coordinates.
(x,y) ScreenToClientXY(x, y)
Converts from screen to client window coordinates.
bool ScrollLines(self, lines)
If the platform and window class supports it, scrolls the window by the given number of lines down, if lines is positive, or up if lines is negative.
bool ScrollPages(self, pages)
If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative.
  ScrollWindow(self, dx, dy, rect)
Physically scrolls the pixels in the window and move child windows accordingly.
  SendSizeEvent(self)
  SetAcceleratorTable(self, accel)
Sets the accelerator table for this window.
  SetAutoLayout(self, autoLayout)
Determines whether the Layout function will be called automatically when the window is resized.
bool SetBackgroundColour(self, colour)
Sets the background colour of the window.
bool SetBackgroundStyle(self, style)
Returns the background style of the window.
  SetBestFittingSize(*args, **kwargs)
Use SetInitialSize
  SetCaret(self, caret)
Sets the caret associated with the window.
  SetClientRect(self, rect)
This sets the size of the window client area in pixels.
  SetClientSize(self, size)
This sets the size of the window client area in pixels.
  SetClientSizeWH(self, width, height)
This sets the size of the window client area in pixels.
  SetConstraints(self, constraints)
Sets the window to have the given layout constraints.
  SetContainingSizer(self, sizer)
This normally does not need to be called by application code.
bool SetCursor(self, cursor)
Sets the window's cursor.
  SetDimensions(self, x, y, width, height, sizeFlags)
Sets the position and size of the window in pixels.
  SetDoubleBuffered(self, on)
Currently wxGTK2 only.
  SetDropTarget(self, dropTarget)
Associates a drop target with this window.
  SetEventHandler(self, handler)
Sets the event handler for this window.
  SetExtraStyle(self, exStyle)
Sets the extra style bits for the window.
  SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
  SetFocusFromKbd(self)
Set focus to this window as the result of a keyboard action.
bool SetFont(self, font)
Sets the font for this window.
bool SetForegroundColour(self, colour)
Sets the foreground colour of the window.
  SetHelpText(self, text)
Sets the help text to be used as context-sensitive help for this window.
  SetHelpTextForId(self, text)
Associate this help text with all windows with the same id as this one.
  SetId(self, winid)
Sets the identifier of the window.
  SetInitialSize(self, size)
A 'Smart' SetSize that will fill in default size components with the window's best size values.
  SetLabel(self, label)
Set the text which the window shows in its label if applicable.
  SetLayoutDirection(self, dir)
Set the layout direction (LTR or RTL) for this window.
  SetMaxSize(self, maxSize)
A more convenient method than SetSizeHints for setting just the max size.
  SetMinSize(self, minSize)
A more convenient method than SetSizeHints for setting just the min size.
  SetName(self, name)
Sets the window's name.
  SetOwnBackgroundColour(self, colour)
  SetOwnFont(self, font)
  SetOwnForegroundColour(self, colour)
  SetPosition(self, pt, flags)
Moves the window to the given position.
  SetRect(self, rect, sizeFlags)
Sets the position and size of the window in pixels using a wx.Rect.
  SetScrollbar(self, orientation, position, thumbSize, range, refresh)
  SetScrollPos(self, orientation, pos, refresh)
Sets the position of one of the built-in scrollbars.
  SetSize(self, size)
Sets the size of the window in pixels.
  SetSizeHints(self, minW, minH, maxW, maxH, incW, incH)
Allows specification of minimum and maximum window sizes, and window size increments.
  SetSizeHintsSz(self, minSize, maxSize, incSize)
Allows specification of minimum and maximum window sizes, and window size increments.
  SetSizer(self, sizer, deleteOld)
Sets the window to have the given layout sizer.
  SetSizerAndFit(self, sizer, deleteOld)
The same as SetSizer, except it also sets the size hints for the window based on the sizer's minimum size.
  SetSizeWH(self, width, height)
Sets the size of the window in pixels.
  SetThemeEnabled(self, enableTheme)
code to draw the windows' background instead if its own background drawing code.
  SetToolTip(self, tip)
Attach a tooltip to the window.
  SetToolTipString(self, tip)
Attach a tooltip to the window.
bool SetTransparent(self, alpha)
Attempt to set the transparency of this window to the alpha value, returns True on success.
  SetValidator(self, validator)
Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.
  SetVirtualSize(self, size)
Set the the virtual size of a window in pixels.
  SetVirtualSizeHints(self, minW, minH, maxW, maxH)
Allows specification of minimum and maximum virtual window sizes.
  SetVirtualSizeHintsSz(self, minSize, maxSize)
Allows specification of minimum and maximum virtual window sizes.
  SetVirtualSizeWH(self, w, h)
Set the the virtual size of a window in pixels.
  SetWindowStyle(self, style)
Sets the style of the window.
  SetWindowStyleFlag(self, style)
Sets the style of the window.
  SetWindowVariant(self, variant)
Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac.
bool ShouldInheritColours(self)
Return true from here to allow the colours of this window to be changed by InheritAttributes, returning false forbids inheriting them from the parent window.
bool Show(self, show)
Shows or hides the window.
  Thaw(self)
Reenables window updating after a previous call to Freeze.
bool ToggleWindowStyle(self, flag)
Turn the flag on if it had been turned off before and vice versa, returns True if the flag is turned on by this function call.
bool TransferDataFromWindow(self)
Transfers values from child controls to data areas specified by their validators.
bool TransferDataToWindow(self)
Transfers values to child controls from data areas specified by their validators.
bool UnregisterHotKey(self, hotkeyId)
Unregisters a system wide hotkey.
  Update(self)
Calling this method immediately repaints the invalidated area of the window instead of waiting for the EVT_PAINT event to happen, (normally this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and does nothing if the window has been already repainted.
  UpdateWindowUI(self, flags)
This function sends EVT_UPDATE_UI events to the window.
bool UseBgCol(self)
bool Validate(self)
Validates the current values of the child controls using their validators.
  WarpPointer(self, x, y)
Moves the pointer to the given position on the window.

Property Summary
  AcceleratorTable: See GetAcceleratorTable and SetAcceleratorTable
  AutoLayout: See GetAutoLayout and SetAutoLayout
  BackgroundColour: See GetBackgroundColour and SetBackgroundColour
  BackgroundStyle: See GetBackgroundStyle and SetBackgroundStyle
  BestSize: See GetBestSize
  BestVirtualSize: See GetBestVirtualSize
  Border: See GetBorder
  Caret: See GetCaret and SetCaret
  CharHeight: See GetCharHeight
  CharWidth: See GetCharWidth
  Children: See GetChildren
  ClientAreaOrigin: See GetClientAreaOrigin
  ClientRect: See GetClientRect and SetClientRect
  ClientSize: See GetClientSize and SetClientSize
  Constraints: See GetConstraints and SetConstraints
  ContainingSizer: See GetContainingSizer and SetContainingSizer
  Cursor: See GetCursor and SetCursor
  DefaultAttributes: See GetDefaultAttributes
  DropTarget: See GetDropTarget and SetDropTarget
  EffectiveMinSize: See GetEffectiveMinSize
  Enabled: See IsEnabled and Enable
  EventHandler: See GetEventHandler and SetEventHandler
  ExtraStyle: See GetExtraStyle and SetExtraStyle
  Font: See GetFont and SetFont
  ForegroundColour: See GetForegroundColour and SetForegroundColour
  GrandParent: See GetGrandParent
  Handle: See GetHandle
  HelpText: See GetHelpText and SetHelpText
  Id: See GetId and SetId
  Label: See GetLabel and SetLabel
  LayoutDirection: See GetLayoutDirection and SetLayoutDirection
  MaxHeight: See GetMaxHeight
  MaxSize: See GetMaxSize and SetMaxSize
  MaxWidth: See GetMaxWidth
  MinHeight: See GetMinHeight
  MinSize: See GetMinSize and SetMinSize
  MinWidth: See GetMinWidth
  Name: See GetName and SetName
  Parent: See GetParent
  Position: See GetPosition and SetPosition
  Rect: See GetRect and SetRect
  ScreenPosition: See GetScreenPosition
  ScreenRect: See GetScreenRect
  Shown: See IsShown and Show
  Size: See GetSize and SetSize
  Sizer: See GetSizer and SetSizer
  ThemeEnabled: See GetThemeEnabled and SetThemeEnabled
  thisown: The membership flag
  ToolTip: See GetToolTip and SetToolTip
  TopLevel: See IsTopLevel
  TopLevelParent: See GetTopLevelParent
  UpdateClientRect: See GetUpdateClientRect
  UpdateRegion: See GetUpdateRegion
  Validator: See GetValidator and SetValidator
  VirtualSize: See GetVirtualSize and SetVirtualSize
  WindowStyle: See GetWindowStyle and SetWindowStyle
  WindowStyleFlag: See GetWindowStyleFlag and SetWindowStyleFlag
  WindowVariant: See GetWindowVariant and SetWindowVariant

Instance Method Details

__init__(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=0, name=PanelNameStr)
(Constructor)

Construct and show a generic Window.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

name
           (type=String)

Returns:
Window
Overrides:
wx.EvtHandler.__init__

AcceptsFocus(self)

Can this window have focus?

Returns:
bool

AcceptsFocusFromKeyboard(self)

Can this window be given focus by keyboard navigation? if not, the only way to give it focus (provided it accepts it at all) is to click it.

Returns:
bool

AddChild(self, child)

Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer.

Parameters:
child
           (type=Window)

AdjustForLayoutDirection(self, x, width, widthTotal)

Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32.

Parameters:
x
           (type=int)

width
           (type=int)

widthTotal
           (type=int)

Returns:
int

AssociateHandle(self, handle)

Associate the window with a new native handle

Parameters:
handle
           (type=long)

CacheBestSize(self, size)

Cache the best size so it doesn't need to be calculated again, (at least until some properties of the window change.)

Parameters:
size
           (type=Size)

CanSetTransparent(self)

Returns True if the platform supports setting the transparency for this window. Note that this method will err on the side of caution, so it is possible that this will return False when it is in fact possible to set the transparency.

NOTE: On X-windows systems the X server must have the composite extension loaded, and there must be a composite manager program (such as xcompmgr) running.

Returns:
bool

CaptureMouse(self)

Directs all mouse input to this window. Call wx.Window.ReleaseMouse to release the capture.

Note that wxWindows maintains the stack of windows having captured the mouse and when the mouse is released the capture returns to the window which had had captured it previously and it is only really released if there were no previous window. In particular, this means that you must release the mouse as many times as you capture it, unless the window receives the wx.MouseCaptureLostEvent event.

Any application which captures the mouse in the beginning of some operation must handle wx.MouseCaptureLostEvent and cancel this operation when it receives the event. The event handler must not recapture mouse.

Center(self, direction=BOTH)

Centers the window. The parameter specifies the direction for cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen.

Parameters:
direction
           (type=int)

CenterOnParent(self, dir=BOTH)

Center with respect to the the parent window

Parameters:
dir
           (type=int)

Centre(self, direction=BOTH)

Centers the window. The parameter specifies the direction for cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen.

Parameters:
direction
           (type=int)

CentreOnParent(self, dir=BOTH)

Center with respect to the the parent window

Parameters:
dir
           (type=int)

ClearBackground(self)

Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated.

ClientToScreen(self, pt)

Converts to screen coordinates from coordinates relative to this window.

Parameters:
pt
           (type=Point)

Returns:
Point

ClientToScreenXY(x, y)

Converts to screen coordinates from coordinates relative to this window.

Parameters:
x
           (type=int)

y
           (type=int)

Returns:
(x,y)

Close(self, force=False)

This function simply generates a EVT_CLOSE event whose handler usually tries to close the window. It doesn't close the window itself, however. If force is False (the default) then the window's close handler will be allowed to veto the destruction of the window. Usually Close is only used with the top level windows (wx.Frame and wx.Dialog classes) as the others are not supposed to have any special EVT_CLOSE logic.

The close handler should check whether the window is being deleted forcibly, using wx.CloseEvent.GetForce, in which case it should destroy the window using wx.Window.Destroy.

Note that calling Close does not guarantee that the window will be destroyed; but it provides a way to simulate a manual close of a window, which may or may not be implemented by destroying the window. The default EVT_CLOSE handler for wx.Dialog does not necessarily delete the dialog, since it will simply simulate an wxID_CANCEL event which is handled by the appropriate button event handler and may do anything at all.

To guarantee that the window will be destroyed, call wx.Window.Destroy instead.

Parameters:
force
           (type=bool)

Returns:
bool

ConvertDialogPointToPixels(self, pt)

Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.

Parameters:
pt
           (type=Point)

Returns:
Point

ConvertDialogSizeToPixels(self, sz)

Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.

Parameters:
sz
           (type=Size)

Returns:
Size

Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=0, name=PanelNameStr)

Create the GUI part of the Window for 2-phase creation mode.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

name
           (type=String)

Returns:
bool

Destroy(self)

Destroys the window safely. Frames and dialogs are not destroyed immediately when this function is called -- they are added to a list of windows to be deleted on idle time, when all the window's events have been processed. This prevents problems with events being sent to non-existent windows.

Returns True if the window has either been successfully deleted, or it has been added to the list of windows pending real deletion.

Returns:
bool
Overrides:
wx.Object.Destroy

DestroyChildren(self)

Destroys all children of a window. Called automatically by the destructor.

Returns:
bool

Disable(self)

Disables the window, same as Enable(false).

Returns:
bool

DissociateHandle(self)

Dissociate the current native handle from the window

DLG_PNT(self, pt)

Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.

Parameters:
pt
           (type=Point)

Returns:
Point

DLG_SZE(self, sz)

Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.

Parameters:
sz
           (type=Size)

Returns:
Size

DragAcceptFiles(self, accept)

Enables or disables eligibility for drop file events, EVT_DROP_FILES. Only functional on Windows.

Parameters:
accept
           (type=bool)

Enable(self, enable=True)

Enable or disable the window for user input. Note that when a parent window is disabled, all of its children are disabled as well and they are reenabled again when the parent is. Returns true if the window has been enabled or disabled, false if nothing was done, i.e. if the window had already been in the specified state.

Parameters:
enable
           (type=bool)

Returns:
bool

FindWindowById(self, winid)

Find a chld of this window by window ID

Parameters:
winid
           (type=long)

Returns:
Window

FindWindowByName(self, name)

Find a child of this window by name

Parameters:
name
           (type=String)

Returns:
Window

Fit(self)

Sizes the window so that it fits around its subwindows. This function won't do anything if there are no subwindows and will only really work correctly if sizers are used for the subwindows layout. Also, if the window has exactly one subwindow it is better (faster and the result is more precise as Fit adds some margin to account for fuzziness of its calculations) to call window.SetClientSize(child.GetSize()) instead of calling Fit.

FitInside(self)

Similar to Fit, but sizes the interior (virtual) size of a window. Mainly useful with scrolled windows to reset scrollbars after sizing changes that do not trigger a size event, and/or scrolled windows without an interior sizer. This function similarly won't do anything if there are no subwindows.

Freeze(self)

Freezes the window or, in other words, prevents any updates from taking place on screen, the window is not redrawn at all. Thaw must be called to reenable window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw being delayed until all the nesting has been undone.

This method is useful for visual appearance optimization (for example, it is a good idea to use it before inserting large amount of text into a wxTextCtrl under wxGTK) but is not implemented on all platforms nor for all controls so it is mostly just a hint to wxWindows and not a mandatory directive.

GetAcceleratorTable(self)

Gets the accelerator table for this window.

Returns:
AcceleratorTable

GetAdjustedBestSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetAutoLayout(self)

Returns the current autoLayout setting

Returns:
bool

GetBackgroundColour(self)

Returns the background colour of the window.

Returns:
Colour

GetBackgroundStyle(self)

Returns the background style of the window.

Returns:
int

See Also:

SetBackgroundStyle

GetBestFittingSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetBestSize(self)

This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

Returns:
Size

GetBestSizeTuple()

This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

Returns:
(width, height)

GetBestVirtualSize(self)

Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)

Returns:
Size

GetBorder(self, flags)

GetBorder(self) -> int

Get border for the flags of this window

Parameters:
flags
           (type=long)

Returns:
int

GetCaret(self)

Returns the caret associated with the window.

Returns:
Caret

GetCharHeight(self)

Get the (average) character size for the current font.

Returns:
int

GetCharWidth(self)

Get the (average) character size for the current font.

Returns:
int

GetChildren(self)

Returns a list of the window's children. NOTE: Currently this is a copy of the child window list maintained by the window, so the return value of this function is only valid as long as the window's children do not change.

Returns:
PyObject

GetClientAreaOrigin(self)

Get the origin of the client area of the window relative to the window's top left corner (the client area may be shifted because of the borders, scrollbars, other decorations...)

Returns:
Point

GetClientRect(self)

Get the client area position and size as a wx.Rect object.

Returns:
Rect

GetClientSize(self)

This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.

Returns:
Size

GetClientSizeTuple()

This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.

Returns:
(width, height)

GetConstraints(self)

Returns a pointer to the window's layout constraints, or None if there are none.

Returns:
LayoutConstraints

GetContainingSizer(self)

Return the sizer that this window is a member of, if any, otherwise None.

Returns:
Sizer

GetCursor(self)

Return the cursor associated with this window.

Returns:
Cursor

GetDefaultAttributes(self)

Get the default attributes for an instance of this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

Returns:
VisualAttributes

GetDropTarget(self)

Returns the associated drop target, which may be None.

Returns:
DropTarget

GetEffectiveMinSize(self)

This function will merge the window's best size into the window's minimum size, giving priority to the min size components, and returns the results.

Returns:
Size

GetEventHandler(self)

Returns the event handler for this window. By default, the window is its own event handler.

Returns:
EvtHandler

GetExtraStyle(self)

Returns the extra style bits for the window.

Returns:
long

GetFont(self)

Returns the default font used for this window.

Returns:
Font

GetForegroundColour(self)

Returns the foreground colour of the window. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all.

Returns:
Colour

GetFullTextExtent(string, font=None)

Get the width, height, decent and leading of the text using the current or specified font.

Parameters:
string
           (type=String)

font
           (type=Font)

Returns:
(width, height, descent, externalLeading)

GetGrandParent(self)

Returns the parent of the parent of this window, or None if there isn't one.

Returns:
Window

GetHandle(self)

Returns the platform-specific handle (as a long integer) of the physical window. Currently on wxMac it returns the handle of the toplevel parent of the window.

Returns:
long

GetHelpText(self)

Gets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current wx.HelpProvider implementation, and not in the window object itself.

Returns:
String

GetHelpTextAtPoint(*args, **kwargs)

GetHelpTextAtPoint(self, Point pt, wxHelpEvent::Origin origin) -> String

Get the help string associated with the given position in this window.

Notice that pt may be invalid if event origin is keyboard or unknown and this method should return the global window help text then

GetId(self)

Returns the identifier of the window. Each window has an integer identifier. If the application has not provided one (or the default Id -1 is used) then an unique identifier with a negative value will be generated.

Returns:
int

GetLabel(self)

Generic way of getting a label from any window, for identification purposes. The interpretation of this function differs from class to class. For frames and dialogs, the value returned is the title. For buttons or static text controls, it is the button text. This function can be useful for meta-programs such as testing tools or special-needs access programs)which need to identify windows by name.

Returns:
String

GetLayoutDirection(self)

Get the layout direction (LTR or RTL) for this window. Returns wx.Layout_Default if layout direction is not supported.

Returns:
int

GetName(self)

Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName.

Returns:
String

GetParent(self)

Returns the parent window of this window, or None if there isn't one.

Returns:
Window

GetPosition(self)

Get the window's position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use GetScreenPosition if you need screen coordinates for all kinds of windows.

Returns:
Point

GetPositionTuple()

Get the window's position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use GetScreenPosition if you need screen coordinates for all kinds of windows.

Returns:
(x,y)

GetRect(self)

Returns the size and position of the window as a wx.Rect object.

Returns:
Rect

GetScreenPosition(self)

Get the position of the window in screen coordinantes.

Returns:
Point

GetScreenPositionTuple()

Get the position of the window in screen coordinantes.

Returns:
(x,y)

GetScreenRect(self)

Returns the size and position of the window in screen coordinantes as a wx.Rect object. :see: GetRect, GetScreenPosition

Returns:
Rect

GetScrollPos(self, orientation)

Returns the built-in scrollbar position.

Parameters:
orientation
           (type=int)

Returns:
int

GetScrollRange(self, orientation)

Returns the built-in scrollbar range.

Parameters:
orientation
           (type=int)

Returns:
int

GetScrollThumb(self, orientation)

Returns the built-in scrollbar thumb size.

Parameters:
orientation
           (type=int)

Returns:
int

GetSize(self)

Get the window size.

Returns:
Size

GetSizer(self)

Return the sizer associated with the window by a previous call to SetSizer or None if there isn't one.

Returns:
Sizer

GetSizeTuple()

Get the window size.

Returns:
(width, height)

GetTextExtent(string)

Get the width and height of the text using the current font.

Parameters:
string
           (type=String)

Returns:
(width, height)

GetThemeEnabled(self)

Return the themeEnabled flag.

Returns:
bool

GetToolTip(self)

get the associated tooltip or None if none

Returns:
ToolTip

GetTopLevelParent(self)

Returns the first frame or dialog in this window's parental hierarchy.

Returns:
Window

GetUpdateClientRect(self)

Get the update rectangle region bounding box in client coords.

Returns:
Rect

GetUpdateRegion(self)

Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler.

Returns:
Region

GetValidator(self)

Returns a pointer to the current validator for the window, or None if there is none.

Returns:
Validator

GetVirtualSize(self)

Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.

Returns:
Size

GetVirtualSizeTuple()

Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.

Returns:
(width, height)

GetWindowBorderSize(self)

Return the size of the left/right and top/bottom borders.

Returns:
Size

GetWindowStyle(self)

Gets the window style that was passed to the constructor or Create method.

Returns:
long

GetWindowStyleFlag(self)

Gets the window style that was passed to the constructor or Create method.

Returns:
long

HasCapture(self)

Returns true if this window has the current mouse capture.

Returns:
bool

HasFlag(self, flag)

Test if the given style is set for this window.

Parameters:
flag
           (type=int)

Returns:
bool

HasScrollbar(self, orient)

Does the window have the scrollbar for this orientation?

Parameters:
orient
           (type=int)

Returns:
bool

HasTransparentBackground(self)

Returns True if this window's background is transparent (as, for example, for wx.StaticText) and should show the parent window's background.

This method is mostly used internally by the library itself and you normally shouldn't have to call it. You may, however, have to override it in your custom control classes to ensure that background is painted correctly.

Returns:
bool

Hide(self)

Equivalent to calling Show(False).

Returns:
bool

HitTest(self, pt)

Test where the given (in client coords) point lies

Parameters:
pt
           (type=Point)

Returns:
int

HitTestXY(self, x, y)

Test where the given (in client coords) point lies

Parameters:
x
           (type=int)

y
           (type=int)

Returns:
int

InheritAttributes(self)

This function is (or should be, in case of custom controls) called during window creation to intelligently set up the window visual attributes, that is the font and the foreground and background colours.

By 'intelligently' the following is meant: by default, all windows use their own default attributes. However if some of the parent's attributes are explicitly changed (that is, using SetFont and not SetOwnFont) and if the corresponding attribute hadn't been explicitly set for this window itself, then this window takes the same value as used by the parent. In addition, if the window overrides ShouldInheritColours to return false, the colours will not be changed no matter what and only the font might.

This rather complicated logic is necessary in order to accommodate the different usage scenarios. The most common one is when all default attributes are used and in this case, nothing should be inherited as in modern GUIs different controls use different fonts (and colours) than their siblings so they can't inherit the same value from the parent. However it was also deemed desirable to allow to simply change the attributes of all children at once by just changing the font or colour of their common parent, hence in this case we do inherit the parents attributes.

InitDialog(self)

Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.

InvalidateBestSize(self)

Reset the cached best size value so it will be recalculated the next time it is needed.

IsBeingDeleted(self)

Is the window in the process of being deleted?

Returns:
bool

IsDoubleBuffered(self)

Returns True if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later.

Returns:
bool

IsEnabled(self)

Returns true if the window is enabled for input, false otherwise.

Returns:
bool

IsExposed(self, x, y, w=1, h=1)

Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed.

Parameters:
x
           (type=int)

y
           (type=int)

w
           (type=int)

h
           (type=int)

Returns:
bool

IsExposedPoint(self, pt)

Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed.

Parameters:
pt
           (type=Point)

Returns:
bool

IsExposedRect(self, rect)

Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed.

Parameters:
rect
           (type=Rect)

Returns:
bool

IsFrozen(self)

Returns True if the window has been frozen and not thawed yet.

Returns:
bool

See Also:

Freeze and Thaw

IsRetained(self)

Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms.

Returns:
bool

IsShown(self)

Returns true if the window is shown, false if it has been hidden.

Returns:
bool

IsShownOnScreen(self)

Returns True if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well.

Returns:
bool

IsTopLevel(self)

Returns true if the given window is a top-level one. Currently all frames and dialogs are always considered to be top-level windows (even if they have a parent window).

Returns:
bool

Layout(self)

Invokes the constraint-based layout algorithm or the sizer-based algorithm for this window. See SetAutoLayout: when auto layout is on, this function gets called automatically by the default EVT_SIZE handler when the window is resized.

Returns:
bool

LineDown(self)

This is just a wrapper for ScrollLines(1).

Returns:
bool

LineUp(self)

This is just a wrapper for ScrollLines(-1).

Returns:
bool

Lower(self)

Lowers the window to the bottom of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.

MakeModal(self, modal=True)

Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this effect.

Parameters:
modal
           (type=bool)

Move(self, pt, flags=SIZE_USE_EXISTING)

Moves the window to the given position.

Parameters:
pt
           (type=Point)

flags
           (type=int)

MoveAfterInTabOrder(self, win)

Moves this window in the tab navigation order after the specified sibling window. This means that when the user presses the TAB key on that other window, the focus switches to this window.

The default tab order is the same as creation order. This function and MoveBeforeInTabOrder allow to change it after creating all the windows.

Parameters:
win
           (type=Window)

MoveBeforeInTabOrder(self, win)

Same as MoveAfterInTabOrder except that it inserts this window just before win instead of putting it right after it.

Parameters:
win
           (type=Window)

MoveXY(self, x, y, flags=SIZE_USE_EXISTING)

Moves the window to the given position.

Parameters:
x
           (type=int)

y
           (type=int)

flags
           (type=int)

Navigate(self, flags=NavigationKeyEvent.IsForward)

Does keyboard navigation from this window to another, by sending a wx.NavigationKeyEvent.

One situation in which you may wish to call this method is from a text control custom keypress handler to do the default navigation behaviour for the tab key, since the standard default behaviour for a multiline text control with the wx.TE_PROCESS_TAB style is to insert a tab and not navigate to the next control.

Parameters:
flags - A combination of the IsForward or IsBackward and the WinChange values in the wx.NavigationKeyEvent class, which determine if the navigation should be in forward or reverse order, and if it should be able to cross parent window boundaries, such as between notebook pages or MDI child frames. Typically the status of the Shift key (for forward or backward) or the Control key (for WinChange) would be used to determine how to set the flags.
           (type=int)

Returns:
bool

PageDown(self)

This is just a wrapper for ScrollPages(1).

Returns:
bool

PageUp(self)

This is just a wrapper for ScrollPages(-1).

Returns:
bool

PopEventHandler(self, deleteHandler=False)

Removes and returns the top-most event handler on the event handler stack. If deleteHandler is True then the wx.EvtHandler object will be destroyed after it is popped, and None will be returned instead.

Parameters:
deleteHandler
           (type=bool)

Returns:
EvtHandler

PopupMenu(self, menu, pos=DefaultPosition)

Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usual. If the default position is given then the current position of the mouse cursor will be used.

Parameters:
menu
           (type=Menu)

pos
           (type=Point)

Returns:
bool

PopupMenuXY(self, menu, x=-1, y=-1)

Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usual. If the default position is given then the current position of the mouse cursor will be used.

Parameters:
menu
           (type=Menu)

x
           (type=int)

y
           (type=int)

Returns:
bool

PostCreate(self, pre)

Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.

PrepareDC(self, dc)

Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position.

Parameters:
dc
           (type=DC)

PushEventHandler(self, handler)

Pushes this event handler onto the event handler stack for the window. An event handler is an object that is capable of processing the events sent to a window. (In other words, is able to dispatch the events to handler function.) By default, the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes.

wx.Window.PushEventHandler allows an application to set up a chain of event handlers, where an event not handled by one event handler is handed to the next one in the chain. Use wx.Window.PopEventHandler to remove the event handler. Ownership of the handler is not given to the window, so you should be sure to pop the handler before the window is destroyed and either let PopEventHandler destroy it, or call its Destroy method yourself.

Parameters:
handler
           (type=EvtHandler)

Raise(self)

Raises the window to the top of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.

Refresh(self, eraseBackground=True, rect=None)

Mark the specified rectangle (or the whole window) as "dirty" so it will be repainted. Causes an EVT_PAINT event to be generated and sent to the window.

Parameters:
eraseBackground
           (type=bool)

rect
           (type=Rect)

RefreshRect(self, rect, eraseBackground=True)

Redraws the contents of the given rectangle: the area inside it will be repainted. This is the same as Refresh but has a nicer syntax.

Parameters:
rect
           (type=Rect)

eraseBackground
           (type=bool)

RegisterHotKey(self, hotkeyId, modifiers, keycode)

Registers a system wide hotkey. Every time the user presses the hotkey registered here, this window will receive a hotkey event. It will receive the event even if the application is in the background and does not have the input focus because the user is working with some other application. To bind an event handler function to this hotkey use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the hotkey was registered successfully.

Parameters:
hotkeyId
           (type=int)

modifiers
           (type=int)

keycode
           (type=int)

Returns:
bool

ReleaseMouse(self)

Releases mouse input captured with wx.Window.CaptureMouse.

RemoveChild(self, child)

Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer.

Parameters:
child
           (type=Window)

RemoveEventHandler(self, handler)

Find the given handler in the event handler chain and remove (but not delete) it from the event handler chain, returns True if it was found and False otherwise (this also results in an assert failure so this function should only be called when the handler is supposed to be there.)

Parameters:
handler
           (type=EvtHandler)

Returns:
bool

Reparent(self, newParent)

Reparents the window, i.e the window will be removed from its current parent window (e.g. a non-standard toolbar in a wxFrame) and then re-inserted into another. Available on Windows and GTK. Returns True if the parent was changed, False otherwise (error or newParent == oldParent)

Parameters:
newParent
           (type=Window)

Returns:
bool

ScreenToClient(self, pt)

Converts from screen to client window coordinates.

Parameters:
pt
           (type=Point)

Returns:
Point

ScreenToClientXY(x, y)

Converts from screen to client window coordinates.

Parameters:
x
           (type=int)

y
           (type=int)

Returns:
(x,y)

ScrollLines(self, lines)

If the platform and window class supports it, scrolls the window by the given number of lines down, if lines is positive, or up if lines is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done.

Parameters:
lines
           (type=int)

Returns:
bool

ScrollPages(self, pages)

If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done.

Parameters:
pages
           (type=int)

Returns:
bool

ScrollWindow(self, dx, dy, rect=None)

Physically scrolls the pixels in the window and move child windows accordingly. Use this function to optimise your scrolling implementations, to minimise the area that must be redrawn. Note that it is rarely required to call this function from a user program.

Parameters:
dx - Amount to scroll horizontally.
           (type=int)

dy - Amount to scroll vertically.
           (type=int)

rect - Rectangle to invalidate. If this is None, the whole window is invalidated. If you pass a rectangle corresponding to the area of the window exposed by the scroll, your painting handler can optimize painting by checking for the invalidated region.
           (type=Rect)

SetAcceleratorTable(self, accel)

Sets the accelerator table for this window.

Parameters:
accel
           (type=AcceleratorTable)

SetAutoLayout(self, autoLayout)

Determines whether the Layout function will be called automatically when the window is resized. lease note that this only happens for the windows usually used to contain children, namely wx.Panel and wx.TopLevelWindow (and the classes deriving from them).

This method is called implicitly by SetSizer but if you use SetConstraints you should call it manually or otherwise the window layout won't be correctly updated when its size changes.

Parameters:
autoLayout
           (type=bool)

SetBackgroundColour(self, colour)

Sets the background colour of the window. Returns True if the colour was changed. The background colour is usually painted by the default EVT_ERASE_BACKGROUND event handler function under Windows and automatically under GTK. Using wx.NullColour will reset the window to the default background colour.

Note that setting the background colour may not cause an immediate refresh, so you may wish to call ClearBackground or Refresh after calling this function.

Using this function will disable attempts to use themes for this window, if the system supports them. Use with care since usually the themes represent the appearance chosen by the user to be used for all applications on the system.

Parameters:
colour
           (type=Colour)

Returns:
bool

SetBackgroundStyle(self, style)

Returns the background style of the window. The background style indicates how the background of the window is drawn.

wx.BG_STYLE_SYSTEM The background colour or pattern should be determined by the system
wx.BG_STYLE_COLOUR The background should be a solid colour
wx.BG_STYLE_CUSTOM The background will be implemented by the application.

On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of a custom background, such as a tiled bitmap. Currently the style has no effect on other platforms.

Parameters:
style
           (type=int)

Returns:
bool

See Also:

GetBackgroundStyle, SetBackgroundColour

SetBestFittingSize(*args, **kwargs)

Use SetInitialSize

SetCaret(self, caret)

Sets the caret associated with the window.

Parameters:
caret
           (type=Caret)

SetClientRect(self, rect)

This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example.

Parameters:
rect
           (type=Rect)

SetClientSize(self, size)

This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example.

Parameters:
size
           (type=Size)

SetClientSizeWH(self, width, height)

This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example.

Parameters:
width
           (type=int)

height
           (type=int)

SetConstraints(self, constraints)

Sets the window to have the given layout constraints. If an existing layout constraints object is already owned by the window, it will be deleted. Pass None to disassociate and delete the window's current constraints.

You must call SetAutoLayout to tell a window to use the constraints automatically in its default EVT_SIZE handler; otherwise, you must handle EVT_SIZE yourself and call Layout() explicitly. When setting both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have effect.

Parameters:
constraints
           (type=LayoutConstraints)

SetContainingSizer(self, sizer)

This normally does not need to be called by application code. It is called internally when a window is added to a sizer, and is used so the window can remove itself from the sizer when it is destroyed.

Parameters:
sizer
           (type=Sizer)

SetCursor(self, cursor)

Sets the window's cursor. Notice that the window cursor also sets it for the children of the window implicitly.

The cursor may be wx.NullCursor in which case the window cursor will be reset back to default.

Parameters:
cursor
           (type=Cursor)

Returns:
bool

SetDimensions(self, x, y, width, height, sizeFlags=SIZE_AUTO)

Sets the position and size of the window in pixels. The sizeFlags parameter indicates the interpretation of the other params if they are equal to -1.

wx.SIZE_AUTO A -1 indicates that a class-specific default should be used.
wx.SIZE_USE_EXISTING Axisting dimensions should be used if -1 values are supplied.
wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be interpreted as real dimensions, not default values.
Parameters:
x
           (type=int)

y
           (type=int)

width
           (type=int)

height
           (type=int)

sizeFlags
           (type=int)

SetDoubleBuffered(self, on)

Currently wxGTK2 only.

Parameters:
on
           (type=bool)

SetDropTarget(self, dropTarget)

Associates a drop target with this window. If the window already has a drop target, it is deleted.

Parameters:
dropTarget
           (type=DropTarget)

SetEventHandler(self, handler)

Sets the event handler for this window. An event handler is an object that is capable of processing the events sent to a window. (In other words, is able to dispatch the events to handler function.) By default, the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes.

It is usually better to use wx.Window.PushEventHandler since this sets up a chain of event handlers, where an event not handled by one event handler is handed off to the next one in the chain.

Parameters:
handler
           (type=EvtHandler)

SetExtraStyle(self, exStyle)

Sets the extra style bits for the window. Extra styles are the less often used style bits which can't be set with the constructor or with SetWindowStyleFlag()

Parameters:
exStyle
           (type=long)

SetFocus(self)

Set's the focus to this window, allowing it to receive keyboard input.

SetFocusFromKbd(self)

Set focus to this window as the result of a keyboard action. Normally only called internally.

SetFont(self, font)

Sets the font for this window.

Parameters:
font
           (type=Font)

Returns:
bool

SetForegroundColour(self, colour)

Sets the foreground colour of the window. Returns True is the colour was changed. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all.

Parameters:
colour
           (type=Colour)

Returns:
bool

SetHelpText(self, text)

Sets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current wx.HelpProvider implementation, and not in the window object itself.

Parameters:
text
           (type=String)

SetHelpTextForId(self, text)

Associate this help text with all windows with the same id as this one.

Parameters:
text
           (type=String)

SetId(self, winid)

Sets the identifier of the window. Each window has an integer identifier. If the application has not provided one, an identifier will be generated. Normally, the identifier should be provided on creation and should not be modified subsequently.

Parameters:
winid
           (type=int)

SetInitialSize(self, size=DefaultSize)

A 'Smart' SetSize that will fill in default size components with the window's best size values. Also set's the minsize for use with sizers.

Parameters:
size
           (type=Size)

SetLabel(self, label)

Set the text which the window shows in its label if applicable.

Parameters:
label
           (type=String)

SetLayoutDirection(self, dir)

Set the layout direction (LTR or RTL) for this window.

Parameters:
dir
           (type=int)

SetMaxSize(self, maxSize)

A more convenient method than SetSizeHints for setting just the max size.

Parameters:
maxSize
           (type=Size)

SetMinSize(self, minSize)

A more convenient method than SetSizeHints for setting just the min size.

Parameters:
minSize
           (type=Size)

SetName(self, name)

Sets the window's name. The window name is used for ressource setting in X, it is not the same as the window title/label

Parameters:
name
           (type=String)

SetPosition(self, pt, flags=SIZE_USE_EXISTING)

Moves the window to the given position.

Parameters:
pt
           (type=Point)

flags
           (type=int)

SetRect(self, rect, sizeFlags=SIZE_AUTO)

Sets the position and size of the window in pixels using a wx.Rect.

Parameters:
rect
           (type=Rect)

sizeFlags
           (type=int)

SetScrollbar(self, orientation, position, thumbSize, range, refresh=True)

Sets the scrollbar properties of a built-in scrollbar.
Parameters:
orientation - Determines the scrollbar whose page size is to be set. May be wx.HORIZONTAL or wx.VERTICAL.
           (type=int)

position - The position of the scrollbar in scroll units.
           (type=int)

thumbSize - The size of the thumb, or visible portion of the scrollbar, in scroll units.
           (type=int)

range - The maximum position of the scrollbar.
           (type=int)

refresh - True to redraw the scrollbar, false otherwise.
           (type=bool)

SetScrollPos(self, orientation, pos, refresh=True)

Sets the position of one of the built-in scrollbars.

Parameters:
orientation
           (type=int)

pos
           (type=int)

refresh
           (type=bool)

SetSize(self, size)

Sets the size of the window in pixels.

Parameters:
size
           (type=Size)

SetSizeHints(self, minW, minH, maxW=-1, maxH=-1, incW=-1, incH=-1)

Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the window outside the given bounds (if it is a top-level window.) Sizers will also inspect the minimum window size and will use that value if set when calculating layout.

The resizing increments are only significant under Motif or Xt.

Parameters:
minW
           (type=int)

minH
           (type=int)

maxW
           (type=int)

maxH
           (type=int)

incW
           (type=int)

incH
           (type=int)

See Also:

GetMinSize, GetMaxSize, SetMinSize, SetMaxSize

SetSizeHintsSz(self, minSize, maxSize=DefaultSize, incSize=DefaultSize)

Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the window outside the given bounds (if it is a top-level window.) Sizers will also inspect the minimum window size and will use that value if set when calculating layout.

The resizing increments are only significant under Motif or Xt.

Parameters:
minSize
           (type=Size)

maxSize
           (type=Size)

incSize
           (type=Size)

See Also:

GetMinSize, GetMaxSize, SetMinSize, SetMaxSize

SetSizer(self, sizer, deleteOld=True)

Sets the window to have the given layout sizer. The window will then own the object, and will take care of its deletion. If an existing layout sizer object is already owned by the window, it will be deleted if the deleteOld parameter is true. Note that this function will also call SetAutoLayout implicitly with a True parameter if the sizer is non-None, and False otherwise.

Parameters:
sizer
           (type=Sizer)

deleteOld
           (type=bool)

SetSizerAndFit(self, sizer, deleteOld=True)

The same as SetSizer, except it also sets the size hints for the window based on the sizer's minimum size.

Parameters:
sizer
           (type=Sizer)

deleteOld
           (type=bool)

SetSizeWH(self, width, height)

Sets the size of the window in pixels.

Parameters:
width
           (type=int)

height
           (type=int)

SetThemeEnabled(self, enableTheme)

This function tells a window if it should use the system's "theme"
code to draw the windows' background instead if its own background drawing code. This will only have an effect on platforms that support the notion of themes in user defined windows. One such platform is GTK+ where windows can have (very colourful) backgrounds defined by a user's selected theme.

Dialogs, notebook pages and the status bar have this flag set to true by default so that the default look and feel is simulated best.

Parameters:
enableTheme
           (type=bool)

SetToolTip(self, tip)

Attach a tooltip to the window.

Parameters:
tip
           (type=ToolTip)

SetToolTipString(self, tip)

Attach a tooltip to the window.

Parameters:
tip
           (type=String)

SetTransparent(self, alpha)

Attempt to set the transparency of this window to the alpha value, returns True on success. The alpha value is an integer in the range of 0 to 255, where 0 is fully transparent and 255 is fully opaque.

Parameters:
alpha
           (type=byte)

Returns:
bool

SetValidator(self, validator)

Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.

Parameters:
validator
           (type=Validator)

SetVirtualSize(self, size)

Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.

Parameters:
size
           (type=Size)

SetVirtualSizeHints(self, minW, minH, maxW=-1, maxH=-1)

Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds.

Parameters:
minW
           (type=int)

minH
           (type=int)

maxW
           (type=int)

maxH
           (type=int)

SetVirtualSizeHintsSz(self, minSize, maxSize=DefaultSize)

Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds.

Parameters:
minSize
           (type=Size)

maxSize
           (type=Size)

SetVirtualSizeWH(self, w, h)

Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.

Parameters:
w
           (type=int)

h
           (type=int)

SetWindowStyle(self, style)

Sets the style of the window. Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to take place immediately.

Parameters:
style
           (type=long)

SetWindowStyleFlag(self, style)

Sets the style of the window. Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to take place immediately.

Parameters:
style
           (type=long)

SetWindowVariant(self, variant)

Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac. Variant values are:

wx.WINDOW_VARIANT_NORMAL Normal size
wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal)
wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal)
wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal)
Parameters:
variant
           (type=int)

ShouldInheritColours(self)

Return true from here to allow the colours of this window to be changed by InheritAttributes, returning false forbids inheriting them from the parent window.

The base class version returns false, but this method is overridden in wxControl where it returns true.

Returns:
bool

Show(self, show=True)

Shows or hides the window. You may need to call Raise for a top level window if you want to bring it to top, although this is not needed if Show is called immediately after the frame creation. Returns True if the window has been shown or hidden or False if nothing was done because it already was in the requested state.

Parameters:
show
           (type=bool)

Returns:
bool

Thaw(self)

Reenables window updating after a previous call to Freeze. Calls to Freeze/Thaw may be nested, so Thaw must be called the same number of times that Freeze was before the window will be updated.

ToggleWindowStyle(self, flag)

Turn the flag on if it had been turned off before and vice versa, returns True if the flag is turned on by this function call.

Parameters:
flag
           (type=int)

Returns:
bool

TransferDataFromWindow(self)

Transfers values from child controls to data areas specified by their validators. Returns false if a transfer failed. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call TransferDataFromWindow() of all child windows.

Returns:
bool

TransferDataToWindow(self)

Transfers values to child controls from data areas specified by their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call TransferDataToWindow() of all child windows.

Returns:
bool

UnregisterHotKey(self, hotkeyId)

Unregisters a system wide hotkey.

Parameters:
hotkeyId
           (type=int)

Returns:
bool

Update(self)

Calling this method immediately repaints the invalidated area of the window instead of waiting for the EVT_PAINT event to happen, (normally this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and does nothing if the window has been already repainted. Use Refresh first if you want to immediately redraw the window (or some portion of it) unconditionally.

UpdateWindowUI(self, flags=UPDATE_UI_NONE)

This function sends EVT_UPDATE_UI events to the window. The particular implementation depends on the window; for example a wx.ToolBar will send an update UI event for each toolbar button, and a wx.Frame will send an update UI event for each menubar menu item. You can call this function from your application to ensure that your UI is up-to-date at a particular point in time (as far as your EVT_UPDATE_UI handlers are concerned). This may be necessary if you have called wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to limit the overhead that wxWindows incurs by sending update UI events in idle time. The flags should be a bitlist of one or more of the following values:

wx.UPDATE_UI_NONE No particular value
wx.UPDATE_UI_RECURSE Call the function for descendants
wx.UPDATE_UI_FROMIDLE Invoked from OnIdle

If you are calling this function from an OnIdle function, make sure you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to only update the UI elements that need to be updated in idle time. Some windows update their elements only when necessary, for example when a menu is about to be shown. The following is an example of how to call UpdateWindowUI from an idle function:

def OnIdle(self, evt):
    if wx.UpdateUIEvent.CanUpdate(self):
        self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE);
Parameters:
flags
           (type=long)

Validate(self)

Validates the current values of the child controls using their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call Validate() of all child windows. Returns false if any of the validations failed.

Returns:
bool

WarpPointer(self, x, y)

Moves the pointer to the given position on the window.

NOTE: This function is not supported under Mac because Apple Human Interface Guidelines forbid moving the mouse cursor programmatically.

Parameters:
x
           (type=int)

y
           (type=int)


Static Method Details

FindFocus()

Returns the window or control that currently has the keyboard focus, or None.

Returns:
Window

GetCapture()

Returns the window which currently captures the mouse or None

Returns:
Window

GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See wx.Window.SetWindowVariant for more about this.

Parameters:
variant
           (type=int)

Returns:
VisualAttributes

NewControlId()

Generate a control id for the controls which were not given one.

Returns:
int

NextControlId(winid)

Get the id of the control following the one with the given autogenerated) id

Parameters:
winid
           (type=int)

Returns:
int

PrevControlId(winid)

Get the id of the control preceding the one with the given autogenerated) id

Parameters:
winid
           (type=int)

Returns:
int

Property Details

AcceleratorTable

See GetAcceleratorTable and SetAcceleratorTable

Get Method:
GetAcceleratorTable(self)
Set Method:
SetAcceleratorTable(self, accel)

AutoLayout

See GetAutoLayout and SetAutoLayout

Get Method:
GetAutoLayout(self)
Set Method:
SetAutoLayout(self, autoLayout)

BackgroundColour

See GetBackgroundColour and SetBackgroundColour

Get Method:
GetBackgroundColour(self)
Set Method:
SetBackgroundColour(self, colour)

BackgroundStyle

See GetBackgroundStyle and SetBackgroundStyle

Get Method:
GetBackgroundStyle(self)
Set Method:
SetBackgroundStyle(self, style)

BestSize

See GetBestSize

Get Method:
GetBestSize(self)

BestVirtualSize

See GetBestVirtualSize

Get Method:
GetBestVirtualSize(self)

Border

See GetBorder

Get Method:
GetBorder(self, flags)

Caret

See GetCaret and SetCaret

Get Method:
GetCaret(self)
Set Method:
SetCaret(self, caret)

CharHeight

See GetCharHeight

Get Method:
GetCharHeight(self)

CharWidth

See GetCharWidth

Get Method:
GetCharWidth(self)

Children

See GetChildren

Get Method:
GetChildren(self)

ClientAreaOrigin

See GetClientAreaOrigin

Get Method:
GetClientAreaOrigin(self)

ClientRect

See GetClientRect and SetClientRect

Get Method:
GetClientRect(self)
Set Method:
SetClientRect(self, rect)

ClientSize

See GetClientSize and SetClientSize

Get Method:
GetClientSize(self)
Set Method:
SetClientSize(self, size)

Constraints

See GetConstraints and SetConstraints

Get Method:
GetConstraints(self)
Set Method:
SetConstraints(self, constraints)

ContainingSizer

See GetContainingSizer and SetContainingSizer

Get Method:
GetContainingSizer(self)
Set Method:
SetContainingSizer(self, sizer)

Cursor

See GetCursor and SetCursor

Get Method:
GetCursor(self)
Set Method:
SetCursor(self, cursor)

DefaultAttributes

See GetDefaultAttributes

Get Method:
GetDefaultAttributes(self)

DropTarget

See GetDropTarget and SetDropTarget

Get Method:
GetDropTarget(self)
Set Method:
SetDropTarget(self, dropTarget)

EffectiveMinSize

See GetEffectiveMinSize

Get Method:
GetEffectiveMinSize(self)

Enabled

See IsEnabled and Enable

Get Method:
IsEnabled(self)
Set Method:
Enable(self, enable)

EventHandler

See GetEventHandler and SetEventHandler

Get Method:
GetEventHandler(self)
Set Method:
SetEventHandler(self, handler)

ExtraStyle

See GetExtraStyle and SetExtraStyle

Get Method:
GetExtraStyle(self)
Set Method:
SetExtraStyle(self, exStyle)

Font

See GetFont and SetFont

Get Method:
GetFont(self)
Set Method:
SetFont(self, font)

ForegroundColour

See GetForegroundColour and SetForegroundColour

Get Method:
GetForegroundColour(self)
Set Method:
SetForegroundColour(self, colour)

GrandParent

See GetGrandParent

Get Method:
GetGrandParent(self)

Handle

See GetHandle

Get Method:
GetHandle(self)

HelpText

See GetHelpText and SetHelpText

Get Method:
GetHelpText(self)
Set Method:
SetHelpText(self, text)

Id

See GetId and SetId

Get Method:
GetId(self)
Set Method:
SetId(self, winid)

Label

See GetLabel and SetLabel

Get Method:
GetLabel(self)
Set Method:
SetLabel(self, label)

LayoutDirection

See GetLayoutDirection and SetLayoutDirection

Get Method:
GetLayoutDirection(self)
Set Method:
SetLayoutDirection(self, dir)

MaxHeight

See GetMaxHeight

Get Method:
GetMaxHeight(self)

MaxSize

See GetMaxSize and SetMaxSize

Get Method:
GetMaxSize(self)
Set Method:
SetMaxSize(self, maxSize)

MaxWidth

See GetMaxWidth

Get Method:
GetMaxWidth(self)

MinHeight

See GetMinHeight

Get Method:
GetMinHeight(self)

MinSize

See GetMinSize and SetMinSize

Get Method:
GetMinSize(self)
Set Method:
SetMinSize(self, minSize)

MinWidth

See GetMinWidth

Get Method:
GetMinWidth(self)

Name

See GetName and SetName

Get Method:
GetName(self)
Set Method:
SetName(self, name)

Parent

See GetParent

Get Method:
GetParent(self)

Position

See GetPosition and SetPosition

Get Method:
GetPosition(self)
Set Method:
Move(self, pt, flags)

Rect

See GetRect and SetRect

Get Method:
GetRect(self)
Set Method:
SetRect(self, rect, sizeFlags)

ScreenPosition

See GetScreenPosition

Get Method:
GetScreenPosition(self)

ScreenRect

See GetScreenRect

Get Method:
GetScreenRect(self)

Shown

See IsShown and Show

Get Method:
IsShown(self)
Set Method:
Show(self, show)

Size

See GetSize and SetSize

Get Method:
GetSize(self)
Set Method:
SetSize(self, size)

Sizer

See GetSizer and SetSizer

Get Method:
GetSizer(self)
Set Method:
SetSizer(self, sizer, deleteOld)

ThemeEnabled

See GetThemeEnabled and SetThemeEnabled

Get Method:
GetThemeEnabled(self)
Set Method:
SetThemeEnabled(self, enableTheme)

thisown

The membership flag

ToolTip

See GetToolTip and SetToolTip

Get Method:
GetToolTip(self)
Set Method:
SetToolTip(self, tip)

TopLevel

See IsTopLevel

Get Method:
IsTopLevel(self)

TopLevelParent

See GetTopLevelParent

Get Method:
GetTopLevelParent(self)

UpdateClientRect

See GetUpdateClientRect

Get Method:
GetUpdateClientRect(self)

UpdateRegion

See GetUpdateRegion

Get Method:
GetUpdateRegion(self)

Validator

See GetValidator and SetValidator

Get Method:
GetValidator(self)
Set Method:
SetValidator(self, validator)

VirtualSize

See GetVirtualSize and SetVirtualSize

Get Method:
GetVirtualSize(self)
Set Method:
SetVirtualSize(self, size)

WindowStyle

See GetWindowStyle and SetWindowStyle

Get Method:
GetWindowStyleFlag(self)
Set Method:
SetWindowStyleFlag(self, style)

WindowStyleFlag

See GetWindowStyleFlag and SetWindowStyleFlag

Get Method:
GetWindowStyleFlag(self)
Set Method:
SetWindowStyleFlag(self, style)

WindowVariant

See GetWindowVariant and SetWindowVariant

Get Method:
GetWindowVariant(self)
Set Method:
SetWindowVariant(self, variant)

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:10:25 2007 http://epydoc.sf.net