data_panel

sans.guiframe.data_panel

This module provides Graphic interface for the data_manager module.

class sans.guiframe.data_panel.DataDialog(data_list, parent=None, text='', *args, **kwds)

Bases: wx._windows.Dialog

Allow file selection at loading time

AcceleratorTable

See GetAcceleratorTable and SetAcceleratorTable

AcceptsFocus(*args, **kwargs)

AcceptsFocus(self) -> bool

Can this window have focus?

AcceptsFocusFromKeyboard(*args, **kwargs)

AcceptsFocusFromKeyboard(self) -> bool

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(*args, **kwargs)

AddChild(self, Window child)

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

AddPendingEvent(*args, **kwargs)

AddPendingEvent(self, Event event)

AdjustForLayoutDirection(*args, **kwargs)

AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int

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

AffirmativeId

See GetAffirmativeId and SetAffirmativeId

AssociateHandle(*args, **kwargs)

AssociateHandle(self, long handle)

Associate the window with a new native handle

AutoLayout

See GetAutoLayout and SetAutoLayout

BackgroundColour

See GetBackgroundColour and SetBackgroundColour

BackgroundStyle

See GetBackgroundStyle and SetBackgroundStyle

BestSize

See GetBestSize

BestVirtualSize

See GetBestVirtualSize

Bind(event, handler, source=None, id=-1, id2=-1)

Bind an event to an event handler.

Parameters:
  • event – One of the EVT_* objects that specifies the type of event to bind,
  • handler – A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.
  • source – Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.
  • id – Used to spcify the event source by ID instead of instance.
  • id2 – Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.
Border

See GetBorder

CacheBestSize(*args, **kwargs)

CacheBestSize(self, Size size)

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

CanSetTransparent(*args, **kwargs)

CanSetTransparent(self) -> bool

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.

CaptureMouse(*args, **kwargs)

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.

Caret

See GetCaret and SetCaret

Center(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CenterOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

CenterOnScreen(*args, **kwargs)

CenterOnScreen(self, int dir=BOTH)

Center the window on screen

Centre(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CentreOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

CentreOnScreen(*args, **kwargs)

CenterOnScreen(self, int dir=BOTH)

Center the window on screen

CharHeight

See GetCharHeight

CharWidth

See GetCharWidth

Children

See GetChildren

ClassName

See GetClassName

ClearBackground(*args, **kwargs)

ClearBackground(self)

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

ClientAreaOrigin

See GetClientAreaOrigin

ClientRect

See GetClientRect and SetClientRect

ClientSize

See GetClientSize and SetClientSize

ClientToScreen(*args, **kwargs)

ClientToScreen(self, Point pt) -> Point

Converts to screen coordinates from coordinates relative to this window.

ClientToScreenXY(*args, **kwargs)

ClientToScreenXY(int x, int y) -> (x,y)

Converts to screen coordinates from coordinates relative to this window.

ClientToWindowSize(*args, **kwargs)

ClientToWindowSize(self, Size size) -> Size

Close(*args, **kwargs)

Close(self, bool force=False) -> bool

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.

Connect(*args, **kwargs)

Connect(self, int id, int lastId, int eventType, PyObject func)

Constraints

See GetConstraints and SetConstraints

ContainingSizer

See GetContainingSizer and SetContainingSizer

ConvertDialogPointToPixels(*args, **kwargs)

ConvertDialogPointToPixels(self, Point pt) -> Point

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.

ConvertDialogSizeToPixels(*args, **kwargs)

ConvertDialogSizeToPixels(self, Size sz) -> Size

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.

ConvertPixelPointToDialog(*args, **kwargs)

ConvertPixelPointToDialog(self, Point pt) -> Point

ConvertPixelSizeToDialog(*args, **kwargs)

ConvertPixelSizeToDialog(self, Size sz) -> Size

Create(*args, **kwargs)
Create(self, Window parent, int id=-1, String title=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, String name=DialogNameStr) -> bool
CreateButtonSizer(flags, *ignored)
CreateSeparatedButtonSizer(*args, **kwargs)

CreateSeparatedButtonSizer(self, long flags) -> Sizer

CreateStdDialogButtonSizer(*args, **kwargs)

CreateStdDialogButtonSizer(self, long flags) -> StdDialogButtonSizer

CreateTextSizer(*args, **kwargs)

CreateTextSizer(self, String message) -> Sizer

Cursor

See GetCursor and SetCursor

DLG_PNT(*args, **kwargs)

DLG_PNT(self, Point pt) -> Point

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.

DLG_SZE(*args, **kwargs)

DLG_SZE(self, Size sz) -> Size

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.

DefaultAttributes

See GetDefaultAttributes

DefaultItem

See GetDefaultItem and SetDefaultItem

Destroy(*args, **kwargs)

Destroy(self) -> bool

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.

DestroyChildren(*args, **kwargs)

DestroyChildren(self) -> bool

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

Disable(*args, **kwargs)

Disable(self) -> bool

Disables the window, same as Enable(false).

Disconnect(*args, **kwargs)
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL,
PyObject func=None) -> bool
DissociateHandle(*args, **kwargs)

DissociateHandle(self)

Dissociate the current native handle from the window

DragAcceptFiles(*args, **kwargs)

DragAcceptFiles(self, bool accept)

Enables or disables eligibility for drop file events, EVT_DROP_FILES.

DropTarget

See GetDropTarget and SetDropTarget

EffectiveMinSize

See GetEffectiveMinSize

Enable(*args, **kwargs)

Enable(self, bool enable=True) -> bool

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.

EnableCloseButton(*args, **kwargs)

EnableCloseButton(self, bool enable) -> bool

Enabled

See IsEnabled and Enable

EndModal(*args, **kwargs)

EndModal(self, int retCode)

EscapeId

See GetEscapeId and SetEscapeId

EventHandler

See GetEventHandler and SetEventHandler

EvtHandlerEnabled

See GetEvtHandlerEnabled and SetEvtHandlerEnabled

ExtraStyle

See GetExtraStyle and SetExtraStyle

static FindFocus(*args, **kwargs)

FindFocus() -> Window

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

FindWindowById(*args, **kwargs)

FindWindowById(self, long winid) -> Window

Find a child of this window by window ID

FindWindowByLabel(*args, **kwargs)

FindWindowByLabel(self, String label) -> Window

Find a child of this window by label

FindWindowByName(*args, **kwargs)

FindWindowByName(self, String name) -> Window

Find a child of this window by name

Fit(*args, **kwargs)

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(*args, **kwargs)

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.

Font

See GetFont and SetFont

ForegroundColour

See GetForegroundColour and SetForegroundColour

Freeze(*args, **kwargs)

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(*args, **kwargs)

GetAcceleratorTable(self) -> AcceleratorTable

Gets the accelerator table for this window.

GetAdjustedBestSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetAffirmativeId(*args, **kwargs)

GetAffirmativeId(self) -> int

GetAutoLayout(*args, **kwargs)

GetAutoLayout(self) -> bool

Returns the current autoLayout setting

GetBackgroundColour(*args, **kwargs)

GetBackgroundColour(self) -> Colour

Returns the background colour of the window.

GetBackgroundStyle(*args, **kwargs)

GetBackgroundStyle(self) -> int

Returns the background style of the window.

See :SetBackgroundStyle
GetBestFittingSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetBestSize(*args, **kwargs)

GetBestSize(self) -> Size

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestSizeTuple(*args, **kwargs)

GetBestSizeTuple() -> (width, height)

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestVirtualSize(*args, **kwargs)

GetBestVirtualSize(self) -> Size

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

GetBorder(*args)

GetBorder(self, long flags) -> int GetBorder(self) -> int

Get border for the flags of this window

static GetCapture(*args, **kwargs)

GetCapture() -> Window

Returns the window which currently captures the mouse or None

GetCaret(*args, **kwargs)

GetCaret(self) -> Caret

Returns the caret associated with the window.

GetCharHeight(*args, **kwargs)

GetCharHeight(self) -> int

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

GetCharWidth(*args, **kwargs)

GetCharWidth(self) -> int

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

GetChildren(*args, **kwargs)

GetChildren(self) -> WindowList

Returns an object containing a list of the window’s children. The object provides a Python sequence-like interface over the internal list maintained by the window..

static GetClassDefaultAttributes(*args, **kwargs)

GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes

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.

GetClassName(*args, **kwargs)

GetClassName(self) -> String

Returns the class name of the C++ class using wxRTTI.

GetClientAreaOrigin(*args, **kwargs)

GetClientAreaOrigin(self) -> Point

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

GetClientRect(*args, **kwargs)

GetClientRect(self) -> Rect

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

GetClientSize(*args, **kwargs)

GetClientSize(self) -> Size

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.

GetClientSizeTuple(*args, **kwargs)

GetClientSizeTuple() -> (width, height)

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.

GetConstraints(*args, **kwargs)

GetConstraints(self) -> LayoutConstraints

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

GetContainingSizer(*args, **kwargs)

GetContainingSizer(self) -> Sizer

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

GetCursor(*args, **kwargs)

GetCursor(self) -> Cursor

Return the cursor associated with this window.

GetDefaultAttributes(*args, **kwargs)

GetDefaultAttributes(self) -> VisualAttributes

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.

GetDefaultItem(*args, **kwargs)

GetDefaultItem(self) -> Window

Get the default child of this parent, i.e. the one which is activated by pressing <Enter> such as the OK button on a wx.Dialog.

GetDropTarget(*args, **kwargs)

GetDropTarget(self) -> DropTarget

Returns the associated drop target, which may be None.

GetEffectiveMinSize(*args, **kwargs)

GetEffectiveMinSize(self) -> Size

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.

GetEscapeId(*args, **kwargs)

GetEscapeId(self) -> int

GetEventHandler(*args, **kwargs)

GetEventHandler(self) -> EvtHandler

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

GetEvtHandlerEnabled(*args, **kwargs)

GetEvtHandlerEnabled(self) -> bool

GetExtraStyle(*args, **kwargs)

GetExtraStyle(self) -> long

Returns the extra style bits for the window.

GetFont(*args, **kwargs)

GetFont(self) -> Font

Returns the default font used for this window.

GetForegroundColour(*args, **kwargs)

GetForegroundColour(self) -> Colour

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.

GetFullTextExtent(*args, **kwargs)
GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)

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

GetGrandParent(*args, **kwargs)

GetGrandParent(self) -> Window

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

GetGtkWidget(*args, **kwargs)

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

GetHandle(*args, **kwargs)

GetHandle(self) -> long

Returns the platform-specific handle (as a long integer) of the physical window. On wxMSW this is the win32 window handle, on wxGTK it is the XWindow ID, and on wxMac it is the ControlRef.

GetHelpText(*args, **kwargs)

GetHelpText(self) -> String

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.

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

GetIcon(*args, **kwargs)

GetIcon(self) -> Icon

GetId(*args, **kwargs)

GetId(self) -> int

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.

GetLabel(*args, **kwargs)

GetLabel(self) -> String

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.

GetLayoutDirection(*args, **kwargs)

GetLayoutDirection(self) -> int

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

GetMaxHeight(*args, **kwargs)

GetMaxHeight(self) -> int

GetMaxSize(*args, **kwargs)

GetMaxSize(self) -> Size

GetMaxWidth(*args, **kwargs)

GetMaxWidth(self) -> int

GetMinHeight(*args, **kwargs)

GetMinHeight(self) -> int

GetMinSize(*args, **kwargs)

GetMinSize(self) -> Size

GetMinWidth(*args, **kwargs)

GetMinWidth(self) -> int

GetName(*args, **kwargs)

GetName(self) -> String

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.

GetNextHandler(*args, **kwargs)

GetNextHandler(self) -> EvtHandler

GetParent(*args, **kwargs)

GetParent(self) -> Window

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

GetPosition(*args, **kwargs)

GetPosition(self) -> Point

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.

GetPositionTuple(*args, **kwargs)

GetPositionTuple() -> (x,y)

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.

GetPreviousHandler(*args, **kwargs)

GetPreviousHandler(self) -> EvtHandler

GetRect(*args, **kwargs)

GetRect(self) -> Rect

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

GetReturnCode(*args, **kwargs)

GetReturnCode(self) -> int

GetScreenPosition(*args, **kwargs)

GetScreenPosition(self) -> Point

Get the position of the window in screen coordinantes.

GetScreenPositionTuple(*args, **kwargs)

GetScreenPositionTuple() -> (x,y)

Get the position of the window in screen coordinantes.

GetScreenRect(*args, **kwargs)

GetScreenRect(self) -> Rect

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

GetScrollPos(*args, **kwargs)

GetScrollPos(self, int orientation) -> int

Returns the built-in scrollbar position.

GetScrollRange(*args, **kwargs)

GetScrollRange(self, int orientation) -> int

Returns the built-in scrollbar range.

GetScrollThumb(*args, **kwargs)

GetScrollThumb(self, int orientation) -> int

Returns the built-in scrollbar thumb size.

GetSize(*args, **kwargs)

GetSize(self) -> Size

Get the window size.

GetSizeTuple(*args, **kwargs)

GetSizeTuple() -> (width, height)

Get the window size.

GetSizer(*args, **kwargs)

GetSizer(self) -> Sizer

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

GetTextExtent(*args, **kwargs)

GetTextExtent(String string) -> (width, height)

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

GetThemeEnabled(*args, **kwargs)

GetThemeEnabled(self) -> bool

Return the themeEnabled flag.

GetTitle(*args, **kwargs)

GetTitle(self) -> String

GetTmpDefaultItem(*args, **kwargs)

GetTmpDefaultItem(self) -> Window

Return the temporary default item, which can be None.

GetToolTip(*args, **kwargs)

GetToolTip(self) -> ToolTip

get the associated tooltip or None if none

GetTopLevelParent(*args, **kwargs)

GetTopLevelParent(self) -> Window

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

GetUpdateClientRect(*args, **kwargs)

GetUpdateClientRect(self) -> Rect

Get the update rectangle region bounding box in client coords.

GetUpdateRegion(*args, **kwargs)

GetUpdateRegion(self) -> Region

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

GetValidator(*args, **kwargs)

GetValidator(self) -> Validator

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

GetVirtualSize(*args, **kwargs)

GetVirtualSize(self) -> Size

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.

GetVirtualSizeTuple(*args, **kwargs)

GetVirtualSizeTuple() -> (width, height)

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.

GetWindowBorderSize(*args, **kwargs)

GetWindowBorderSize(self) -> Size

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

GetWindowStyle(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowStyleFlag(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowVariant(*args, **kwargs)

GetWindowVariant(self) -> int

GrandParent

See GetGrandParent

GtkWidget

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

Handle

See GetHandle

HasCapture(*args, **kwargs)

HasCapture(self) -> bool

Returns true if this window has the current mouse capture.

HasFlag(*args, **kwargs)

HasFlag(self, int flag) -> bool

Test if the given style is set for this window.

HasMultiplePages(*args, **kwargs)

HasMultiplePages(self) -> bool

HasScrollbar(*args, **kwargs)

HasScrollbar(self, int orient) -> bool

Does the window have the scrollbar for this orientation?

HasTransparentBackground(*args, **kwargs)

HasTransparentBackground(self) -> bool

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.

HelpText

See GetHelpText and SetHelpText

Hide(*args, **kwargs)

Hide(self) -> bool

Equivalent to calling Show(False).

HitTest(*args, **kwargs)

HitTest(self, Point pt) -> int

Test where the given (in client coords) point lies

HitTestXY(*args, **kwargs)

HitTestXY(self, int x, int y) -> int

Test where the given (in client coords) point lies

Icon

See GetIcon and SetIcon

Iconize(*args, **kwargs)

Iconize(self, bool iconize=True)

Id

See GetId and SetId

InheritAttributes(*args, **kwargs)

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.

InheritsBackgroundColour(*args, **kwargs)

InheritsBackgroundColour(self) -> bool

InitDialog(*args, **kwargs)

InitDialog(self)

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

InvalidateBestSize(*args, **kwargs)

InvalidateBestSize(self)

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

IsActive(*args, **kwargs)

IsActive(self) -> bool

IsAlwaysMaximized(*args, **kwargs)

IsAlwaysMaximized(self) -> bool

IsBeingDeleted(*args, **kwargs)

IsBeingDeleted(self) -> bool

Is the window in the process of being deleted?

IsDoubleBuffered(*args, **kwargs)

IsDoubleBuffered(self) -> bool

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.

IsEnabled(*args, **kwargs)

IsEnabled(self) -> bool

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

IsExposed(*args, **kwargs)

IsExposed(self, int x, int y, int w=1, int h=1) -> bool

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.

IsExposedPoint(*args, **kwargs)

IsExposedPoint(self, Point pt) -> bool

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.

IsExposedRect(*args, **kwargs)

IsExposedRect(self, Rect rect) -> bool

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.

IsFrozen(*args, **kwargs)

IsFrozen(self) -> bool

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

See :Freeze and Thaw
IsFullScreen(*args, **kwargs)

IsFullScreen(self) -> bool

IsIconized(*args, **kwargs)

IsIconized(self) -> bool

IsMaximized(*args, **kwargs)

IsMaximized(self) -> bool

IsModal(*args, **kwargs)

IsModal(self) -> bool

IsRetained(*args, **kwargs)

IsRetained(self) -> bool

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

IsSameAs(*args, **kwargs)

IsSameAs(self, Object p) -> bool

For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.

IsShown(*args, **kwargs)

IsShown(self) -> bool

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

IsShownOnScreen(*args, **kwargs)

IsShownOnScreen(self) -> bool

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.

IsTopLevel(*args, **kwargs)

IsTopLevel(self) -> bool

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

Label

See GetLabel and SetLabel

Layout(*args, **kwargs)

Layout(self) -> bool

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.

LayoutDirection

See GetLayoutDirection and SetLayoutDirection

LineDown(*args, **kwargs)

LineDown(self) -> bool

This is just a wrapper for ScrollLines(1).

LineUp(*args, **kwargs)

LineUp(self) -> bool

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

Lower(*args, **kwargs)

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.

MacGetMetalAppearance(*args, **kwargs)

MacGetMetalAppearance(self) -> bool

MacGetTopLevelWindowRef(*args, **kwargs)

MacGetTopLevelWindowRef(self) -> long

MacGetUnifiedAppearance(*args, **kwargs)

MacGetUnifiedAppearance(self) -> bool

MacSetMetalAppearance(*args, **kwargs)

MacSetMetalAppearance(self, bool on)

MakeModal(*args, **kwargs)

MakeModal(self, bool 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.

MaxHeight

See GetMaxHeight

MaxSize

See GetMaxSize and SetMaxSize

MaxWidth

See GetMaxWidth

Maximize(*args, **kwargs)

Maximize(self, bool maximize=True)

MinHeight

See GetMinHeight

MinSize

See GetMinSize and SetMinSize

MinWidth

See GetMinWidth

Move(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

MoveAfterInTabOrder(*args, **kwargs)

MoveAfterInTabOrder(self, Window 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.

MoveBeforeInTabOrder(*args, **kwargs)

MoveBeforeInTabOrder(self, Window win)

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

MoveXY(*args, **kwargs)

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

Moves the window to the given position.

Name

See GetName and SetName

Navigate(*args, **kwargs)

Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool

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

static NewControlId(*args, **kwargs)

NewControlId() -> int

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

static NextControlId(*args, **kwargs)

NextControlId(int winid) -> int

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

NextHandler

See GetNextHandler and SetNextHandler

OnPaint(*args, **kwargs)

OnPaint(self, PaintEvent event)

PageDown(*args, **kwargs)

PageDown(self) -> bool

This is just a wrapper for ScrollPages(1).

PageUp(*args, **kwargs)

PageUp(self) -> bool

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

Parent

See GetParent

PopEventHandler(*args, **kwargs)

PopEventHandler(self, bool deleteHandler=False) -> EvtHandler

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.

PopupMenu(*args, **kwargs)

PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool

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.

PopupMenuXY(*args, **kwargs)

PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool

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.

Position

See GetPosition and SetPosition

PostCreate(pre)

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

PrepareDC(*args, **kwargs)

PrepareDC(self, DC 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.

static PrevControlId(*args, **kwargs)

PrevControlId(int winid) -> int

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

PreviousHandler

See GetPreviousHandler and SetPreviousHandler

ProcessEvent(*args, **kwargs)

ProcessEvent(self, Event event) -> bool

ProcessPendingEvents(*args, **kwargs)

ProcessPendingEvents(self)

PushEventHandler(*args, **kwargs)

PushEventHandler(self, EvtHandler 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 a 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.

Raise(*args, **kwargs)

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.

Rect

See GetRect and SetRect

Refresh(*args, **kwargs)

Refresh(self, bool eraseBackground=True, Rect 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.

RefreshRect(*args, **kwargs)

RefreshRect(self, Rect rect, bool 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.

RegisterHotKey(*args, **kwargs)

RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool

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.

ReleaseMouse(*args, **kwargs)

ReleaseMouse(self)

Releases mouse input captured with wx.Window.CaptureMouse.

RemoveChild(*args, **kwargs)

RemoveChild(self, Window child)

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

RemoveEventHandler(*args, **kwargs)

RemoveEventHandler(self, EvtHandler handler) -> bool

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

Reparent(*args, **kwargs)

Reparent(self, Window newParent) -> bool

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)

RequestUserAttention(*args, **kwargs)

RequestUserAttention(self, int flags=USER_ATTENTION_INFO)

Restore(*args, **kwargs)

Restore(self)

ReturnCode

See GetReturnCode and SetReturnCode

ScreenPosition

See GetScreenPosition

ScreenRect

See GetScreenRect

ScreenToClient(*args, **kwargs)

ScreenToClient(self, Point pt) -> Point

Converts from screen to client window coordinates.

ScreenToClientXY(*args, **kwargs)

ScreenToClientXY(int x, int y) -> (x,y)

Converts from screen to client window coordinates.

ScrollLines(*args, **kwargs)

ScrollLines(self, int lines) -> bool

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.

ScrollPages(*args, **kwargs)

ScrollPages(self, int pages) -> bool

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.

ScrollWindow(*args, **kwargs)

ScrollWindow(self, int dx, int dy, Rect 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.

SendSizeEvent()
SetAcceleratorTable(*args, **kwargs)

SetAcceleratorTable(self, AcceleratorTable accel)

Sets the accelerator table for this window.

SetAffirmativeId(*args, **kwargs)

SetAffirmativeId(self, int affirmativeId)

SetAutoLayout(*args, **kwargs)

SetAutoLayout(self, bool 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.

SetBackgroundColour(*args, **kwargs)

SetBackgroundColour(self, Colour colour) -> bool

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.

SetBackgroundStyle(*args, **kwargs)

SetBackgroundStyle(self, int style) -> bool

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.

See :GetBackgroundStyle, SetBackgroundColour
SetBestFittingSize(*args, **kwargs)

Use SetInitialSize

SetCaret(*args, **kwargs)

SetCaret(self, Caret caret)

Sets the caret associated with the window.

SetClientRect(*args, **kwargs)

SetClientRect(self, Rect 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.

SetClientSize(*args, **kwargs)

SetClientSize(self, Size 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.

SetClientSizeWH(*args, **kwargs)

SetClientSizeWH(self, int width, int 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.

SetConstraints(*args, **kwargs)

SetConstraints(self, LayoutConstraints 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.

SetContainingSizer(*args, **kwargs)

SetContainingSizer(self, Sizer 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.

SetCursor(*args, **kwargs)

SetCursor(self, Cursor cursor) -> bool

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.

SetDefaultItem(*args, **kwargs)

SetDefaultItem(self, Window child) -> Window

Set this child as default, return the old default.

SetDimensions(*args, **kwargs)

SetDimensions(self, int x, int y, int width, int height, int 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 Existing 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.
SetDoubleBuffered(*args, **kwargs)

SetDoubleBuffered(self, bool on)

Put the native window into double buffered or composited mode.

SetDropTarget(*args, **kwargs)

SetDropTarget(self, DropTarget dropTarget)

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

SetEscapeId(*args, **kwargs)

SetEscapeId(self, int escapeId)

SetEventHandler(*args, **kwargs)

SetEventHandler(self, EvtHandler 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.

SetEvtHandlerEnabled(*args, **kwargs)

SetEvtHandlerEnabled(self, bool enabled)

SetExtraStyle(*args, **kwargs)

SetExtraStyle(self, long 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()

SetFocus(*args, **kwargs)

SetFocus(self)

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

SetFocusFromKbd(*args, **kwargs)

SetFocusFromKbd(self)

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

SetFont(*args, **kwargs)

SetFont(self, Font font) -> bool

Sets the font for this window.

SetForegroundColour(*args, **kwargs)

SetForegroundColour(self, Colour colour) -> bool

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.

SetHelpText(*args, **kwargs)

SetHelpText(self, String 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.

SetHelpTextForId(*args, **kwargs)

SetHelpTextForId(self, String text)

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

SetIcon(*args, **kwargs)

SetIcon(self, Icon icon)

SetIcons(*args, **kwargs)

SetIcons(self, wxIconBundle icons)

SetId(*args, **kwargs)

SetId(self, int 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.

SetInitialSize(*args, **kwargs)

SetInitialSize(self, Size 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.

SetLabel(*args, **kwargs)

SetLabel(self, String label)

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

SetLayoutDirection(*args, **kwargs)

SetLayoutDirection(self, int dir)

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

SetMaxSize(*args, **kwargs)

SetMaxSize(self, Size maxSize)

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

SetMinSize(*args, **kwargs)

SetMinSize(self, Size minSize)

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

SetName(*args, **kwargs)

SetName(self, String 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

SetNextHandler(*args, **kwargs)

SetNextHandler(self, EvtHandler handler)

SetOwnBackgroundColour(*args, **kwargs)

SetOwnBackgroundColour(self, Colour colour)

SetOwnFont(*args, **kwargs)

SetOwnFont(self, Font font)

SetOwnForegroundColour(*args, **kwargs)

SetOwnForegroundColour(self, Colour colour)

SetPosition(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

SetPreviousHandler(*args, **kwargs)

SetPreviousHandler(self, EvtHandler handler)

SetRect(*args, **kwargs)

SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)

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

SetReturnCode(*args, **kwargs)

SetReturnCode(self, int returnCode)

SetScrollPos(*args, **kwargs)

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

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

SetScrollbar(*args, **kwargs)
SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)

Sets the scrollbar properties of a built-in scrollbar.

SetShape(*args, **kwargs)

SetShape(self, Region region) -> bool

SetSize(*args, **kwargs)

SetSize(self, Size size)

Sets the size of the window in pixels.

SetSizeHints(*args, **kwargs)
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int 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.

SetSizeHintsSz(*args, **kwargs)

SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size 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.

SetSizeWH(*args, **kwargs)

SetSizeWH(self, int width, int height)

Sets the size of the window in pixels.

SetSizer(*args, **kwargs)

SetSizer(self, Sizer sizer, bool 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.

SetSizerAndFit(*args, **kwargs)

SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)

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

SetThemeEnabled(*args, **kwargs)

SetThemeEnabled(self, bool 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.

SetTitle(*args, **kwargs)

SetTitle(self, String title)

SetTmpDefaultItem(*args, **kwargs)

SetTmpDefaultItem(self, Window win)

Set this child as temporary default

SetToolTip(*args, **kwargs)

SetToolTip(self, ToolTip tip)

Attach a tooltip to the window.

SetToolTipString(*args, **kwargs)

SetToolTipString(self, String tip)

Attach a tooltip to the window.

SetTransparent(*args, **kwargs)

SetTransparent(self, byte alpha) -> bool

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.

SetValidator(*args, **kwargs)

SetValidator(self, Validator 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(*args, **kwargs)

SetVirtualSize(self, Size 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.

SetVirtualSizeHints(*args, **kwargs)

SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int 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.

SetVirtualSizeHintsSz(*args, **kwargs)

SetVirtualSizeHintsSz(self, Size minSize, Size 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.

SetVirtualSizeWH(*args, **kwargs)

SetVirtualSizeWH(self, int w, int 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.

SetWindowStyle(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowStyleFlag(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowVariant(*args, **kwargs)

SetWindowVariant(self, int variant)

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

ShouldInheritColours(*args, **kwargs)

ShouldInheritColours(self) -> bool

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.

Show(*args, **kwargs)

Show(self, bool show=True) -> bool

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.

ShowFullScreen(*args, **kwargs)

ShowFullScreen(self, bool show, long style=FULLSCREEN_ALL) -> bool

ShowModal(*args, **kwargs)

ShowModal(self) -> int

Shown

See IsShown and Show

Size

See GetSize and SetSize

Sizer

See GetSizer and SetSizer

Thaw(*args, **kwargs)

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.

ThemeEnabled

See GetThemeEnabled and SetThemeEnabled

Title

See GetTitle and SetTitle

TmpDefaultItem

See GetTmpDefaultItem and SetTmpDefaultItem

ToggleWindowStyle(*args, **kwargs)

ToggleWindowStyle(self, int flag) -> bool

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.

ToolTip

See GetToolTip and SetToolTip

TopLevel

See IsTopLevel

TopLevelParent

See GetTopLevelParent

TransferDataFromWindow(*args, **kwargs)

TransferDataFromWindow(self) -> bool

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.

TransferDataToWindow(*args, **kwargs)

TransferDataToWindow(self) -> bool

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.

Unbind(event, source=None, id=-1, id2=-1, handler=None)

Disconnects the event handler binding for event from self. Returns True if successful.

UnregisterHotKey(*args, **kwargs)

UnregisterHotKey(self, int hotkeyId) -> bool

Unregisters a system wide hotkey.

Update(*args, **kwargs)

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.

UpdateClientRect

See GetUpdateClientRect

UpdateRegion

See GetUpdateRegion

UpdateWindowUI(*args, **kwargs)

UpdateWindowUI(self, long 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.

UseBgCol(*args, **kwargs)

UseBgCol(self) -> bool

Validate(*args, **kwargs)

Validate(self) -> bool

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.

Validator

See GetValidator and SetValidator

VirtualSize

See GetVirtualSize and SetVirtualSize

WarpPointer(*args, **kwargs)

WarpPointer(self, int x, int 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.

WindowStyle

See GetWindowStyle and SetWindowStyle

WindowStyleFlag

See GetWindowStyleFlag and SetWindowStyleFlag

WindowToClientSize(*args, **kwargs)

WindowToClientSize(self, Size size) -> Size

WindowVariant

See GetWindowVariant and SetWindowVariant

get_data()

return the selected data

thisown

The membership flag

class sans.guiframe.data_panel.DataFrame(parent=None, owner=None, manager=None, size=(300, 800), list_of_perspective=[], list=[], *args, **kwds)

Bases: wx._windows.Frame

AcceleratorTable

See GetAcceleratorTable and SetAcceleratorTable

AcceptsFocus(*args, **kwargs)

AcceptsFocus(self) -> bool

Can this window have focus?

AcceptsFocusFromKeyboard(*args, **kwargs)

AcceptsFocusFromKeyboard(self) -> bool

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(*args, **kwargs)

AddChild(self, Window child)

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

AddPendingEvent(*args, **kwargs)

AddPendingEvent(self, Event event)

AdjustForLayoutDirection(*args, **kwargs)

AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int

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

AssociateHandle(*args, **kwargs)

AssociateHandle(self, long handle)

Associate the window with a new native handle

AutoLayout

See GetAutoLayout and SetAutoLayout

BackgroundColour

See GetBackgroundColour and SetBackgroundColour

BackgroundStyle

See GetBackgroundStyle and SetBackgroundStyle

BestSize

See GetBestSize

BestVirtualSize

See GetBestVirtualSize

Bind(event, handler, source=None, id=-1, id2=-1)

Bind an event to an event handler.

Parameters:
  • event – One of the EVT_* objects that specifies the type of event to bind,
  • handler – A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.
  • source – Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.
  • id – Used to spcify the event source by ID instead of instance.
  • id2 – Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.
Border

See GetBorder

CacheBestSize(*args, **kwargs)

CacheBestSize(self, Size size)

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

CanSetTransparent(*args, **kwargs)

CanSetTransparent(self) -> bool

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.

CaptureMouse(*args, **kwargs)

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.

Caret

See GetCaret and SetCaret

Center(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CenterOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

CenterOnScreen(*args, **kwargs)

CenterOnScreen(self, int dir=BOTH)

Center the window on screen

Centre(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CentreOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

CentreOnScreen(*args, **kwargs)

CenterOnScreen(self, int dir=BOTH)

Center the window on screen

CharHeight

See GetCharHeight

CharWidth

See GetCharWidth

Children

See GetChildren

ClassName

See GetClassName

ClearBackground(*args, **kwargs)

ClearBackground(self)

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

ClientAreaOrigin

See GetClientAreaOrigin

ClientRect

See GetClientRect and SetClientRect

ClientSize

See GetClientSize and SetClientSize

ClientToScreen(*args, **kwargs)

ClientToScreen(self, Point pt) -> Point

Converts to screen coordinates from coordinates relative to this window.

ClientToScreenXY(*args, **kwargs)

ClientToScreenXY(int x, int y) -> (x,y)

Converts to screen coordinates from coordinates relative to this window.

ClientToWindowSize(*args, **kwargs)

ClientToWindowSize(self, Size size) -> Size

Close(*args, **kwargs)

Close(self, bool force=False) -> bool

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.

Command(*args, **kwargs)

ProcessCommand(self, int winid) -> bool

Connect(*args, **kwargs)

Connect(self, int id, int lastId, int eventType, PyObject func)

Constraints

See GetConstraints and SetConstraints

ContainingSizer

See GetContainingSizer and SetContainingSizer

ConvertDialogPointToPixels(*args, **kwargs)

ConvertDialogPointToPixels(self, Point pt) -> Point

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.

ConvertDialogSizeToPixels(*args, **kwargs)

ConvertDialogSizeToPixels(self, Size sz) -> Size

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.

ConvertPixelPointToDialog(*args, **kwargs)

ConvertPixelPointToDialog(self, Point pt) -> Point

ConvertPixelSizeToDialog(*args, **kwargs)

ConvertPixelSizeToDialog(self, Size sz) -> Size

Create(*args, **kwargs)
Create(self, Window parent, int id=-1, String title=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool
CreateStatusBar(*args, **kwargs)
CreateStatusBar(self, int number=1, long style=DEFAULT_STATUSBAR_STYLE, int winid=0,
String name=StatusLineNameStr) -> StatusBar
CreateToolBar(*args, **kwargs)

CreateToolBar(self, long style=-1, int winid=-1, String name=ToolBarNameStr) -> wxToolBar

Cursor

See GetCursor and SetCursor

DLG_PNT(*args, **kwargs)

DLG_PNT(self, Point pt) -> Point

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.

DLG_SZE(*args, **kwargs)

DLG_SZE(self, Size sz) -> Size

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.

DefaultAttributes

See GetDefaultAttributes

DefaultItem

See GetDefaultItem and SetDefaultItem

Destroy(*args, **kwargs)

Destroy(self) -> bool

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.

DestroyChildren(*args, **kwargs)

DestroyChildren(self) -> bool

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

Disable(*args, **kwargs)

Disable(self) -> bool

Disables the window, same as Enable(false).

Disconnect(*args, **kwargs)
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL,
PyObject func=None) -> bool
DissociateHandle(*args, **kwargs)

DissociateHandle(self)

Dissociate the current native handle from the window

DoGiveHelp(*args, **kwargs)

DoGiveHelp(self, String text, bool show)

DoMenuUpdates(*args, **kwargs)

DoMenuUpdates(self, Menu menu=None)

DragAcceptFiles(*args, **kwargs)

DragAcceptFiles(self, bool accept)

Enables or disables eligibility for drop file events, EVT_DROP_FILES.

DropTarget

See GetDropTarget and SetDropTarget

EffectiveMinSize

See GetEffectiveMinSize

Enable(*args, **kwargs)

Enable(self, bool enable=True) -> bool

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.

EnableCloseButton(*args, **kwargs)

EnableCloseButton(self, bool enable) -> bool

Enabled

See IsEnabled and Enable

EventHandler

See GetEventHandler and SetEventHandler

EvtHandlerEnabled

See GetEvtHandlerEnabled and SetEvtHandlerEnabled

ExtraStyle

See GetExtraStyle and SetExtraStyle

static FindFocus(*args, **kwargs)

FindFocus() -> Window

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

FindWindowById(*args, **kwargs)

FindWindowById(self, long winid) -> Window

Find a child of this window by window ID

FindWindowByLabel(*args, **kwargs)

FindWindowByLabel(self, String label) -> Window

Find a child of this window by label

FindWindowByName(*args, **kwargs)

FindWindowByName(self, String name) -> Window

Find a child of this window by name

Fit(*args, **kwargs)

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(*args, **kwargs)

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.

Font

See GetFont and SetFont

ForegroundColour

See GetForegroundColour and SetForegroundColour

Freeze(*args, **kwargs)

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(*args, **kwargs)

GetAcceleratorTable(self) -> AcceleratorTable

Gets the accelerator table for this window.

GetAdjustedBestSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetAutoLayout(*args, **kwargs)

GetAutoLayout(self) -> bool

Returns the current autoLayout setting

GetBackgroundColour(*args, **kwargs)

GetBackgroundColour(self) -> Colour

Returns the background colour of the window.

GetBackgroundStyle(*args, **kwargs)

GetBackgroundStyle(self) -> int

Returns the background style of the window.

See :SetBackgroundStyle
GetBestFittingSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetBestSize(*args, **kwargs)

GetBestSize(self) -> Size

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestSizeTuple(*args, **kwargs)

GetBestSizeTuple() -> (width, height)

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestVirtualSize(*args, **kwargs)

GetBestVirtualSize(self) -> Size

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

GetBorder(*args)

GetBorder(self, long flags) -> int GetBorder(self) -> int

Get border for the flags of this window

static GetCapture(*args, **kwargs)

GetCapture() -> Window

Returns the window which currently captures the mouse or None

GetCaret(*args, **kwargs)

GetCaret(self) -> Caret

Returns the caret associated with the window.

GetCharHeight(*args, **kwargs)

GetCharHeight(self) -> int

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

GetCharWidth(*args, **kwargs)

GetCharWidth(self) -> int

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

GetChildren(*args, **kwargs)

GetChildren(self) -> WindowList

Returns an object containing a list of the window’s children. The object provides a Python sequence-like interface over the internal list maintained by the window..

static GetClassDefaultAttributes(*args, **kwargs)

GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes

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.

GetClassName(*args, **kwargs)

GetClassName(self) -> String

Returns the class name of the C++ class using wxRTTI.

GetClientAreaOrigin(*args, **kwargs)

GetClientAreaOrigin(self) -> Point

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

GetClientRect(*args, **kwargs)

GetClientRect(self) -> Rect

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

GetClientSize(*args, **kwargs)

GetClientSize(self) -> Size

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.

GetClientSizeTuple(*args, **kwargs)

GetClientSizeTuple() -> (width, height)

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.

GetConstraints(*args, **kwargs)

GetConstraints(self) -> LayoutConstraints

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

GetContainingSizer(*args, **kwargs)

GetContainingSizer(self) -> Sizer

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

GetCursor(*args, **kwargs)

GetCursor(self) -> Cursor

Return the cursor associated with this window.

GetDefaultAttributes(*args, **kwargs)

GetDefaultAttributes(self) -> VisualAttributes

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.

GetDefaultItem(*args, **kwargs)

GetDefaultItem(self) -> Window

Get the default child of this parent, i.e. the one which is activated by pressing <Enter> such as the OK button on a wx.Dialog.

GetDropTarget(*args, **kwargs)

GetDropTarget(self) -> DropTarget

Returns the associated drop target, which may be None.

GetEffectiveMinSize(*args, **kwargs)

GetEffectiveMinSize(self) -> Size

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.

GetEventHandler(*args, **kwargs)

GetEventHandler(self) -> EvtHandler

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

GetEvtHandlerEnabled(*args, **kwargs)

GetEvtHandlerEnabled(self) -> bool

GetExtraStyle(*args, **kwargs)

GetExtraStyle(self) -> long

Returns the extra style bits for the window.

GetFont(*args, **kwargs)

GetFont(self) -> Font

Returns the default font used for this window.

GetForegroundColour(*args, **kwargs)

GetForegroundColour(self) -> Colour

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.

GetFullTextExtent(*args, **kwargs)
GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)

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

GetGrandParent(*args, **kwargs)

GetGrandParent(self) -> Window

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

GetGtkWidget(*args, **kwargs)

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

GetHandle(*args, **kwargs)

GetHandle(self) -> long

Returns the platform-specific handle (as a long integer) of the physical window. On wxMSW this is the win32 window handle, on wxGTK it is the XWindow ID, and on wxMac it is the ControlRef.

GetHelpText(*args, **kwargs)

GetHelpText(self) -> String

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.

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

GetIcon(*args, **kwargs)

GetIcon(self) -> Icon

GetId(*args, **kwargs)

GetId(self) -> int

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.

GetLabel(*args, **kwargs)

GetLabel(self) -> String

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.

GetLayoutDirection(*args, **kwargs)

GetLayoutDirection(self) -> int

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

GetMaxHeight(*args, **kwargs)

GetMaxHeight(self) -> int

GetMaxSize(*args, **kwargs)

GetMaxSize(self) -> Size

GetMaxWidth(*args, **kwargs)

GetMaxWidth(self) -> int

GetMenuBar(*args, **kwargs)

GetMenuBar(self) -> MenuBar

GetMinHeight(*args, **kwargs)

GetMinHeight(self) -> int

GetMinSize(*args, **kwargs)

GetMinSize(self) -> Size

GetMinWidth(*args, **kwargs)

GetMinWidth(self) -> int

GetName(*args, **kwargs)

GetName(self) -> String

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.

GetNextHandler(*args, **kwargs)

GetNextHandler(self) -> EvtHandler

GetParent(*args, **kwargs)

GetParent(self) -> Window

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

GetPosition(*args, **kwargs)

GetPosition(self) -> Point

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.

GetPositionTuple(*args, **kwargs)

GetPositionTuple() -> (x,y)

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.

GetPreviousHandler(*args, **kwargs)

GetPreviousHandler(self) -> EvtHandler

GetRect(*args, **kwargs)

GetRect(self) -> Rect

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

GetScreenPosition(*args, **kwargs)

GetScreenPosition(self) -> Point

Get the position of the window in screen coordinantes.

GetScreenPositionTuple(*args, **kwargs)

GetScreenPositionTuple() -> (x,y)

Get the position of the window in screen coordinantes.

GetScreenRect(*args, **kwargs)

GetScreenRect(self) -> Rect

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

GetScrollPos(*args, **kwargs)

GetScrollPos(self, int orientation) -> int

Returns the built-in scrollbar position.

GetScrollRange(*args, **kwargs)

GetScrollRange(self, int orientation) -> int

Returns the built-in scrollbar range.

GetScrollThumb(*args, **kwargs)

GetScrollThumb(self, int orientation) -> int

Returns the built-in scrollbar thumb size.

GetSize(*args, **kwargs)

GetSize(self) -> Size

Get the window size.

GetSizeTuple(*args, **kwargs)

GetSizeTuple() -> (width, height)

Get the window size.

GetSizer(*args, **kwargs)

GetSizer(self) -> Sizer

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

GetStatusBar(*args, **kwargs)

GetStatusBar(self) -> StatusBar

GetStatusBarPane(*args, **kwargs)

GetStatusBarPane(self) -> int

GetTextExtent(*args, **kwargs)

GetTextExtent(String string) -> (width, height)

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

GetThemeEnabled(*args, **kwargs)

GetThemeEnabled(self) -> bool

Return the themeEnabled flag.

GetTitle(*args, **kwargs)

GetTitle(self) -> String

GetTmpDefaultItem(*args, **kwargs)

GetTmpDefaultItem(self) -> Window

Return the temporary default item, which can be None.

GetToolBar(*args, **kwargs)

GetToolBar(self) -> wxToolBar

GetToolTip(*args, **kwargs)

GetToolTip(self) -> ToolTip

get the associated tooltip or None if none

GetTopLevelParent(*args, **kwargs)

GetTopLevelParent(self) -> Window

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

GetUpdateClientRect(*args, **kwargs)

GetUpdateClientRect(self) -> Rect

Get the update rectangle region bounding box in client coords.

GetUpdateRegion(*args, **kwargs)

GetUpdateRegion(self) -> Region

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

GetValidator(*args, **kwargs)

GetValidator(self) -> Validator

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

GetVirtualSize(*args, **kwargs)

GetVirtualSize(self) -> Size

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.

GetVirtualSizeTuple(*args, **kwargs)

GetVirtualSizeTuple() -> (width, height)

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.

GetWindowBorderSize(*args, **kwargs)

GetWindowBorderSize(self) -> Size

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

GetWindowStyle(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowStyleFlag(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowVariant(*args, **kwargs)

GetWindowVariant(self) -> int

GrandParent

See GetGrandParent

GtkWidget

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

Handle

See GetHandle

HasCapture(*args, **kwargs)

HasCapture(self) -> bool

Returns true if this window has the current mouse capture.

HasFlag(*args, **kwargs)

HasFlag(self, int flag) -> bool

Test if the given style is set for this window.

HasMultiplePages(*args, **kwargs)

HasMultiplePages(self) -> bool

HasScrollbar(*args, **kwargs)

HasScrollbar(self, int orient) -> bool

Does the window have the scrollbar for this orientation?

HasTransparentBackground(*args, **kwargs)

HasTransparentBackground(self) -> bool

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.

HelpText

See GetHelpText and SetHelpText

Hide(*args, **kwargs)

Hide(self) -> bool

Equivalent to calling Show(False).

HitTest(*args, **kwargs)

HitTest(self, Point pt) -> int

Test where the given (in client coords) point lies

HitTestXY(*args, **kwargs)

HitTestXY(self, int x, int y) -> int

Test where the given (in client coords) point lies

Icon

See GetIcon and SetIcon

Iconize(*args, **kwargs)

Iconize(self, bool iconize=True)

Id

See GetId and SetId

InheritAttributes(*args, **kwargs)

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.

InheritsBackgroundColour(*args, **kwargs)

InheritsBackgroundColour(self) -> bool

InitDialog(*args, **kwargs)

InitDialog(self)

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

InvalidateBestSize(*args, **kwargs)

InvalidateBestSize(self)

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

IsActive(*args, **kwargs)

IsActive(self) -> bool

IsAlwaysMaximized(*args, **kwargs)

IsAlwaysMaximized(self) -> bool

IsBeingDeleted(*args, **kwargs)

IsBeingDeleted(self) -> bool

Is the window in the process of being deleted?

IsDoubleBuffered(*args, **kwargs)

IsDoubleBuffered(self) -> bool

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.

IsEnabled(*args, **kwargs)

IsEnabled(self) -> bool

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

IsExposed(*args, **kwargs)

IsExposed(self, int x, int y, int w=1, int h=1) -> bool

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.

IsExposedPoint(*args, **kwargs)

IsExposedPoint(self, Point pt) -> bool

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.

IsExposedRect(*args, **kwargs)

IsExposedRect(self, Rect rect) -> bool

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.

IsFrozen(*args, **kwargs)

IsFrozen(self) -> bool

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

See :Freeze and Thaw
IsFullScreen(*args, **kwargs)

IsFullScreen(self) -> bool

IsIconized(*args, **kwargs)

IsIconized(self) -> bool

IsMaximized(*args, **kwargs)

IsMaximized(self) -> bool

IsRetained(*args, **kwargs)

IsRetained(self) -> bool

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

IsSameAs(*args, **kwargs)

IsSameAs(self, Object p) -> bool

For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.

IsShown(*args, **kwargs)

IsShown(self) -> bool

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

IsShownOnScreen(*args, **kwargs)

IsShownOnScreen(self) -> bool

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.

IsTopLevel(*args, **kwargs)

IsTopLevel(self) -> bool

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

Label

See GetLabel and SetLabel

Layout(*args, **kwargs)

Layout(self) -> bool

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.

LayoutDirection

See GetLayoutDirection and SetLayoutDirection

LineDown(*args, **kwargs)

LineDown(self) -> bool

This is just a wrapper for ScrollLines(1).

LineUp(*args, **kwargs)

LineUp(self) -> bool

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

Lower(*args, **kwargs)

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.

MacGetMetalAppearance(*args, **kwargs)

MacGetMetalAppearance(self) -> bool

MacGetTopLevelWindowRef(*args, **kwargs)

MacGetTopLevelWindowRef(self) -> long

MacGetUnifiedAppearance(*args, **kwargs)

MacGetUnifiedAppearance(self) -> bool

MacSetMetalAppearance(*args, **kwargs)

MacSetMetalAppearance(self, bool on)

MakeModal(*args, **kwargs)

MakeModal(self, bool 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.

MaxHeight

See GetMaxHeight

MaxSize

See GetMaxSize and SetMaxSize

MaxWidth

See GetMaxWidth

Maximize(*args, **kwargs)

Maximize(self, bool maximize=True)

MenuBar

See GetMenuBar and SetMenuBar

MinHeight

See GetMinHeight

MinSize

See GetMinSize and SetMinSize

MinWidth

See GetMinWidth

Move(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

MoveAfterInTabOrder(*args, **kwargs)

MoveAfterInTabOrder(self, Window 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.

MoveBeforeInTabOrder(*args, **kwargs)

MoveBeforeInTabOrder(self, Window win)

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

MoveXY(*args, **kwargs)

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

Moves the window to the given position.

Name

See GetName and SetName

Navigate(*args, **kwargs)

Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool

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

static NewControlId(*args, **kwargs)

NewControlId() -> int

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

static NextControlId(*args, **kwargs)

NextControlId(int winid) -> int

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

NextHandler

See GetNextHandler and SetNextHandler

OnPaint(*args, **kwargs)

OnPaint(self, PaintEvent event)

PageDown(*args, **kwargs)

PageDown(self) -> bool

This is just a wrapper for ScrollPages(1).

PageUp(*args, **kwargs)

PageUp(self) -> bool

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

Parent

See GetParent

PopEventHandler(*args, **kwargs)

PopEventHandler(self, bool deleteHandler=False) -> EvtHandler

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.

PopStatusText(*args, **kwargs)

PopStatusText(self, int number=0)

PopupMenu(*args, **kwargs)

PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool

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.

PopupMenuXY(*args, **kwargs)

PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool

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.

Position

See GetPosition and SetPosition

PostCreate(pre)

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

PrepareDC(*args, **kwargs)

PrepareDC(self, DC 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.

static PrevControlId(*args, **kwargs)

PrevControlId(int winid) -> int

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

PreviousHandler

See GetPreviousHandler and SetPreviousHandler

ProcessCommand(*args, **kwargs)

ProcessCommand(self, int winid) -> bool

ProcessEvent(*args, **kwargs)

ProcessEvent(self, Event event) -> bool

ProcessPendingEvents(*args, **kwargs)

ProcessPendingEvents(self)

PushEventHandler(*args, **kwargs)

PushEventHandler(self, EvtHandler 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 a 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.

PushStatusText(*args, **kwargs)

PushStatusText(self, String text, int number=0)

Raise(*args, **kwargs)

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.

Rect

See GetRect and SetRect

Refresh(*args, **kwargs)

Refresh(self, bool eraseBackground=True, Rect 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.

RefreshRect(*args, **kwargs)

RefreshRect(self, Rect rect, bool 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.

RegisterHotKey(*args, **kwargs)

RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool

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.

ReleaseMouse(*args, **kwargs)

ReleaseMouse(self)

Releases mouse input captured with wx.Window.CaptureMouse.

RemoveChild(*args, **kwargs)

RemoveChild(self, Window child)

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

RemoveEventHandler(*args, **kwargs)

RemoveEventHandler(self, EvtHandler handler) -> bool

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

Reparent(*args, **kwargs)

Reparent(self, Window newParent) -> bool

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)

RequestUserAttention(*args, **kwargs)

RequestUserAttention(self, int flags=USER_ATTENTION_INFO)

Restore(*args, **kwargs)

Restore(self)

ScreenPosition

See GetScreenPosition

ScreenRect

See GetScreenRect

ScreenToClient(*args, **kwargs)

ScreenToClient(self, Point pt) -> Point

Converts from screen to client window coordinates.

ScreenToClientXY(*args, **kwargs)

ScreenToClientXY(int x, int y) -> (x,y)

Converts from screen to client window coordinates.

ScrollLines(*args, **kwargs)

ScrollLines(self, int lines) -> bool

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.

ScrollPages(*args, **kwargs)

ScrollPages(self, int pages) -> bool

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.

ScrollWindow(*args, **kwargs)

ScrollWindow(self, int dx, int dy, Rect 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.

SendSizeEvent(*args, **kwargs)

SendSizeEvent(self)

SetAcceleratorTable(*args, **kwargs)

SetAcceleratorTable(self, AcceleratorTable accel)

Sets the accelerator table for this window.

SetAutoLayout(*args, **kwargs)

SetAutoLayout(self, bool 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.

SetBackgroundColour(*args, **kwargs)

SetBackgroundColour(self, Colour colour) -> bool

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.

SetBackgroundStyle(*args, **kwargs)

SetBackgroundStyle(self, int style) -> bool

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.

See :GetBackgroundStyle, SetBackgroundColour
SetBestFittingSize(*args, **kwargs)

Use SetInitialSize

SetCaret(*args, **kwargs)

SetCaret(self, Caret caret)

Sets the caret associated with the window.

SetClientRect(*args, **kwargs)

SetClientRect(self, Rect 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.

SetClientSize(*args, **kwargs)

SetClientSize(self, Size 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.

SetClientSizeWH(*args, **kwargs)

SetClientSizeWH(self, int width, int 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.

SetConstraints(*args, **kwargs)

SetConstraints(self, LayoutConstraints 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.

SetContainingSizer(*args, **kwargs)

SetContainingSizer(self, Sizer 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.

SetCursor(*args, **kwargs)

SetCursor(self, Cursor cursor) -> bool

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.

SetDefaultItem(*args, **kwargs)

SetDefaultItem(self, Window child) -> Window

Set this child as default, return the old default.

SetDimensions(*args, **kwargs)

SetDimensions(self, int x, int y, int width, int height, int 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 Existing 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.
SetDoubleBuffered(*args, **kwargs)

SetDoubleBuffered(self, bool on)

Put the native window into double buffered or composited mode.

SetDropTarget(*args, **kwargs)

SetDropTarget(self, DropTarget dropTarget)

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

SetEventHandler(*args, **kwargs)

SetEventHandler(self, EvtHandler 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.

SetEvtHandlerEnabled(*args, **kwargs)

SetEvtHandlerEnabled(self, bool enabled)

SetExtraStyle(*args, **kwargs)

SetExtraStyle(self, long 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()

SetFocus(*args, **kwargs)

SetFocus(self)

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

SetFocusFromKbd(*args, **kwargs)

SetFocusFromKbd(self)

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

SetFont(*args, **kwargs)

SetFont(self, Font font) -> bool

Sets the font for this window.

SetForegroundColour(*args, **kwargs)

SetForegroundColour(self, Colour colour) -> bool

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.

SetHelpText(*args, **kwargs)

SetHelpText(self, String 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.

SetHelpTextForId(*args, **kwargs)

SetHelpTextForId(self, String text)

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

SetIcon(*args, **kwargs)

SetIcon(self, Icon icon)

SetIcons(*args, **kwargs)

SetIcons(self, wxIconBundle icons)

SetId(*args, **kwargs)

SetId(self, int 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.

SetInitialSize(*args, **kwargs)

SetInitialSize(self, Size 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.

SetLabel(*args, **kwargs)

SetLabel(self, String label)

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

SetLayoutDirection(*args, **kwargs)

SetLayoutDirection(self, int dir)

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

SetMaxSize(*args, **kwargs)

SetMaxSize(self, Size maxSize)

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

SetMenuBar(*args, **kwargs)

SetMenuBar(self, MenuBar menubar)

SetMinSize(*args, **kwargs)

SetMinSize(self, Size minSize)

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

SetName(*args, **kwargs)

SetName(self, String 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

SetNextHandler(*args, **kwargs)

SetNextHandler(self, EvtHandler handler)

SetOwnBackgroundColour(*args, **kwargs)

SetOwnBackgroundColour(self, Colour colour)

SetOwnFont(*args, **kwargs)

SetOwnFont(self, Font font)

SetOwnForegroundColour(*args, **kwargs)

SetOwnForegroundColour(self, Colour colour)

SetPosition(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

SetPreviousHandler(*args, **kwargs)

SetPreviousHandler(self, EvtHandler handler)

SetRect(*args, **kwargs)

SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)

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

SetScrollPos(*args, **kwargs)

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

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

SetScrollbar(*args, **kwargs)
SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)

Sets the scrollbar properties of a built-in scrollbar.

SetShape(*args, **kwargs)

SetShape(self, Region region) -> bool

SetSize(*args, **kwargs)

SetSize(self, Size size)

Sets the size of the window in pixels.

SetSizeHints(*args, **kwargs)
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int 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.

SetSizeHintsSz(*args, **kwargs)

SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size 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.

SetSizeWH(*args, **kwargs)

SetSizeWH(self, int width, int height)

Sets the size of the window in pixels.

SetSizer(*args, **kwargs)

SetSizer(self, Sizer sizer, bool 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.

SetSizerAndFit(*args, **kwargs)

SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)

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

SetStatusBar(*args, **kwargs)

SetStatusBar(self, StatusBar statBar)

SetStatusBarPane(*args, **kwargs)

SetStatusBarPane(self, int n)

SetStatusText(*args, **kwargs)

SetStatusText(self, String text, int number=0)

SetStatusWidths(*args, **kwargs)

SetStatusWidths(self, int widths)

SetThemeEnabled(*args, **kwargs)

SetThemeEnabled(self, bool 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.

SetTitle(*args, **kwargs)

SetTitle(self, String title)

SetTmpDefaultItem(*args, **kwargs)

SetTmpDefaultItem(self, Window win)

Set this child as temporary default

SetToolBar(*args, **kwargs)

SetToolBar(self, wxToolBar toolbar)

SetToolTip(*args, **kwargs)

SetToolTip(self, ToolTip tip)

Attach a tooltip to the window.

SetToolTipString(*args, **kwargs)

SetToolTipString(self, String tip)

Attach a tooltip to the window.

SetTransparent(*args, **kwargs)

SetTransparent(self, byte alpha) -> bool

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.

SetValidator(*args, **kwargs)

SetValidator(self, Validator 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(*args, **kwargs)

SetVirtualSize(self, Size 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.

SetVirtualSizeHints(*args, **kwargs)

SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int 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.

SetVirtualSizeHintsSz(*args, **kwargs)

SetVirtualSizeHintsSz(self, Size minSize, Size 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.

SetVirtualSizeWH(*args, **kwargs)

SetVirtualSizeWH(self, int w, int 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.

SetWindowStyle(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowStyleFlag(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowVariant(*args, **kwargs)

SetWindowVariant(self, int variant)

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

ShouldInheritColours(*args, **kwargs)

ShouldInheritColours(self) -> bool

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.

Show(*args, **kwargs)

Show(self, bool show=True) -> bool

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.

ShowFullScreen(*args, **kwargs)

ShowFullScreen(self, bool show, long style=FULLSCREEN_ALL) -> bool

Shown

See IsShown and Show

Size

See GetSize and SetSize

Sizer

See GetSizer and SetSizer

StatusBar

See GetStatusBar and SetStatusBar

StatusBarPane

See GetStatusBarPane and SetStatusBarPane

Thaw(*args, **kwargs)

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.

ThemeEnabled

See GetThemeEnabled and SetThemeEnabled

Title

See GetTitle and SetTitle

TmpDefaultItem

See GetTmpDefaultItem and SetTmpDefaultItem

ToggleWindowStyle(*args, **kwargs)

ToggleWindowStyle(self, int flag) -> bool

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.

ToolBar

See GetToolBar and SetToolBar

ToolTip

See GetToolTip and SetToolTip

TopLevel

See IsTopLevel

TopLevelParent

See GetTopLevelParent

TransferDataFromWindow(*args, **kwargs)

TransferDataFromWindow(self) -> bool

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.

TransferDataToWindow(*args, **kwargs)

TransferDataToWindow(self) -> bool

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.

Unbind(event, source=None, id=-1, id2=-1, handler=None)

Disconnects the event handler binding for event from self. Returns True if successful.

UnregisterHotKey(*args, **kwargs)

UnregisterHotKey(self, int hotkeyId) -> bool

Unregisters a system wide hotkey.

Update(*args, **kwargs)

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.

UpdateClientRect

See GetUpdateClientRect

UpdateRegion

See GetUpdateRegion

UpdateWindowUI(*args, **kwargs)

UpdateWindowUI(self, long 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.

UseBgCol(*args, **kwargs)

UseBgCol(self) -> bool

Validate(*args, **kwargs)

Validate(self) -> bool

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.

Validator

See GetValidator and SetValidator

VirtualSize

See GetVirtualSize and SetVirtualSize

WarpPointer(*args, **kwargs)

WarpPointer(self, int x, int 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.

WindowStyle

See GetWindowStyle and SetWindowStyle

WindowStyleFlag

See GetWindowStyleFlag and SetWindowStyleFlag

WindowToClientSize(*args, **kwargs)

WindowToClientSize(self, Size size) -> Size

WindowVariant

See GetWindowVariant and SetWindowVariant

load_data_list(list=[])

Fill the list inside its panel

thisown

The membership flag

class sans.guiframe.data_panel.DataPanel(parent, list=None, size=(235, 700), list_of_perspective=None, manager=None, *args, **kwds)

Bases: wx.lib.scrolledpanel.ScrolledPanel, sans.guiframe.panel_base.PanelBase

This panel displays data available in the application and widgets to interact with data.

AcceleratorTable

See GetAcceleratorTable and SetAcceleratorTable

AcceptsFocus(*args, **kwargs)

AcceptsFocus(self) -> bool

Can this window have focus?

AcceptsFocusFromKeyboard(*args, **kwargs)

AcceptsFocusFromKeyboard(self) -> bool

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(*args, **kwargs)

AddChild(self, Window child)

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

AddPendingEvent(*args, **kwargs)

AddPendingEvent(self, Event event)

AdjustForLayoutDirection(*args, **kwargs)

AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int

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

AdjustScrollbars(*args, **kwargs)

AdjustScrollbars(self)

AssociateHandle(*args, **kwargs)

AssociateHandle(self, long handle)

Associate the window with a new native handle

AutoLayout

See GetAutoLayout and SetAutoLayout

BackgroundColour

See GetBackgroundColour and SetBackgroundColour

BackgroundStyle

See GetBackgroundStyle and SetBackgroundStyle

BestSize

See GetBestSize

BestVirtualSize

See GetBestVirtualSize

Bind(event, handler, source=None, id=-1, id2=-1)

Bind an event to an event handler.

Parameters:
  • event – One of the EVT_* objects that specifies the type of event to bind,
  • handler – A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.
  • source – Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.
  • id – Used to spcify the event source by ID instead of instance.
  • id2 – Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.
Border

See GetBorder

CacheBestSize(*args, **kwargs)

CacheBestSize(self, Size size)

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

CalcScrollInc(*args, **kwargs)

CalcScrollInc(self, ScrollWinEvent event) -> int

CalcScrolledPosition(*args)

CalcScrolledPosition(self, Point pt) -> Point CalcScrolledPosition(int x, int y) -> (sx, sy)

Translate between scrolled and unscrolled coordinates.

CalcUnscrolledPosition(*args)

CalcUnscrolledPosition(self, Point pt) -> Point CalcUnscrolledPosition(int x, int y) -> (ux, uy)

Translate between scrolled and unscrolled coordinates.

CanSetTransparent(*args, **kwargs)

CanSetTransparent(self) -> bool

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.

CaptureMouse(*args, **kwargs)

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.

Caret

See GetCaret and SetCaret

Center(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CenterOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

Centre(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CentreOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

CharHeight

See GetCharHeight

CharWidth

See GetCharWidth

Children

See GetChildren

ClassName

See GetClassName

ClearBackground(*args, **kwargs)

ClearBackground(self)

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

ClientAreaOrigin

See GetClientAreaOrigin

ClientRect

See GetClientRect and SetClientRect

ClientSize

See GetClientSize and SetClientSize

ClientToScreen(*args, **kwargs)

ClientToScreen(self, Point pt) -> Point

Converts to screen coordinates from coordinates relative to this window.

ClientToScreenXY(*args, **kwargs)

ClientToScreenXY(int x, int y) -> (x,y)

Converts to screen coordinates from coordinates relative to this window.

ClientToWindowSize(*args, **kwargs)

ClientToWindowSize(self, Size size) -> Size

Close(*args, **kwargs)

Close(self, bool force=False) -> bool

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.

Connect(*args, **kwargs)

Connect(self, int id, int lastId, int eventType, PyObject func)

Constraints

See GetConstraints and SetConstraints

ContainingSizer

See GetContainingSizer and SetContainingSizer

ConvertDialogPointToPixels(*args, **kwargs)

ConvertDialogPointToPixels(self, Point pt) -> Point

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.

ConvertDialogSizeToPixels(*args, **kwargs)

ConvertDialogSizeToPixels(self, Size sz) -> Size

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.

ConvertPixelPointToDialog(*args, **kwargs)

ConvertPixelPointToDialog(self, Point pt) -> Point

ConvertPixelSizeToDialog(*args, **kwargs)

ConvertPixelSizeToDialog(self, Size sz) -> Size

Create(*args, **kwargs)
Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL, String name=PanelNameStr) -> bool

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

Cursor

See GetCursor and SetCursor

DLG_PNT(*args, **kwargs)

DLG_PNT(self, Point pt) -> Point

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.

DLG_SZE(*args, **kwargs)

DLG_SZE(self, Size sz) -> Size

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.

DefaultAttributes

See GetDefaultAttributes

Destroy(*args, **kwargs)

Destroy(self) -> bool

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.

DestroyChildren(*args, **kwargs)

DestroyChildren(self) -> bool

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

Disable(*args, **kwargs)

Disable(self) -> bool

Disables the window, same as Enable(false).

Disconnect(*args, **kwargs)
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL,
PyObject func=None) -> bool
DissociateHandle(*args, **kwargs)

DissociateHandle(self)

Dissociate the current native handle from the window

DoEraseBackground(*args, **kwargs)

DoEraseBackground(self, DC dc) -> bool

DoGetBestSize(*args, **kwargs)

DoGetBestSize(self) -> Size

DoGetClientSize(*args, **kwargs)

DoGetClientSize() -> (width, height)

DoGetPosition(*args, **kwargs)

DoGetPosition() -> (x,y)

DoGetSize(*args, **kwargs)

DoGetSize() -> (width, height)

DoGetVirtualSize(*args, **kwargs)

DoGetVirtualSize(self) -> Size

DoMoveWindow(*args, **kwargs)

DoMoveWindow(self, int x, int y, int width, int height)

DoPrepareDC(*args, **kwargs)

DoPrepareDC(self, DC dc)

Normally what is called by PrepareDC.

DoSetClientSize(*args, **kwargs)

DoSetClientSize(self, int width, int height)

DoSetSize(*args, **kwargs)

DoSetSize(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)

DoSetVirtualSize(*args, **kwargs)

DoSetVirtualSize(self, int x, int y)

DragAcceptFiles(*args, **kwargs)

DragAcceptFiles(self, bool accept)

Enables or disables eligibility for drop file events, EVT_DROP_FILES.

DropTarget

See GetDropTarget and SetDropTarget

EffectiveMinSize

See GetEffectiveMinSize

Enable(*args, **kwargs)

Enable(self, bool enable=True) -> bool

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.

EnableScrolling(*args, **kwargs)

EnableScrolling(self, bool x_scrolling, bool y_scrolling)

Enabled

See IsEnabled and Enable

EventHandler

See GetEventHandler and SetEventHandler

EvtHandlerEnabled

See GetEvtHandlerEnabled and SetEvtHandlerEnabled

ExtraStyle

See GetExtraStyle and SetExtraStyle

static FindFocus(*args, **kwargs)

FindFocus() -> Window

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

FindWindowById(*args, **kwargs)

FindWindowById(self, long winid) -> Window

Find a child of this window by window ID

FindWindowByLabel(*args, **kwargs)

FindWindowByLabel(self, String label) -> Window

Find a child of this window by label

FindWindowByName(*args, **kwargs)

FindWindowByName(self, String name) -> Window

Find a child of this window by name

Fit(*args, **kwargs)

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(*args, **kwargs)

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.

Font

See GetFont and SetFont

ForegroundColour

See GetForegroundColour and SetForegroundColour

Freeze(*args, **kwargs)

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(*args, **kwargs)

GetAcceleratorTable(self) -> AcceleratorTable

Gets the accelerator table for this window.

GetAdjustedBestSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetAutoLayout(*args, **kwargs)

GetAutoLayout(self) -> bool

Returns the current autoLayout setting

GetBackgroundColour(*args, **kwargs)

GetBackgroundColour(self) -> Colour

Returns the background colour of the window.

GetBackgroundStyle(*args, **kwargs)

GetBackgroundStyle(self) -> int

Returns the background style of the window.

See :SetBackgroundStyle
GetBestFittingSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetBestSize(*args, **kwargs)

GetBestSize(self) -> Size

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestSizeTuple(*args, **kwargs)

GetBestSizeTuple() -> (width, height)

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestVirtualSize(*args, **kwargs)

GetBestVirtualSize(self) -> Size

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

GetBorder(*args)

GetBorder(self, long flags) -> int GetBorder(self) -> int

Get border for the flags of this window

static GetCapture(*args, **kwargs)

GetCapture() -> Window

Returns the window which currently captures the mouse or None

GetCaret(*args, **kwargs)

GetCaret(self) -> Caret

Returns the caret associated with the window.

GetCharHeight(*args, **kwargs)

GetCharHeight(self) -> int

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

GetCharWidth(*args, **kwargs)

GetCharWidth(self) -> int

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

GetChildren(*args, **kwargs)

GetChildren(self) -> WindowList

Returns an object containing a list of the window’s children. The object provides a Python sequence-like interface over the internal list maintained by the window..

static GetClassDefaultAttributes(*args, **kwargs)

GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes

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.

GetClassName(*args, **kwargs)

GetClassName(self) -> String

Returns the class name of the C++ class using wxRTTI.

GetClientAreaOrigin(*args, **kwargs)

GetClientAreaOrigin(self) -> Point

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

GetClientRect(*args, **kwargs)

GetClientRect(self) -> Rect

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

GetClientSize(*args, **kwargs)

GetClientSize(self) -> Size

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.

GetClientSizeTuple(*args, **kwargs)

GetClientSizeTuple() -> (width, height)

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.

GetConstraints(*args, **kwargs)

GetConstraints(self) -> LayoutConstraints

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

GetContainingSizer(*args, **kwargs)

GetContainingSizer(self) -> Sizer

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

GetCursor(*args, **kwargs)

GetCursor(self) -> Cursor

Return the cursor associated with this window.

GetDefaultAttributes(*args, **kwargs)

GetDefaultAttributes(self) -> VisualAttributes

GetDropTarget(*args, **kwargs)

GetDropTarget(self) -> DropTarget

Returns the associated drop target, which may be None.

GetEffectiveMinSize(*args, **kwargs)

GetEffectiveMinSize(self) -> Size

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.

GetEventHandler(*args, **kwargs)

GetEventHandler(self) -> EvtHandler

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

GetEvtHandlerEnabled(*args, **kwargs)

GetEvtHandlerEnabled(self) -> bool

GetExtraStyle(*args, **kwargs)

GetExtraStyle(self) -> long

Returns the extra style bits for the window.

GetFont(*args, **kwargs)

GetFont(self) -> Font

Returns the default font used for this window.

GetForegroundColour(*args, **kwargs)

GetForegroundColour(self) -> Colour

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.

GetFullTextExtent(*args, **kwargs)
GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)

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

GetGrandParent(*args, **kwargs)

GetGrandParent(self) -> Window

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

GetGtkWidget(*args, **kwargs)

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

GetHandle(*args, **kwargs)

GetHandle(self) -> long

Returns the platform-specific handle (as a long integer) of the physical window. On wxMSW this is the win32 window handle, on wxGTK it is the XWindow ID, and on wxMac it is the ControlRef.

GetHelpText(*args, **kwargs)

GetHelpText(self) -> String

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.

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(*args, **kwargs)

GetId(self) -> int

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.

GetLabel(*args, **kwargs)

GetLabel(self) -> String

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.

GetLayoutDirection(*args, **kwargs)

GetLayoutDirection(self) -> int

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

GetMaxHeight(*args, **kwargs)

GetMaxHeight(self) -> int

GetMaxSize(*args, **kwargs)

GetMaxSize(self) -> Size

GetMaxWidth(*args, **kwargs)

GetMaxWidth(self) -> int

GetMinHeight(*args, **kwargs)

GetMinHeight(self) -> int

GetMinSize(*args, **kwargs)

GetMinSize(self) -> Size

GetMinWidth(*args, **kwargs)

GetMinWidth(self) -> int

GetName(*args, **kwargs)

GetName(self) -> String

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.

GetNextHandler(*args, **kwargs)

GetNextHandler(self) -> EvtHandler

GetParent(*args, **kwargs)

GetParent(self) -> Window

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

GetPosition(*args, **kwargs)

GetPosition(self) -> Point

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.

GetPositionTuple(*args, **kwargs)

GetPositionTuple() -> (x,y)

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.

GetPreviousHandler(*args, **kwargs)

GetPreviousHandler(self) -> EvtHandler

GetRect(*args, **kwargs)

GetRect(self) -> Rect

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

GetScaleX(*args, **kwargs)

GetScaleX(self) -> double

GetScaleY(*args, **kwargs)

GetScaleY(self) -> double

GetScreenPosition(*args, **kwargs)

GetScreenPosition(self) -> Point

Get the position of the window in screen coordinantes.

GetScreenPositionTuple(*args, **kwargs)

GetScreenPositionTuple() -> (x,y)

Get the position of the window in screen coordinantes.

GetScreenRect(*args, **kwargs)

GetScreenRect(self) -> Rect

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

GetScrollPageSize(*args, **kwargs)

GetScrollPageSize(self, int orient) -> int

GetScrollPixelsPerUnit(*args, **kwargs)

GetScrollPixelsPerUnit() -> (xUnit, yUnit)

Get the size of one logical unit in physical units.

GetScrollPos(*args, **kwargs)

GetScrollPos(self, int orientation) -> int

Returns the built-in scrollbar position.

GetScrollRange(*args, **kwargs)

GetScrollRange(self, int orientation) -> int

Returns the built-in scrollbar range.

GetScrollThumb(*args, **kwargs)

GetScrollThumb(self, int orientation) -> int

Returns the built-in scrollbar thumb size.

GetSize(*args, **kwargs)

GetSize(self) -> Size

Get the window size.

GetSizeTuple(*args, **kwargs)

GetSizeTuple() -> (width, height)

Get the window size.

GetSizer(*args, **kwargs)

GetSizer(self) -> Sizer

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

GetTargetRect(*args, **kwargs)

GetTargetRect(self) -> Rect

GetTargetWindow(*args, **kwargs)

GetTargetWindow(self) -> Window

GetTextExtent(*args, **kwargs)

GetTextExtent(String string) -> (width, height)

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

GetThemeEnabled(*args, **kwargs)

GetThemeEnabled(self) -> bool

Return the themeEnabled flag.

GetToolTip(*args, **kwargs)

GetToolTip(self) -> ToolTip

get the associated tooltip or None if none

GetTopLevelParent(*args, **kwargs)

GetTopLevelParent(self) -> Window

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

GetUpdateClientRect(*args, **kwargs)

GetUpdateClientRect(self) -> Rect

Get the update rectangle region bounding box in client coords.

GetUpdateRegion(*args, **kwargs)

GetUpdateRegion(self) -> Region

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

GetValidator(*args, **kwargs)

GetValidator(self) -> Validator

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

GetViewStart(*args, **kwargs)

GetViewStart() -> (x,y)

Get the view start

GetVirtualSize(*args, **kwargs)

GetVirtualSize(self) -> Size

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.

GetVirtualSizeTuple(*args, **kwargs)

GetVirtualSizeTuple() -> (width, height)

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.

GetWindowBorderSize(*args, **kwargs)

GetWindowBorderSize(self) -> Size

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

GetWindowStyle(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowStyleFlag(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowVariant(*args, **kwargs)

GetWindowVariant(self) -> int

GrandParent

See GetGrandParent

GtkWidget

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

Handle

See GetHandle

HasCapture(*args, **kwargs)

HasCapture(self) -> bool

Returns true if this window has the current mouse capture.

HasFlag(*args, **kwargs)

HasFlag(self, int flag) -> bool

Test if the given style is set for this window.

HasMultiplePages(*args, **kwargs)

HasMultiplePages(self) -> bool

HasScrollbar(*args, **kwargs)

HasScrollbar(self, int orient) -> bool

Does the window have the scrollbar for this orientation?

HasTransparentBackground(*args, **kwargs)

HasTransparentBackground(self) -> bool

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.

HelpText

See GetHelpText and SetHelpText

Hide(*args, **kwargs)

Hide(self) -> bool

Equivalent to calling Show(False).

HitTest(*args, **kwargs)

HitTest(self, Point pt) -> int

Test where the given (in client coords) point lies

HitTestXY(*args, **kwargs)

HitTestXY(self, int x, int y) -> int

Test where the given (in client coords) point lies

Id

See GetId and SetId

InheritAttributes(*args, **kwargs)

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.

InheritsBackgroundColour(*args, **kwargs)

InheritsBackgroundColour(self) -> bool

InitDialog(*args, **kwargs)

InitDialog(self)

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

InvalidateBestSize(*args, **kwargs)

InvalidateBestSize(self)

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

IsBeingDeleted(*args, **kwargs)

IsBeingDeleted(self) -> bool

Is the window in the process of being deleted?

IsDoubleBuffered(*args, **kwargs)

IsDoubleBuffered(self) -> bool

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.

IsEnabled(*args, **kwargs)

IsEnabled(self) -> bool

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

IsExposed(*args, **kwargs)

IsExposed(self, int x, int y, int w=1, int h=1) -> bool

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.

IsExposedPoint(*args, **kwargs)

IsExposedPoint(self, Point pt) -> bool

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.

IsExposedRect(*args, **kwargs)

IsExposedRect(self, Rect rect) -> bool

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.

IsFrozen(*args, **kwargs)

IsFrozen(self) -> bool

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

See :Freeze and Thaw
IsRetained(*args, **kwargs)

IsRetained(self) -> bool

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

IsSameAs(*args, **kwargs)

IsSameAs(self, Object p) -> bool

For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.

IsShown(*args, **kwargs)

IsShown(self) -> bool

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

IsShownOnScreen(*args, **kwargs)

IsShownOnScreen(self) -> bool

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.

IsTopLevel(*args, **kwargs)

IsTopLevel(self) -> bool

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

Label

See GetLabel and SetLabel

Layout(*args, **kwargs)

Layout(self) -> bool

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.

LayoutDirection

See GetLayoutDirection and SetLayoutDirection

LineDown(*args, **kwargs)

LineDown(self) -> bool

This is just a wrapper for ScrollLines(1).

LineUp(*args, **kwargs)

LineUp(self) -> bool

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

Lower(*args, **kwargs)

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(*args, **kwargs)

MakeModal(self, bool 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.

MaxHeight

See GetMaxHeight

MaxSize

See GetMaxSize and SetMaxSize

MaxWidth

See GetMaxWidth

MinHeight

See GetMinHeight

MinSize

See GetMinSize and SetMinSize

MinWidth

See GetMinWidth

Move(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

MoveAfterInTabOrder(*args, **kwargs)

MoveAfterInTabOrder(self, Window 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.

MoveBeforeInTabOrder(*args, **kwargs)

MoveBeforeInTabOrder(self, Window win)

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

MoveXY(*args, **kwargs)

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

Moves the window to the given position.

Name

See GetName and SetName

Navigate(*args, **kwargs)

Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool

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

static NewControlId(*args, **kwargs)

NewControlId() -> int

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

static NextControlId(*args, **kwargs)

NextControlId(int winid) -> int

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

NextHandler

See GetNextHandler and SetNextHandler

OnChildFocus(evt)
OnInternalIdle(*args, **kwargs)

OnInternalIdle(self)

OnPaint(*args, **kwargs)

OnPaint(self, PaintEvent event)

PageDown(*args, **kwargs)

PageDown(self) -> bool

This is just a wrapper for ScrollPages(1).

PageUp(*args, **kwargs)

PageUp(self) -> bool

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

Parent

See GetParent

PopEventHandler(*args, **kwargs)

PopEventHandler(self, bool deleteHandler=False) -> EvtHandler

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.

PopupMenu(*args, **kwargs)

PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool

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.

PopupMenuXY(*args, **kwargs)

PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool

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.

Position

See GetPosition and SetPosition

PostCreate(pre)

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

PrepareDC(*args, **kwargs)

PrepareDC(self, DC 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.

static PrevControlId(*args, **kwargs)

PrevControlId(int winid) -> int

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

PreviousHandler

See GetPreviousHandler and SetPreviousHandler

ProcessEvent(*args, **kwargs)

ProcessEvent(self, Event event) -> bool

ProcessPendingEvents(*args, **kwargs)

ProcessPendingEvents(self)

PushEventHandler(*args, **kwargs)

PushEventHandler(self, EvtHandler 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 a 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.

Raise(*args, **kwargs)

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.

Rect

See GetRect and SetRect

Refresh(*args, **kwargs)

Refresh(self, bool eraseBackground=True, Rect 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.

RefreshRect(*args, **kwargs)

RefreshRect(self, Rect rect, bool 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.

RegisterHotKey(*args, **kwargs)

RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool

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.

ReleaseMouse(*args, **kwargs)

ReleaseMouse(self)

Releases mouse input captured with wx.Window.CaptureMouse.

RemoveChild(*args, **kwargs)

RemoveChild(self, Window child)

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

RemoveEventHandler(*args, **kwargs)

RemoveEventHandler(self, EvtHandler handler) -> bool

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

Reparent(*args, **kwargs)

Reparent(self, Window newParent) -> bool

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)

ScaleX

See GetScaleX

ScaleY

See GetScaleY

ScreenPosition

See GetScreenPosition

ScreenRect

See GetScreenRect

ScreenToClient(*args, **kwargs)

ScreenToClient(self, Point pt) -> Point

Converts from screen to client window coordinates.

ScreenToClientXY(*args, **kwargs)

ScreenToClientXY(int x, int y) -> (x,y)

Converts from screen to client window coordinates.

Scroll(*args, **kwargs)

Scroll(self, int x, int y)

ScrollChildIntoView(child)

Scrolls the panel such that the specified child window is in view.

ScrollLines(*args, **kwargs)

ScrollLines(self, int lines) -> bool

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.

ScrollPages(*args, **kwargs)

ScrollPages(self, int pages) -> bool

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.

ScrollWindow(*args, **kwargs)

ScrollWindow(self, int dx, int dy, Rect 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.

SendSizeEvent()
SetAcceleratorTable(*args, **kwargs)

SetAcceleratorTable(self, AcceleratorTable accel)

Sets the accelerator table for this window.

SetAutoLayout(*args, **kwargs)

SetAutoLayout(self, bool 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.

SetBackgroundColour(*args, **kwargs)

SetBackgroundColour(self, Colour colour) -> bool

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.

SetBackgroundStyle(*args, **kwargs)

SetBackgroundStyle(self, int style) -> bool

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.

See :GetBackgroundStyle, SetBackgroundColour
SetBestFittingSize(*args, **kwargs)

Use SetInitialSize

SetBestSize(*args, **kwargs)

SetInitialSize(self, Size 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.

SetCaret(*args, **kwargs)

SetCaret(self, Caret caret)

Sets the caret associated with the window.

SetClientRect(*args, **kwargs)

SetClientRect(self, Rect 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.

SetClientSize(*args, **kwargs)

SetClientSize(self, Size 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.

SetClientSizeWH(*args, **kwargs)

SetClientSizeWH(self, int width, int 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.

SetConstraints(*args, **kwargs)

SetConstraints(self, LayoutConstraints 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.

SetContainingSizer(*args, **kwargs)

SetContainingSizer(self, Sizer 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.

SetCursor(*args, **kwargs)

SetCursor(self, Cursor cursor) -> bool

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.

SetDimensions(*args, **kwargs)

SetDimensions(self, int x, int y, int width, int height, int 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 Existing 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.
SetDoubleBuffered(*args, **kwargs)

SetDoubleBuffered(self, bool on)

Put the native window into double buffered or composited mode.

SetDropTarget(*args, **kwargs)

SetDropTarget(self, DropTarget dropTarget)

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

SetEventHandler(*args, **kwargs)

SetEventHandler(self, EvtHandler 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.

SetEvtHandlerEnabled(*args, **kwargs)

SetEvtHandlerEnabled(self, bool enabled)

SetExtraStyle(*args, **kwargs)

SetExtraStyle(self, long 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()

SetFocus(*args, **kwargs)

SetFocus(self)

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

SetFocusFromKbd(*args, **kwargs)

SetFocusFromKbd(self)

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

SetFocusIgnoringChildren(*args, **kwargs)

SetFocusIgnoringChildren(self)

In contrast to SetFocus (see above) this will set the focus to the panel even of there are child windows in the panel. This is only rarely needed.

SetFont(*args, **kwargs)

SetFont(self, Font font) -> bool

Sets the font for this window.

SetForegroundColour(*args, **kwargs)

SetForegroundColour(self, Colour colour) -> bool

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.

SetHelpText(*args, **kwargs)

SetHelpText(self, String 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.

SetHelpTextForId(*args, **kwargs)

SetHelpTextForId(self, String text)

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

SetId(*args, **kwargs)

SetId(self, int 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.

SetInitialSize(*args, **kwargs)

SetInitialSize(self, Size 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.

SetLabel(*args, **kwargs)

SetLabel(self, String label)

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

SetLayoutDirection(*args, **kwargs)

SetLayoutDirection(self, int dir)

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

SetMaxSize(*args, **kwargs)

SetMaxSize(self, Size maxSize)

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

SetMinSize(*args, **kwargs)

SetMinSize(self, Size minSize)

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

SetName(*args, **kwargs)

SetName(self, String 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

SetNextHandler(*args, **kwargs)

SetNextHandler(self, EvtHandler handler)

SetOwnBackgroundColour(*args, **kwargs)

SetOwnBackgroundColour(self, Colour colour)

SetOwnFont(*args, **kwargs)

SetOwnFont(self, Font font)

SetOwnForegroundColour(*args, **kwargs)

SetOwnForegroundColour(self, Colour colour)

SetPosition(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

SetPreviousHandler(*args, **kwargs)

SetPreviousHandler(self, EvtHandler handler)

SetRect(*args, **kwargs)

SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)

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

SetScale(*args, **kwargs)

SetScale(self, double xs, double ys)

SetScrollPageSize(*args, **kwargs)

SetScrollPageSize(self, int orient, int pageSize)

SetScrollPos(*args, **kwargs)

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

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

SetScrollRate(*args, **kwargs)

SetScrollRate(self, int xstep, int ystep)

SetScrollbar(*args, **kwargs)
SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)

Sets the scrollbar properties of a built-in scrollbar.

SetScrollbars(*args, **kwargs)
SetScrollbars(self, int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX,
int noUnitsY, int xPos=0, int yPos=0, bool noRefresh=False)
SetSize(*args, **kwargs)

SetSize(self, Size size)

Sets the size of the window in pixels.

SetSizeHints(*args, **kwargs)
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int 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.

SetSizeHintsSz(*args, **kwargs)

SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size 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.

SetSizeWH(*args, **kwargs)

SetSizeWH(self, int width, int height)

Sets the size of the window in pixels.

SetSizer(*args, **kwargs)

SetSizer(self, Sizer sizer, bool 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.

SetSizerAndFit(*args, **kwargs)

SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)

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

SetTargetRect(*args, **kwargs)

SetTargetRect(self, Rect rect)

SetTargetWindow(*args, **kwargs)

SetTargetWindow(self, Window target)

SetThemeEnabled(*args, **kwargs)

SetThemeEnabled(self, bool 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.

SetToolTip(*args, **kwargs)

SetToolTip(self, ToolTip tip)

Attach a tooltip to the window.

SetToolTipString(*args, **kwargs)

SetToolTipString(self, String tip)

Attach a tooltip to the window.

SetTransparent(*args, **kwargs)

SetTransparent(self, byte alpha) -> bool

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.

SetValidator(*args, **kwargs)

SetValidator(self, Validator 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(*args, **kwargs)

SetVirtualSize(self, Size 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.

SetVirtualSizeHints(*args, **kwargs)

SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int 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.

SetVirtualSizeHintsSz(*args, **kwargs)

SetVirtualSizeHintsSz(self, Size minSize, Size 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.

SetVirtualSizeWH(*args, **kwargs)

SetVirtualSizeWH(self, int w, int 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.

SetWindowStyle(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowStyleFlag(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowVariant(*args, **kwargs)

SetWindowVariant(self, int variant)

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

SetupScrolling(scroll_x=True, scroll_y=True, rate_x=20, rate_y=20, scrollToTop=True)

This function sets up the event handling necessary to handle scrolling properly. It should be called within the __init__ function of any class that is derived from ScrolledPanel, once the controls on the panel have been constructed and thus the size of the scrolling area can be determined.

ShouldInheritColours(*args, **kwargs)

ShouldInheritColours(self) -> bool

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.

Show(*args, **kwargs)

Show(self, bool show=True) -> bool

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.

Shown

See IsShown and Show

Size

See GetSize and SetSize

Sizer

See GetSizer and SetSizer

TargetWindow

See GetTargetWindow and SetTargetWindow

Thaw(*args, **kwargs)

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.

ThemeEnabled

See GetThemeEnabled and SetThemeEnabled

ToggleWindowStyle(*args, **kwargs)

ToggleWindowStyle(self, int flag) -> bool

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.

ToolTip

See GetToolTip and SetToolTip

TopLevel

See IsTopLevel

TopLevelParent

See GetTopLevelParent

TransferDataFromWindow(*args, **kwargs)

TransferDataFromWindow(self) -> bool

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.

TransferDataToWindow(*args, **kwargs)

TransferDataToWindow(self) -> bool

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.

Unbind(event, source=None, id=-1, id2=-1, handler=None)

Disconnects the event handler binding for event from self. Returns True if successful.

UnregisterHotKey(*args, **kwargs)

UnregisterHotKey(self, int hotkeyId) -> bool

Unregisters a system wide hotkey.

Update(*args, **kwargs)

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.

UpdateClientRect

See GetUpdateClientRect

UpdateRegion

See GetUpdateRegion

UpdateWindowUI(*args, **kwargs)

UpdateWindowUI(self, long 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.

UseBgCol(*args, **kwargs)

UseBgCol(self) -> bool

Validate(*args, **kwargs)

Validate(self) -> bool

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.

Validator

See GetValidator and SetValidator

ViewStart

See GetViewStart

VirtualSize

See GetVirtualSize and SetVirtualSize

WarpPointer(*args, **kwargs)

WarpPointer(self, int x, int 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.

WindowStyle

See GetWindowStyle and SetWindowStyle

WindowStyleFlag

See GetWindowStyleFlag and SetWindowStyleFlag

WindowToClientSize(*args, **kwargs)

WindowToClientSize(self, Size size) -> Size

WindowVariant

See GetWindowVariant and SetWindowVariant

append_theory(state_id, theory_list)

append theory object under data from a state of id = state_id replace that theory if already displayed

append_theory_helper(tree, root, state_id, theory_list)
base_AcceptsFocus(*args, **kwargs)

Please use PyScrolledWindow.AcceptsFocus instead.

base_AcceptsFocusFromKeyboard(*args, **kwargs)

Please use PyScrolledWindow.AcceptsFocusFromKeyboard instead.

base_AddChild(*args, **kwargs)

Please use PyScrolledWindow.AddChild instead.

base_DoGetBestSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetBestSize instead.

base_DoGetClientSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetClientSize instead.

base_DoGetPosition(*args, **kwargs)

Please use PyScrolledWindow.DoGetPosition instead.

base_DoGetSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetSize instead.

base_DoGetVirtualSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetVirtualSize instead.

base_DoMoveWindow(*args, **kwargs)

Please use PyScrolledWindow.DoMoveWindow instead.

base_DoSetClientSize(*args, **kwargs)

Please use PyScrolledWindow.DoSetClientSize instead.

base_DoSetSize(*args, **kwargs)

Please use PyScrolledWindow.DoSetSize instead.

base_DoSetVirtualSize(*args, **kwargs)

Please use PyScrolledWindow.DoSetVirtualSize instead.

base_Enable(*args, **kwargs)

Please use PyScrolledWindow.Enable instead.

base_GetDefaultAttributes(*args, **kwargs)

Please use PyScrolledWindow.GetDefaultAttributes instead.

base_GetMaxSize(*args, **kwargs)

Please use PyScrolledWindow.GetMaxSize instead.

base_InitDialog(*args, **kwargs)

Please use PyScrolledWindow.InitDialog instead.

base_OnInternalIdle(*args, **kwargs)

Please use PyScrolledWindow.OnInternalIdle instead.

base_RemoveChild(*args, **kwargs)

Please use PyScrolledWindow.RemoveChild instead.

base_ShouldInheritColours(*args, **kwargs)

Please use PyScrolledWindow.ShouldInheritColours instead.

base_TransferDataFromWindow(*args, **kwargs)

Please use PyScrolledWindow.TransferDataFromWindow instead.

base_TransferDataToWindow(*args, **kwargs)

Please use PyScrolledWindow.TransferDataToWindow instead.

base_Validate(*args, **kwargs)

Please use PyScrolledWindow.Validate instead.

check_theory_to_freeze()
define_panel_structure()

Define the skeleton of the panel

do_layout()
enable_append()

enable or disable append button

enable_freeze()

enable or disable the freeze button

enable_import()

enable or disable send button

enable_plot()

enable or disable plot button

enable_remove()

enable or disable remove button

enable_remove_plot()

enable remove plot button if there is a plot panel on focus

enable_selection()

enable or disable combobo box selection

fill_cbox_analysis(plugin)

fill the combobox with analysis name

get_bookmark_flag()

Get the bookmark flag to update appropriately the tool bar

get_copy_flag()

Get the copy flag to update appropriately the tool bar

get_data()

return list of current data

get_drag_flag()

Get the drag flag to update appropriately the tool bar

get_manager()
get_paste_flag()

Get the copy flag to update appropriately the tool bar

get_preview_flag()

Get the preview flag to update appropriately the tool bar

get_print_flag()

Get the print flag to update appropriately the tool bar

get_redo_flag()

Get the redo flag to update appropriately the tool bar

get_reset_flag()

Get the reset flag to update appropriately the tool bar

get_save_flag()

Get the save flag to update appropriately the tool bar

get_state()

return the current state

get_undo_flag()

Get the undo flag to update appropriately the tool bar

get_zoom_flag()

Get the zoom flag to update appropriately the tool bar

get_zoom_in_flag()

Get the zoom in flag to update appropriately the tool bar

get_zoom_out_flag()

Get the zoom out flag to update appropriately the tool bar

has_changed()
layout_batch()
layout_button()

Layout widgets related to buttons

layout_data_list()

Add a listcrtl in the panel

layout_selection()
load_data_list(list)

add need data with its theory under the tree

load_error(error=None)

Pop up an error message.

Parameters:error – details error message to be displayed
onContextMenu(event)

Retrieve the state selected state

on_append_plot(event=None)

append plot to plot panel on focus

on_batch_mode(event)

change guiframe to its batch mode

on_batch_selection(event)
Parameters:event – contains parameter enable . when enable is set to True

the application is in Batch mode else the application is default mode(single mode)

on_bookmark(event)

The derivative class is on bookmark mode if implemented

on_check_item(event)
on_close_page(event=None)

On close

on_close_plot(event)

clseo the panel on focus

on_copy(event)

The copy action if possible

on_drag(event)

The derivative class allows dragging motion if implemented

on_freeze(event)
on_import(event=None)

Get all select data and set them to the current active perspetive

on_kill_focus(event=None)

The derivative class is on unfocus if implemented

on_paste(event)

The paste action if possible

on_plot(event=None)

Send a list of data names to plot

on_preview(event)

Display a printable version of the class derivative

on_redo(event)

The previous action is restored if possible

on_remove(event)

Get a list of item checked and remove them from the treectrl Ask the parent to remove reference to this item

on_reset(event)

The derivative class state is restored

on_save(event)

The state of the derivative class is restored

on_set_focus(event=None)

The derivative class is on focus if implemented

on_single_mode(event)

change guiframe to its single mode

on_undo(event)

The current action is canceled

on_zoom(event)

The derivative class is on zoom mode (using pane) if zoom mode is implemented

on_zoom_in(event)

The derivative class is on zoom in mode if implemented

on_zoom_out(event)

The derivative class is on zoom out mode if implemented

remove_by_id(id)
save_project(doc=None)
return an xml node containing state of the panel
that guiframe can write to file
set_active_perspective(name)

set the active perspective

set_data_helper()
set_manager(manager)
set_panel_on_focus(name=None)

set the plot panel on focus

show_data_button()

show load data and remove data button if dataloader on else hide them

thisown

The membership flag

class sans.guiframe.data_panel.DataTreeCtrl(parent, *args, **kwds)

Bases: wx.lib.agw.customtreectrl.CustomTreeCtrl

Check list control to be used for Data Panel

AcceleratorTable

See GetAcceleratorTable and SetAcceleratorTable

AcceptsFocus()

Can this window be given focus by mouse click?

Note :This method always returns True as we alsways accept focus from mouse click.
Note :Overridden from wx.PyScrolledWindow.
AcceptsFocusFromKeyboard(*args, **kwargs)

AcceptsFocusFromKeyboard(self) -> bool

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(*args, **kwargs)

AddChild(self, Window child)

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

AddPendingEvent(*args, **kwargs)

AddPendingEvent(self, Event event)

AddRoot(text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Adds a root item to the L{CustomTreeCtrl}.

Parameters:
  • text – the item text label;
  • ct_type – the item type (see L{SetItemType} for a list of valid item types);
  • wnd – if not None, a non-toplevel window to show next to the item;
  • image – an index within the normal image list specifying the image to use for the item in unselected state;
  • selImage – an index within the normal image list specifying the image to use for the item in selected state; if image > -1 and selImage is -1, the same image is used for both selected and unselected items;
  • data – associate the given Python object data with the item.
Warning :

only one root is allowed to exist in any given instance of L{CustomTreeCtrl}.

AdjustForLayoutDirection(*args, **kwargs)

AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int

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

AdjustMyScrollbars()

Internal method used to adjust the wx.PyScrolledWindow scrollbars.

AdjustScrollbars(*args, **kwargs)

AdjustScrollbars(self)

AppendItem(parentId, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Appends an item as a last child of its parent.

Parameters:
  • parentId – an instance of L{GenericTreeItem} representing the item’s parent;
  • text – the item text label;
  • ct_type – the item type (see L{SetItemType} for a list of valid item types);
  • wnd – if not None, a non-toplevel window to show next to the item;
  • image – an index within the normal image list specifying the image to use for the item in unselected state;
  • selImage – an index within the normal image list specifying the image to use for the item in selected state; if image > -1 and selImage is -1, the same image is used for both selected and unselected items;
  • data – associate the given Python object data with the item.
AssignButtonsImageList(imageList)

Assigns the button image list.

Parameters:imageList – an instance of wx.ImageList.
AssignImageList(imageList)

Assigns the normal image list.

Parameters:imageList – an instance of wx.ImageList.
AssignStateImageList(imageList)

Assigns the state image list.

Parameters:imageList – an instance of wx.ImageList.
AssociateHandle(*args, **kwargs)

AssociateHandle(self, long handle)

Associate the window with a new native handle

AutoCheckChild(item, checked)

Transverses the tree and checks/unchecks the items.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • checkedTrue to check an item, False to uncheck it.
Note :

This method is meaningful only for checkbox-like and radiobutton-like items.

AutoCheckParent(item, checked)

Traverses up the tree and checks/unchecks parent items.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • checkedTrue to check an item, False to uncheck it.
Note :

This method is meaningful only for checkbox-like and radiobutton-like items.

AutoLayout

See GetAutoLayout and SetAutoLayout

AutoToggleChild(item)

Transverses the tree and toggles the items.

Parameters:item – an instance of L{GenericTreeItem}.
Note :This method is meaningful only for checkbox-like and radiobutton-like items.
BackgroundColour

See GetBackgroundColour and SetBackgroundColour

BackgroundStyle

See GetBackgroundStyle and SetBackgroundStyle

BestSize

See GetBestSize

BestVirtualSize

See GetBestVirtualSize

Bind(event, handler, source=None, id=-1, id2=-1)

Bind an event to an event handler.

Parameters:
  • event – One of the EVT_* objects that specifies the type of event to bind,
  • handler – A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.
  • source – Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.
  • id – Used to spcify the event source by ID instead of instance.
  • id2 – Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.
Border

See GetBorder

CacheBestSize(*args, **kwargs)

CacheBestSize(self, Size size)

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

CalcScrollInc(*args, **kwargs)

CalcScrollInc(self, ScrollWinEvent event) -> int

CalcScrolledPosition(*args)

CalcScrolledPosition(self, Point pt) -> Point CalcScrolledPosition(int x, int y) -> (sx, sy)

Translate between scrolled and unscrolled coordinates.

CalcUnscrolledPosition(*args)

CalcUnscrolledPosition(self, Point pt) -> Point CalcUnscrolledPosition(int x, int y) -> (ux, uy)

Translate between scrolled and unscrolled coordinates.

CalculateLevel(item, dc, level, y, align=False)

Calculates the level of an item inside the tree hierarchy.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • dc – an instance of wx.DC;
  • level – the item level in the tree hierarchy;
  • y – the current vertical position inside the wx.PyScrolledWindow;
  • alignTrue if we want to align windows (in items with windows) at the same horizontal position.
CalculateLineHeight()

Calculates the height of a line.

CalculatePositions()

Calculates all the positions of the visible items.

CalculateSize(item, dc, level=-1, align=False)

Calculates overall position and size of an item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • dc – an instance of wx.DC;
  • level – the item level in the tree hierarchy;
  • alignTrue if we want to align windows (in items with windows) at the same horizontal position.
CanSetTransparent(*args, **kwargs)

CanSetTransparent(self) -> bool

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.

CaptureMouse(*args, **kwargs)

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.

Caret

See GetCaret and SetCaret

Center(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CenterOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

Centre(*args, **kwargs)

Center(self, int direction=BOTH)

Centers the window. The parameter specifies the direction for centering, 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.

CentreOnParent(*args, **kwargs)

CenterOnParent(self, int dir=BOTH)

Center with respect to the the parent window

CharHeight

See GetCharHeight

CharWidth

See GetCharWidth

CheckChilds(item, checked=True)

Programatically check/uncheck item children.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • checkedTrue to check an item, False to uncheck it.
Note :

This method is meaningful only for checkbox-like and radiobutton-like items.

Note :

This method does not generate EVT_TREE_ITEM_CHECKING and EVT_TREE_ITEM_CHECKED events.

CheckItem(item, checked=True)

Actually checks/uncheks an item, sending (eventually) the two events EVT_TREE_ITEM_CHECKING and EVT_TREE_ITEM_CHECKED.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • checkedTrue to check an item, False to uncheck it.
CheckItem2(item, checked=True, torefresh=False)

Used internally to avoid EVT_TREE_ITEM_CHECKED events.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • checkedTrue to check an item, False to uncheck it;
  • torefresh – whether to redraw the item or not.
CheckSameLevel(item, checked=False)

Uncheck radio items which are on the same level of the checked one. Used internally.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • checkedTrue to check an item, False to uncheck it.
Note :

This method is meaningful only for radiobutton-like items.

Children

See GetChildren

ChildrenClosing(item)

We are about to destroy the item children.

Parameters:item – an instance of L{GenericTreeItem}.
ClassName

See GetClassName

ClearBackground(*args, **kwargs)

ClearBackground(self)

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

ClientAreaOrigin

See GetClientAreaOrigin

ClientRect

See GetClientRect and SetClientRect

ClientSize

See GetClientSize and SetClientSize

ClientToScreen(*args, **kwargs)

ClientToScreen(self, Point pt) -> Point

Converts to screen coordinates from coordinates relative to this window.

ClientToScreenXY(*args, **kwargs)

ClientToScreenXY(int x, int y) -> (x,y)

Converts to screen coordinates from coordinates relative to this window.

ClientToWindowSize(*args, **kwargs)

ClientToWindowSize(self, Size size) -> Size

Close(*args, **kwargs)

Close(self, bool force=False) -> bool

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.

Collapse(item)

Collapse an item, sending a EVT_TREE_ITEM_COLLAPSING and EVT_TREE_ITEM_COLLAPSED events.

Parameters:item – an instance of L{GenericTreeItem}.
CollapseAndReset(item)

Collapse the given item and deletes its children.

Parameters:item – an instance of L{GenericTreeItem}.
Connect(*args, **kwargs)

Connect(self, int id, int lastId, int eventType, PyObject func)

Constraints

See GetConstraints and SetConstraints

ContainingSizer

See GetContainingSizer and SetContainingSizer

ConvertDialogPointToPixels(*args, **kwargs)

ConvertDialogPointToPixels(self, Point pt) -> Point

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.

ConvertDialogSizeToPixels(*args, **kwargs)

ConvertDialogSizeToPixels(self, Size sz) -> Size

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.

ConvertPixelPointToDialog(*args, **kwargs)

ConvertPixelPointToDialog(self, Point pt) -> Point

ConvertPixelSizeToDialog(*args, **kwargs)

ConvertPixelSizeToDialog(self, Size sz) -> Size

Create(*args, **kwargs)
Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL, String name=PanelNameStr) -> bool

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

Cursor

See GetCursor and SetCursor

DLG_PNT(*args, **kwargs)

DLG_PNT(self, Point pt) -> Point

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.

DLG_SZE(*args, **kwargs)

DLG_SZE(self, Size sz) -> Size

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.

DefaultAttributes

See GetDefaultAttributes

Delete(item)

Deletes an item.

Parameters:item – an instance of L{GenericTreeItem}.
DeleteAllItems()

Deletes all items in the L{CustomTreeCtrl}.

DeleteChildren(item)

Delete all the item’s children.

Parameters:item – an instance of L{GenericTreeItem}.
DeleteItemWindow(item)

Deletes the window associated to an item (if any).

Parameters:item – an instance of L{GenericTreeItem}.
Destroy(*args, **kwargs)

Destroy(self) -> bool

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.

DestroyChildren(*args, **kwargs)

DestroyChildren(self) -> bool

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

Disable(*args, **kwargs)

Disable(self) -> bool

Disables the window, same as Enable(false).

Disconnect(*args, **kwargs)
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL,
PyObject func=None) -> bool
DissociateHandle(*args, **kwargs)

DissociateHandle(self)

Dissociate the current native handle from the window

DoEraseBackground(*args, **kwargs)

DoEraseBackground(self, DC dc) -> bool

DoGetBestSize()

Gets the size which best suits the window: for a control, it would be the minimal size which doesn’t truncate the control, for a panel - the same size as it would have after a call to Fit().

DoGetClientSize(*args, **kwargs)

DoGetClientSize() -> (width, height)

DoGetPosition(*args, **kwargs)

DoGetPosition() -> (x,y)

DoGetSize(*args, **kwargs)

DoGetSize() -> (width, height)

DoGetVirtualSize(*args, **kwargs)

DoGetVirtualSize(self) -> Size

DoInsertItem(parentId, previous, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Actually inserts an item in the tree.

Parameters:
  • parentId – an instance of L{GenericTreeItem} representing the item’s parent;
  • previous – the index at which we should insert the item;
  • text – the item text label;
  • ct_type – the item type (see L{SetItemType} for a list of valid item types);
  • wnd – if not None, a non-toplevel window to show next to the item;
  • image – an index within the normal image list specifying the image to use for the item in unselected state;
  • selImage – an index within the normal image list specifying the image to use for the item in selected state; if image > -1 and selImage is -1, the same image is used for both selected and unselected items;
  • data – associate the given Python object data with the item.
DoMoveWindow(*args, **kwargs)

DoMoveWindow(self, int x, int y, int width, int height)

DoPrepareDC(*args, **kwargs)

DoPrepareDC(self, DC dc)

Normally what is called by PrepareDC.

DoSelectItem(item, unselect_others=True, extended_select=False)

Actually selects/unselects an item, sending EVT_TREE_SEL_CHANGING and EVT_TREE_SEL_CHANGED events.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • unselect_others – if True, all the other selected items are unselected.
  • extended_selectTrue if the L{CustomTreeCtrl} is using the TR_EXTENDED style.
DoSetClientSize(*args, **kwargs)

DoSetClientSize(self, int width, int height)

DoSetSize(*args, **kwargs)

DoSetSize(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)

DoSetVirtualSize(*args, **kwargs)

DoSetVirtualSize(self, int x, int y)

DragAcceptFiles(*args, **kwargs)

DragAcceptFiles(self, bool accept)

Enables or disables eligibility for drop file events, EVT_DROP_FILES.

DrawHorizontalGradient(dc, rect, hasfocus)

Gradient fill from colour 1 to colour 2 from left to right.

Parameters:
  • dc – an instance of wx.DC;
  • rect – the rectangle to be filled with the gradient shading;
  • hasfocusTrue if the main L{CustomTreeCtrl} has focus, False otherwise.
DrawVerticalGradient(dc, rect, hasfocus)

Gradient fill from colour 1 to colour 2 from top to bottom.

Parameters:
  • dc – an instance of wx.DC;
  • rect – the rectangle to be filled with the gradient shading;
  • hasfocusTrue if the main L{CustomTreeCtrl} has focus, False otherwise.
DrawVistaRectangle(dc, rect, hasfocus)

Draws the selected item(s) with the Windows Vista style.

Parameters:
  • dc – an instance of wx.DC;
  • rect – the rectangle to be filled with the gradient shading;
  • hasfocusTrue if the main L{CustomTreeCtrl} has focus, False otherwise.
DropTarget

See GetDropTarget and SetDropTarget

Edit(item)

Internal function. Starts the editing of an item label, sending a EVT_TREE_BEGIN_LABEL_EDIT event.

Parameters:item – an instance of L{GenericTreeItem}.
EditLabel(item)

Starts editing an item label.

Parameters:item – an instance of L{GenericTreeItem}.
EffectiveMinSize

See GetEffectiveMinSize

Enable(*args, **kwargs)

Enable(self, bool enable=True) -> bool

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.

EnableChildren(item, enable=True)

Enables/disables the item children.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • enableTrue to enable the children, False otherwise.
Note :

This method is used internally.

EnableItem(item, enable=True, torefresh=True)

Enables/disables an item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • enableTrue to enable the item, False otherwise;
  • torefresh – whether to redraw the item or not.
EnableScrolling(*args, **kwargs)

EnableScrolling(self, bool x_scrolling, bool y_scrolling)

EnableSelectionGradient(enable=True)

Globally enables/disables drawing of gradient selections.

Parameters:enableTrue to enable gradient-style selections, False to disable it.
Note :Calling this method disables any Vista-style selection previously enabled.
EnableSelectionVista(enable=True)

Globally enables/disables drawing of Windows Vista selections.

Parameters:enableTrue to enable Vista-style selections, False to disable it.
Note :Calling this method disables any gradient-style selection previously enabled.
Enabled

See IsEnabled and Enable

EnsureVisible(item)

Scrolls and/or expands items to ensure that the given item is visible.

Parameters:item – an instance of L{GenericTreeItem}.
EventHandler

See GetEventHandler and SetEventHandler

EvtHandlerEnabled

See GetEvtHandlerEnabled and SetEvtHandlerEnabled

Expand(item)

Expands an item, sending a EVT_TREE_ITEM_EXPANDING and EVT_TREE_ITEM_EXPANDED events.

Parameters:item – an instance of L{GenericTreeItem}.
ExpandAll()

Expands all L{CustomTreeCtrl} items.

Note :This method suppresses the EVT_TREE_ITEM_EXPANDING and EVT_TREE_ITEM_EXPANDED events because expanding many items int the control would be too slow then.
ExpandAllChildren(item)

Expands all the items children of the input item.

Parameters:item – an instance of L{GenericTreeItem}.
Note :This method suppresses the EVT_TREE_ITEM_EXPANDING and EVT_TREE_ITEM_EXPANDED events because expanding many items int the control would be too slow then.
ExtraStyle

See GetExtraStyle and SetExtraStyle

FillArray(item, array=[])

Internal function. Used to populate an array of selected items when the style TR_MULTIPLE is used.

static FindFocus(*args, **kwargs)

FindFocus() -> Window

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

FindItem(idParent, prefixOrig)

Finds the first item starting with the given prefix after the given parent.

Parameters:
  • idParent – an instance of L{GenericTreeItem};
  • prefixOrig – a string containing the item text prefix.
FindWindowById(*args, **kwargs)

FindWindowById(self, long winid) -> Window

Find a child of this window by window ID

FindWindowByLabel(*args, **kwargs)

FindWindowByLabel(self, String label) -> Window

Find a child of this window by label

FindWindowByName(*args, **kwargs)

FindWindowByName(self, String name) -> Window

Find a child of this window by name

Fit(*args, **kwargs)

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(*args, **kwargs)

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.

Font

See GetFont and SetFont

ForegroundColour

See GetForegroundColour and SetForegroundColour

Freeze()

Freeze L{CustomTreeCtrl}.

Freezes the window or, in other words, prevents any updates from taking place on screen, the window is not redrawn at all. L{Thaw} must be called to reenable window redrawing. Calls to these two functions may be nested.

Note :This method is useful for visual appearance optimization (for example, it is a good idea to use it before doing many large text insertions in a row into a wx.TextCtrl under wxGTK) but is not implemented on all platforms nor for all controls so it is mostly just a hint to wxWidgets and not a mandatory directive.
GetAGWWindowStyleFlag()

Returns the L{CustomTreeCtrl} style.

GetAcceleratorTable(*args, **kwargs)

GetAcceleratorTable(self) -> AcceleratorTable

Gets the accelerator table for this window.

GetAdjustedBestSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetAutoLayout(*args, **kwargs)

GetAutoLayout(self) -> bool

Returns the current autoLayout setting

GetBackgroundColour(*args, **kwargs)

GetBackgroundColour(self) -> Colour

Returns the background colour of the window.

GetBackgroundImage()

Returns the L{CustomTreeCtrl} background image (if any).

Note :At present, the background image can only be used in “tile” mode.
Todo :Support background images also in stretch and centered modes.
GetBackgroundStyle(*args, **kwargs)

GetBackgroundStyle(self) -> int

Returns the background style of the window.

See :SetBackgroundStyle
GetBestFittingSize(*args, **kwargs)

Use GetEffectiveMinSize instead.

GetBestSize(*args, **kwargs)

GetBestSize(self) -> Size

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestSizeTuple(*args, **kwargs)

GetBestSizeTuple() -> (width, height)

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 (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.

GetBestVirtualSize(*args, **kwargs)

GetBestVirtualSize(self) -> Size

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

GetBorder(*args)

GetBorder(self, long flags) -> int GetBorder(self) -> int

Get border for the flags of this window

GetBorderPen()

Returns the pen used to draw the selected item border.

Note :The border pen is not used if the Windows Vista selection style is applied.
GetBoundingRect(item, textOnly=False)

Retrieves the rectangle bounding the item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • textOnly – if True, only the rectangle around the item’s label will be returned, otherwise the item’s image is also taken into account.
Note :

The rectangle coordinates are logical, not physical ones. So, for example, the x coordinate may be negative if the tree has a horizontal scrollbar and its position is not 0.

GetButtonsImageList()

Returns the buttons image list associated with L{CustomTreeCtrl} (from which application-defined button images are taken).

static GetCapture(*args, **kwargs)

GetCapture() -> Window

Returns the window which currently captures the mouse or None

GetCaret(*args, **kwargs)

GetCaret(self) -> Caret

Returns the caret associated with the window.

GetCharHeight(*args, **kwargs)

GetCharHeight(self) -> int

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

GetCharWidth(*args, **kwargs)

GetCharWidth(self) -> int

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

GetChildren(*args, **kwargs)

GetChildren(self) -> WindowList

Returns an object containing a list of the window’s children. The object provides a Python sequence-like interface over the internal list maintained by the window..

GetChildrenCount(item, recursively=True)

Returns the item children count.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • recursively – if True, returns the total number of descendants, otherwise only one level of children is counted.
classmethod GetClassDefaultAttributes()

Returns the default font and colours which are used by the control. 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 users system, especially if it uses themes.

This static method is “overridden’’ in many derived classes and so calling, for example, wx.Button.GetClassDefaultAttributes() will typically return the values appropriate for a button which will be normally different from those returned by, say, wx.ListCtrl.GetClassDefaultAttributes().

Note :The wx.VisualAttributes structure has at least the fields font, colFg and colBg. All of them may be invalid if it was not possible to determine the default control appearance or, especially for the background colour, if the field doesn’t make sense as is the case for colBg for the controls with themed background.
Note :Overridden from wx.PyControl.
GetClassName(*args, **kwargs)

GetClassName(self) -> String

Returns the class name of the C++ class using wxRTTI.

GetClientAreaOrigin(*args, **kwargs)

GetClientAreaOrigin(self) -> Point

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

GetClientRect(*args, **kwargs)

GetClientRect(self) -> Rect

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

GetClientSize(*args, **kwargs)

GetClientSize(self) -> Size

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.

GetClientSizeTuple(*args, **kwargs)

GetClientSizeTuple() -> (width, height)

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.

GetConnectionPen()

Returns the pen used to draw the connecting lines between items.

GetConstraints(*args, **kwargs)

GetConstraints(self) -> LayoutConstraints

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

GetContainingSizer(*args, **kwargs)

GetContainingSizer(self) -> Sizer

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

GetControlBmp(checkbox=True, checked=False, enabled=True, x=16, y=16)

Returns a native looking checkbox or radio button bitmap.

Parameters:
  • checkboxTrue to get a checkbox image, False for a radiobutton one;
  • checkedTrue if the control is marked, False if it is not;
  • enabledTrue if the control is enabled, False if it is not;
  • x – the width of the bitmap;
  • y – the height of the bitmap.
GetCount()

Returns the global number of items in the tree.

GetCursor(*args, **kwargs)

GetCursor(self) -> Cursor

Return the cursor associated with this window.

GetDefaultAttributes(*args, **kwargs)

GetDefaultAttributes(self) -> VisualAttributes

GetDisabledColour()

Returns the colour for items in a disabled state.

GetDropTarget(*args, **kwargs)

GetDropTarget(self) -> DropTarget

Returns the associated drop target, which may be None.

GetEditControl()

Returns a pointer to the edit L{TreeTextCtrl} if the item is being edited or None otherwise (it is assumed that no more than one item may be edited simultaneously).

GetEffectiveMinSize(*args, **kwargs)

GetEffectiveMinSize(self) -> Size

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.

GetEventHandler(*args, **kwargs)

GetEventHandler(self) -> EvtHandler

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

GetEvtHandlerEnabled(*args, **kwargs)

GetEvtHandlerEnabled(self) -> bool

GetExtraStyle(*args, **kwargs)

GetExtraStyle(self) -> long

Returns the extra style bits for the window.

GetFirstChild(item)

Returns the item’s first child and an integer value ‘cookie’. Call L{GetNextChild} for the next child using this very ‘cookie’ return value as an input.

Parameters:item – an instance of L{GenericTreeItem}.
Note :This method returns None if there are no further children.
GetFirstGradientColour()

Returns the first gradient colour for gradient-style selections.

GetFirstVisibleItem()

Returns the first visible item.

GetFont(*args, **kwargs)

GetFont(self) -> Font

Returns the default font used for this window.

GetForegroundColour(*args, **kwargs)

GetForegroundColour(self) -> Colour

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.

GetFullTextExtent(*args, **kwargs)
GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)

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

GetGradientStyle()

Returns the gradient style for gradient-style selections.

Returns:0 for horizontal gradient-style selections, 1 for vertical gradient-style selections.
GetGrandParent(*args, **kwargs)

GetGrandParent(self) -> Window

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

GetGtkWidget(*args, **kwargs)

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

GetHandle(*args, **kwargs)

GetHandle(self) -> long

Returns the platform-specific handle (as a long integer) of the physical window. On wxMSW this is the win32 window handle, on wxGTK it is the XWindow ID, and on wxMac it is the ControlRef.

GetHelpText(*args, **kwargs)

GetHelpText(self) -> String

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.

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

GetHilightFocusColour()

Returns the colour used to highlight focused selected items.

Note :This is used only if gradient and Windows Vista selection styles are disabled.
GetHilightNonFocusColour()

Returns the colour used to highlight unfocused selected items.

Note :This is used only if gradient and Windows Vista selection styles are disabled.
GetHyperTextFont()

Returns the font used to render hypertext items.

GetHyperTextNewColour()

Returns the colour used to render a non-visited hypertext item.

GetHyperTextVisitedColour()

Returns the colour used to render a visited hypertext item.

GetId(*args, **kwargs)

GetId(self) -> int

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.

GetImageList()

Returns the normal image list associated with L{CustomTreeCtrl}.

GetImageListCheck()

Returns the image list used to build the check/radio buttons in L{CustomTreeCtrl}.

GetIndent()

Returns the item indentation.

GetItemBackgroundColour(item)

Returns the item background colour.

Parameters:item – an instance of L{GenericTreeItem}.
GetItemFont(item)

Returns the item font.

Parameters:item – an instance of L{GenericTreeItem}.
GetItemImage(item, which=0)

Returns the item image.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • which

    can be one of the following bits:

    Item State Description
    TreeItemIcon_Normal To get the normal item image
    TreeItemIcon_Selected To get the selected item image (i.e. the image which is shown when the item is currently selected)
    TreeItemIcon_Expanded To get the expanded image (this only makes sense for items which have children - then this image is shown when the item is expanded and the normal image is shown when it is collapsed)
    TreeItemIcon_SelectedExpanded To get the selected expanded image (which is shown when an expanded item is currently selected)
GetItemParent(item)

Returns the item parent (can be None for root items).

Parameters:item – an instance of L{GenericTreeItem}.
GetItemPyData(item)

Returns the data associated to an item.

Parameters:item – an instance of L{GenericTreeItem}.
GetItemText(item)

Returns the item text.

Parameters:item – an instance of L{GenericTreeItem}.
GetItemTextColour(item)

Returns the item text colour.

Parameters:item – an instance of L{GenericTreeItem}.
GetItemType(item)

Returns the item type.

Parameters:item – an instance of L{GenericTreeItem}.
See :L{SetItemType} for a description of valid item types.
GetItemVisited(item)

Returns whether an hypertext item was visited.

Parameters:item – an instance of L{GenericTreeItem}.
GetItemWindow(item)

Returns the window associated to the item (if any).

Parameters:item – an instance of L{GenericTreeItem}.
GetItemWindowEnabled(item)

Returns whether the window associated to the item is enabled.

Parameters:item – an instance of L{GenericTreeItem}.
GetLabel(*args, **kwargs)

GetLabel(self) -> String

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.

GetLastChild(item)

Returns the item last child.

Parameters:item – an instance of L{GenericTreeItem}.
GetLayoutDirection(*args, **kwargs)

GetLayoutDirection(self) -> int

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

GetLineHeight(item)

Returns the line height for the given item.

Parameters:item – an instance of L{GenericTreeItem}.
GetMaxHeight(*args, **kwargs)

GetMaxHeight(self) -> int

GetMaxSize(*args, **kwargs)

GetMaxSize(self) -> Size

GetMaxWidth(respect_expansion_state=True)

Returns the maximum width of the L{CustomTreeCtrl}.

Parameters:respect_expansion_state – if True, only the expanded items (and their children) will be measured. Otherwise all the items are expanded and their width measured.
GetMinHeight(*args, **kwargs)

GetMinHeight(self) -> int

GetMinSize(*args, **kwargs)

GetMinSize(self) -> Size

GetMinWidth(*args, **kwargs)

GetMinWidth(self) -> int

GetName(*args, **kwargs)

GetName(self) -> String

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.

GetNext(item)

Returns the next item. Only for internal use right now.

Parameters:item – an instance of L{GenericTreeItem}.
GetNextActiveItem(item, down=True)

Returns the next active item. Used Internally at present.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • downTrue to search downwards in the hierarchy for an active item, False to search upwards.
GetNextChild(item, cookie)

Returns the item’s next child.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • cookie – a parameter which is opaque for the application but is necessary for the library to make these functions reentrant (i.e. allow more than one enumeration on one and the same object simultaneously).
Note :

This method returns None if there are no further children.

GetNextHandler(*args, **kwargs)

GetNextHandler(self) -> EvtHandler

GetNextSibling(item)

Returns the next sibling of an item.

Parameters:item – an instance of L{GenericTreeItem}.
Note :This method returns None if there are no further siblings.
GetNextVisible(item)

Returns the next visible item.

Parameters:item – an instance of L{GenericTreeItem}.
GetParent(*args, **kwargs)

GetParent(self) -> Window

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

GetPosition(*args, **kwargs)

GetPosition(self) -> Point

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.

GetPositionTuple(*args, **kwargs)

GetPositionTuple() -> (x,y)

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.

GetPrevSibling(item)

Returns the previous sibling of an item.

Parameters:item – an instance of L{GenericTreeItem}.
Note :This method returns None if there are no further siblings.
GetPrevVisible(item)

Returns the previous visible item.

Parameters:item – an instance of L{GenericTreeItem}.
GetPreviousHandler(*args, **kwargs)

GetPreviousHandler(self) -> EvtHandler

GetPyData(item)

Returns the data associated to an item.

Parameters:item – an instance of L{GenericTreeItem}.
GetRect(*args, **kwargs)

GetRect(self) -> Rect

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

GetRootItem()

Returns the root item.

GetScaleX(*args, **kwargs)

GetScaleX(self) -> double

GetScaleY(*args, **kwargs)

GetScaleY(self) -> double

GetScreenPosition(*args, **kwargs)

GetScreenPosition(self) -> Point

Get the position of the window in screen coordinantes.

GetScreenPositionTuple(*args, **kwargs)

GetScreenPositionTuple() -> (x,y)

Get the position of the window in screen coordinantes.

GetScreenRect(*args, **kwargs)

GetScreenRect(self) -> Rect

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

GetScrollPageSize(*args, **kwargs)

GetScrollPageSize(self, int orient) -> int

GetScrollPixelsPerUnit(*args, **kwargs)

GetScrollPixelsPerUnit() -> (xUnit, yUnit)

Get the size of one logical unit in physical units.

GetScrollPos(*args, **kwargs)

GetScrollPos(self, int orientation) -> int

Returns the built-in scrollbar position.

GetScrollRange(*args, **kwargs)

GetScrollRange(self, int orientation) -> int

Returns the built-in scrollbar range.

GetScrollThumb(*args, **kwargs)

GetScrollThumb(self, int orientation) -> int

Returns the built-in scrollbar thumb size.

GetSecondGradientColour()

Returns the second gradient colour for gradient-style selections.

GetSelection()

Returns the current selection.

Note :This method is valid only with the style TR_SINGLE set. Use L{GetSelections} for multiple-selections trees.
GetSelections()

Returns a list of selected items.

Note :This method can be used only if L{CustomTreeCtrl} has the TR_MULTIPLE style set.
GetSize(*args, **kwargs)

GetSize(self) -> Size

Get the window size.

GetSizeTuple(*args, **kwargs)

GetSizeTuple() -> (width, height)

Get the window size.

GetSizer(*args, **kwargs)

GetSizer(self) -> Sizer

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

GetSpacing()

Returns the spacing between the start and the text.

GetStateImageList()

Returns the state image list associated with L{CustomTreeCtrl} (from which application-defined state images are taken).

GetTargetRect(*args, **kwargs)

GetTargetRect(self) -> Rect

GetTargetWindow(*args, **kwargs)

GetTargetWindow(self) -> Window

GetTextExtent(*args, **kwargs)

GetTextExtent(String string) -> (width, height)

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

GetThemeEnabled(*args, **kwargs)

GetThemeEnabled(self) -> bool

Return the themeEnabled flag.

GetToolTip(*args, **kwargs)

GetToolTip(self) -> ToolTip

get the associated tooltip or None if none

GetTopLevelParent(*args, **kwargs)

GetTopLevelParent(self) -> Window

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

GetUpdateClientRect(*args, **kwargs)

GetUpdateClientRect(self) -> Rect

Get the update rectangle region bounding box in client coords.

GetUpdateRegion(*args, **kwargs)

GetUpdateRegion(self) -> Region

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

GetValidator(*args, **kwargs)

GetValidator(self) -> Validator

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

GetViewStart(*args, **kwargs)

GetViewStart() -> (x,y)

Get the view start

GetVirtualSize(*args, **kwargs)

GetVirtualSize(self) -> Size

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.

GetVirtualSizeTuple(*args, **kwargs)

GetVirtualSizeTuple() -> (width, height)

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.

GetWindowBorderSize(*args, **kwargs)

GetWindowBorderSize(self) -> Size

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

GetWindowStyle(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowStyleFlag(*args, **kwargs)

GetWindowStyleFlag(self) -> long

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

GetWindowVariant(*args, **kwargs)

GetWindowVariant(self) -> int

GrandParent

See GetGrandParent

GtkWidget

GetGtkWidget(self) -> long

On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.

Handle

See GetHandle

Handles the hyperlink items, sending the EVT_TREE_ITEM_HYPERLINK event.

Parameters:item – an instance of L{GenericTreeItem}.
HasAGWFlag(flag)

Returns True if L{CustomTreeCtrl} has the flag bit set.

Parameters:flag – any possible window style for L{CustomTreeCtrl}.
See :The L{__init__} method for the flag parameter description.
HasButtons()

Returns whether L{CustomTreeCtrl} has the TR_HAS_BUTTONS flag set.

HasCapture(*args, **kwargs)

HasCapture(self) -> bool

Returns true if this window has the current mouse capture.

HasChildren(item)

Returns whether an item has children or not.

Parameters:item – an instance of L{GenericTreeItem}.
HasFlag(*args, **kwargs)

HasFlag(self, int flag) -> bool

Test if the given style is set for this window.

HasMultiplePages(*args, **kwargs)

HasMultiplePages(self) -> bool

HasScrollbar(*args, **kwargs)

HasScrollbar(self, int orient) -> bool

Does the window have the scrollbar for this orientation?

HasTransparentBackground(*args, **kwargs)

HasTransparentBackground(self) -> bool

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.

HelpText

See GetHelpText and SetHelpText

Hide(*args, **kwargs)

Hide(self) -> bool

Equivalent to calling Show(False).

HideWindows()

Hides the windows associated to the items. Used internally.

HitTest(point, flags=0)

Calculates which (if any) item is under the given point, returning the tree item at this point plus extra information flags.

Parameters:
  • point – an instance of wx.Point, a point to test for hits;
  • flags

    a bitlist of the following values:

    HitTest Flags Hex Value Description
    TREE_HITTEST_ABOVE 0x1 Above the client area
    TREE_HITTEST_BELOW 0x2 Below the client area
    TREE_HITTEST_NOWHERE 0x4 No item has been hit
    TREE_HITTEST_ONITEMBUTTON 0x8 On the button associated to an item
    TREE_HITTEST_ONITEMICON 0x10 On the icon associated to an item
    TREE_HITTEST_ONITEMINDENT 0x20 On the indent associated to an item
    TREE_HITTEST_ONITEMLABEL 0x40 On the label (string) associated to an item
    TREE_HITTEST_ONITEM 0x50 Anywhere on the item
    TREE_HITTEST_ONITEMRIGHT 0x80 On the right of the label associated to an item
    TREE_HITTEST_TOLEFT 0x200 On the left of the client area
    TREE_HITTEST_TORIGHT 0x400 On the right of the client area
    TREE_HITTEST_ONITEMUPPERPART 0x800 On the upper part (first half) of the item
    TREE_HITTEST_ONITEMLOWERPART 0x1000 On the lower part (second half) of the item
    TREE_HITTEST_ONITEMCHECKICON 0x2000 On the check/radio icon, if present
Note :

both the item (if any, None otherwise) and the flags are always returned as a tuple.

HitTestXY(*args, **kwargs)

HitTestXY(self, int x, int y) -> int

Test where the given (in client coords) point lies

Id

See GetId and SetId

InheritAttributes(*args, **kwargs)

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.

InheritsBackgroundColour(*args, **kwargs)

InheritsBackgroundColour(self) -> bool

InitDialog(*args, **kwargs)

InitDialog(self)

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

InsertItem(parentId, input, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Inserts an item after the given previous.

See :L{InsertItemByIndex} and L{InsertItemByItem} for an explanation of the input parameters.
InsertItemByIndex(parentId, before, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Inserts an item after the given previous.

Parameters:
  • parentId – an instance of L{GenericTreeItem} representing the item’s parent;
  • before – the index at which we should insert the new item;
  • text – the item text label;
  • ct_type – the item type (see L{SetItemType} for a list of valid item types);
  • wnd – if not None, a non-toplevel window to show next to the item;
  • image – an index within the normal image list specifying the image to use for the item in unselected state;
  • selImage – an index within the normal image list specifying the image to use for the item in selected state; if image > -1 and selImage is -1, the same image is used for both selected and unselected items;
  • data – associate the given Python object data with the item.
InsertItemByItem(parentId, idPrevious, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Inserts an item after the given previous.

Parameters:
  • parentId – an instance of L{GenericTreeItem} representing the item’s parent;
  • idPrevious – an instance of L{GenericTreeItem} representing the previous item;
  • text – the item text label;
  • ct_type – the item type (see L{SetItemType} for a list of valid item types);
  • wnd – if not None, a non-toplevel window to show next to the item;
  • image – an index within the normal image list specifying the image to use for the item in unselected state;
  • selImage – an index within the normal image list specifying the image to use for the item in selected state; if image > -1 and selImage is -1, the same image is used for both selected and unselected items;
  • data – associate the given Python object data with the item.
InvalidateBestSize(*args, **kwargs)

InvalidateBestSize(self)

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

IsBeingDeleted(*args, **kwargs)

IsBeingDeleted(self) -> bool

Is the window in the process of being deleted?

IsBold(item)

Returns whether the item font is bold or not.

Parameters:item – an instance of L{GenericTreeItem}.
IsDescendantOf(parent, item)

Checks if the given item is under another one in the tree hierarchy.

Parameters:
  • parent – an instance of L{GenericTreeItem}, representing the possible parent of item;
  • item – another instance of L{GenericTreeItem}.
IsDoubleBuffered(*args, **kwargs)

IsDoubleBuffered(self) -> bool

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.

IsEnabled(*args, **kwargs)

IsEnabled(self) -> bool

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

IsExpanded(item)

Returns whether the item is expanded or not.

Parameters:item – an instance of L{GenericTreeItem}.
IsExposed(*args, **kwargs)

IsExposed(self, int x, int y, int w=1, int h=1) -> bool

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.

IsExposedPoint(*args, **kwargs)

IsExposedPoint(self, Point pt) -> bool

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.

IsExposedRect(*args, **kwargs)

IsExposedRect(self, Rect rect) -> bool

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.

IsFrozen(*args, **kwargs)

IsFrozen(self) -> bool

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

See :Freeze and Thaw
IsItalic(item)

Returns whether the item font is italic or not.

Parameters:item – an instance of L{GenericTreeItem}.
IsItemChecked(item)

Returns whether an item is checked or not.

Parameters:item – an instance of L{GenericTreeItem}.
Note :This method is meaningful only for checkbox-like and radiobutton-like items.
IsItemEnabled(item)

Returns whether an item is enabled or disabled.

Parameters:item – an instance of L{GenericTreeItem}.
IsItemHyperText(item)

Returns whether an item is hypertext or not.

Parameters:item – an instance of L{GenericTreeItem}.
IsRetained(*args, **kwargs)

IsRetained(self) -> bool

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

IsSameAs(*args, **kwargs)

IsSameAs(self, Object p) -> bool

For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.

IsSelected(item)

Returns whether the item is selected or not.

Parameters:item – an instance of L{GenericTreeItem}.
IsShown(*args, **kwargs)

IsShown(self) -> bool

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

IsShownOnScreen(*args, **kwargs)

IsShownOnScreen(self) -> bool

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.

IsTopLevel(*args, **kwargs)

IsTopLevel(self) -> bool

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

IsVisible(item)

Returns whether the item is visible or not (i.e., its hierarchy is expanded enough to show the item).

Parameters:item – an instance of L{GenericTreeItem}.
ItemHasChildren(item)

Returns whether the item has children or not.

Parameters:item – an instance of L{GenericTreeItem}.
Label

See GetLabel and SetLabel

Layout(*args, **kwargs)

Layout(self) -> bool

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.

LayoutDirection

See GetLayoutDirection and SetLayoutDirection

LineDown(*args, **kwargs)

LineDown(self) -> bool

This is just a wrapper for ScrollLines(1).

LineUp(*args, **kwargs)

LineUp(self) -> bool

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

Lower(*args, **kwargs)

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(*args, **kwargs)

MakeModal(self, bool 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.

MaxHeight

See GetMaxHeight

MaxSize

See GetMaxSize and SetMaxSize

MaxWidth

See GetMaxWidth

MinHeight

See GetMinHeight

MinSize

See GetMinSize and SetMinSize

MinWidth

See GetMinWidth

Move(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

MoveAfterInTabOrder(*args, **kwargs)

MoveAfterInTabOrder(self, Window 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.

MoveBeforeInTabOrder(*args, **kwargs)

MoveBeforeInTabOrder(self, Window win)

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

MoveXY(*args, **kwargs)

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

Moves the window to the given position.

Name

See GetName and SetName

Navigate(*args, **kwargs)

Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool

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

static NewControlId(*args, **kwargs)

NewControlId() -> int

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

static NextControlId(*args, **kwargs)

NextControlId(int winid) -> int

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

NextHandler

See GetNextHandler and SetNextHandler

OnCompareItems(item1, item2)

Returns whether 2 items have the same text.

Override this function in the derived class to change the sort order of the items in the L{CustomTreeCtrl}. The function should return a negative, zero or positive value if the first item is less than, equal to or greater than the second one.

Parameters:
  • item1 – an instance of L{GenericTreeItem};
  • item2 – another instance of L{GenericTreeItem}.
Note :

The base class version compares items alphabetically.

OnDestroy(event)

Handles the wx.EVT_WINDOW_DESTROY event for L{CustomTreeCtrl}.

Parameters:event – a wx.WindowDestroyEvent event to be processed.
OnEraseBackground(event)

Handles the wx.EVT_ERASE_BACKGROUND event for L{CustomTreeCtrl}.

Parameters:event – a wx.EraseEvent event to be processed.
OnGetToolTip(event)

Process the tooltip event, to speed up event processing. Does not actually get a tooltip.

Parameters:event – a L{TreeEvent} event to be processed.
OnInternalIdle()

This method is normally only used internally, but sometimes an application may need it to implement functionality that should not be disabled by an application defining an OnIdle handler in a derived class.

This method may be used to do delayed painting, for example, and most implementations call wx.Window.UpdateWindowUI in order to send update events to the window in idle time.

OnKeyDown(event)

Handles the wx.EVT_KEY_DOWN event for L{CustomTreeCtrl}, sending a EVT_TREE_KEY_DOWN event.

Parameters:event – a wx.KeyEvent event to be processed.
OnKillFocus(event)

Handles the wx.EVT_KILL_FOCUS event for L{CustomTreeCtrl}.

Parameters:event – a wx.FocusEvent event to be processed.
OnMouse(event)

Handles a bunch of wx.EVT_MOUSE_EVENTS events for L{CustomTreeCtrl}.

Parameters:event – a wx.MouseEvent event to be processed.
OnPaint(event)

Handles the wx.EVT_PAINT event for L{CustomTreeCtrl}.

Parameters:event – a wx.PaintEvent event to be processed.
OnRenameAccept(item, value)

Called by L{TreeTextCtrl}, to accept the changes and to send the EVT_TREE_END_LABEL_EDIT event.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • value – the new value of the item label.
OnRenameCancelled(item)

Called by L{TreeTextCtrl}, to cancel the changes and to send the EVT_TREE_END_LABEL_EDIT event.

Parameters:item – an instance of L{GenericTreeItem}.
OnRenameTimer()

The timer for renaming has expired. Start editing.

OnSetFocus(event)

Handles the wx.EVT_SET_FOCUS event for L{CustomTreeCtrl}.

Parameters:event – a wx.FocusEvent event to be processed.
OnSize(event)

Handles the wx.EVT_SIZE event for L{CustomTreeCtrl}.

Parameters:event – a wx.SizeEvent event to be processed.
PageDown(*args, **kwargs)

PageDown(self) -> bool

This is just a wrapper for ScrollPages(1).

PageUp(*args, **kwargs)

PageUp(self) -> bool

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

PaintItem(item, dc, level, align)

Actually draws an item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • dc – an instance of wx.DC;
  • level – the item level in the tree hierarchy;
  • alignTrue if we want to align windows (in items with windows) at the same horizontal position.
PaintLevel(item, dc, level, y, align)

Paint a level in the hierarchy of L{CustomTreeCtrl}.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • dc – an instance of wx.DC;
  • level – the item level in the tree hierarchy;
  • y – the current vertical position in the wx.PyScrolledWindow;
  • alignTrue if we want to align windows (in items with windows) at the same horizontal position.
Parent

See GetParent

PopEventHandler(*args, **kwargs)

PopEventHandler(self, bool deleteHandler=False) -> EvtHandler

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.

PopupMenu(*args, **kwargs)

PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool

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.

PopupMenuXY(*args, **kwargs)

PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool

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.

Position

See GetPosition and SetPosition

PostCreate(pre)

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

PrepareDC(*args, **kwargs)

PrepareDC(self, DC 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.

PrependItem(parent, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Prepends an item as a first child of parent.

Parameters:
  • parent – an instance of L{GenericTreeItem} representing the item’s parent;
  • text – the item text label;
  • ct_type – the item type (see L{SetItemType} for a list of valid item types);
  • wnd – if not None, a non-toplevel window to show next to the item;
  • image – an index within the normal image list specifying the image to use for the item in unselected state;
  • selImage – an index within the normal image list specifying the image to use for the item in selected state; if image > -1 and selImage is -1, the same image is used for both selected and unselected items;
  • data – associate the given Python object data with the item.
static PrevControlId(*args, **kwargs)

PrevControlId(int winid) -> int

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

PreviousHandler

See GetPreviousHandler and SetPreviousHandler

ProcessEvent(*args, **kwargs)

ProcessEvent(self, Event event) -> bool

ProcessPendingEvents(*args, **kwargs)

ProcessPendingEvents(self)

PushEventHandler(*args, **kwargs)

PushEventHandler(self, EvtHandler 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 a 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.

Raise(*args, **kwargs)

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.

Rect

See GetRect and SetRect

RecurseOnChildren(item, maxwidth, respect_expansion_state)

Recurses over all the children of the spcified items, calculating their maximum width.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • maxwidth – the current maximum width for L{CustomTreeCtrl};
  • respect_expansion_state – if True, only the expanded items (and their children) will be measured. Otherwise all the items are expanded and their width measured.
Refresh(*args, **kwargs)

Refresh(self, bool eraseBackground=True, Rect 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.

RefreshLine(item)

Refreshes a damaged item line.

Parameters:item – an instance of L{GenericTreeItem}.
RefreshRect(*args, **kwargs)

RefreshRect(self, Rect rect, bool 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.

RefreshSelected()

Refreshes a damaged selected item line.

RefreshSelectedUnder(item)

Refreshes the selected items under the given item.

Parameters:item – an instance of L{GenericTreeItem}.
RefreshSubtree(item)

Refreshes a damaged subtree of an item.

Parameters:item – an instance of L{GenericTreeItem}.
RegisterHotKey(*args, **kwargs)

RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool

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.

ReleaseMouse(*args, **kwargs)

ReleaseMouse(self)

Releases mouse input captured with wx.Window.CaptureMouse.

RemoveChild(*args, **kwargs)

RemoveChild(self, Window child)

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

RemoveEventHandler(*args, **kwargs)

RemoveEventHandler(self, EvtHandler handler) -> bool

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

Reparent(*args, **kwargs)

Reparent(self, Window newParent) -> bool

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)

ResetTextControl()

Called by L{TreeTextCtrl} when it marks itself for deletion.

ScaleX

See GetScaleX

ScaleY

See GetScaleY

ScreenPosition

See GetScreenPosition

ScreenRect

See GetScreenRect

ScreenToClient(*args, **kwargs)

ScreenToClient(self, Point pt) -> Point

Converts from screen to client window coordinates.

ScreenToClientXY(*args, **kwargs)

ScreenToClientXY(int x, int y) -> (x,y)

Converts from screen to client window coordinates.

Scroll(*args, **kwargs)

Scroll(self, int x, int y)

ScrollLines(*args, **kwargs)

ScrollLines(self, int lines) -> bool

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.

ScrollPages(*args, **kwargs)

ScrollPages(self, int pages) -> bool

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.

ScrollTo(item)

Scrolls the specified item into view.

Parameters:item – an instance of L{GenericTreeItem}.
ScrollWindow(*args, **kwargs)

ScrollWindow(self, int dx, int dy, Rect 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.

SelectAll()

Selects all the item in the tree.

SelectAllChildren(item)

Selects all the children of the given item.

Parameters:item – an instance of L{GenericTreeItem}.
SelectItem(item, select=True)

Selects/deselects an item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • selectTrue to select an item, False to deselect it.
SelectItemRange(item1, item2)

Selects all the items between item1 and item2.

Parameters:
  • item1 – an instance of L{GenericTreeItem}, representing the first item in the range to select;
  • item2 – an instance of L{GenericTreeItem}, representing the last item in the range to select.
SendDeleteEvent(item)

Actually sends the EVT_TREE_DELETE_ITEM event.

Parameters:item – an instance of L{GenericTreeItem}.
SendSizeEvent()
SetAGWWindowStyleFlag(agwStyle)

Sets the L{CustomTreeCtrl} window style.

Parameters:agwStyle – the new L{CustomTreeCtrl} window style.
See :The L{__init__} method for the agwStyle parameter description.
SetAcceleratorTable(*args, **kwargs)

SetAcceleratorTable(self, AcceleratorTable accel)

Sets the accelerator table for this window.

SetAutoLayout(*args, **kwargs)

SetAutoLayout(self, bool 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.

SetBackgroundColour(colour)

Changes the background colour of L{CustomTreeCtrl}.

Parameters:colour – the colour to be used as the background colour, pass wx.NullColour to reset to the default colour.
Note :The background colour is usually painted by the default wx.EraseEvent event handler function under Windows and automatically under GTK.
Note :Setting the background colour does not cause an immediate refresh, so you may wish to call wx.Window.ClearBackground or wx.Window.Refresh after calling this function.
Note :Overridden from wx.PyScrolledWindow.
SetBackgroundImage(image)

Sets the L{CustomTreeCtrl} background image.

Parameters:image – if not None, an instance of wx.Bitmap.
Note :At present, the background image can only be used in “tile” mode.
Todo :Support background images also in stretch and centered modes.
SetBackgroundStyle(*args, **kwargs)

SetBackgroundStyle(self, int style) -> bool

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.

See :GetBackgroundStyle, SetBackgroundColour
SetBestFittingSize(*args, **kwargs)

Use SetInitialSize

SetBestSize(*args, **kwargs)

SetInitialSize(self, Size 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.

SetBorderPen(pen)

Sets the pen used to draw the selected item border.

Parameters:pen – an instance of wx.Pen.
Note :The border pen is not used if the Windows Vista selection style is applied.
SetButtonsImageList(imageList)

Sets the buttons image list for L{CustomTreeCtrl} (from which application-defined button images are taken).

Parameters:imageList – an instance of wx.ImageList.
SetCaret(*args, **kwargs)

SetCaret(self, Caret caret)

Sets the caret associated with the window.

SetClientRect(*args, **kwargs)

SetClientRect(self, Rect 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.

SetClientSize(*args, **kwargs)

SetClientSize(self, Size 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.

SetClientSizeWH(*args, **kwargs)

SetClientSizeWH(self, int width, int 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.

SetConnectionPen(pen)

Sets the pen used to draw the connecting lines between items.

Parameters:pen – an instance of wx.Pen.
SetConstraints(*args, **kwargs)

SetConstraints(self, LayoutConstraints 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.

SetContainingSizer(*args, **kwargs)

SetContainingSizer(self, Sizer 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.

SetCursor(*args, **kwargs)

SetCursor(self, Cursor cursor) -> bool

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.

SetDimensions(*args, **kwargs)

SetDimensions(self, int x, int y, int width, int height, int 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 Existing 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.
SetDisabledColour(colour)

Sets the colour for items in a disabled state.

Parameters:colour – a valid wx.Colour instance.
SetDoubleBuffered(*args, **kwargs)

SetDoubleBuffered(self, bool on)

Put the native window into double buffered or composited mode.

SetDropTarget(*args, **kwargs)

SetDropTarget(self, DropTarget dropTarget)

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

SetEventHandler(*args, **kwargs)

SetEventHandler(self, EvtHandler 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.

SetEvtHandlerEnabled(*args, **kwargs)

SetEvtHandlerEnabled(self, bool enabled)

SetExtraStyle(*args, **kwargs)

SetExtraStyle(self, long 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()

SetFirstGradientColour(colour=None)

Sets the first gradient colour for gradient-style selections.

Parameters:colour – if not None, a valid wx.Colour instance. Otherwise, the colour is taken from the system value wx.SYS_COLOUR_HIGHLIGHT.
SetFocus(*args, **kwargs)

SetFocus(self)

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

SetFocusFromKbd(*args, **kwargs)

SetFocusFromKbd(self)

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

SetFocusIgnoringChildren(*args, **kwargs)

SetFocusIgnoringChildren(self)

In contrast to SetFocus (see above) this will set the focus to the panel even of there are child windows in the panel. This is only rarely needed.

SetFont(font)

Sets the L{CustomTreeCtrl} font.

Parameters:font – a valid wx.Font instance.
Note :Overridden from wx.PyScrolledWindow.
SetForegroundColour(colour)

Changes the foreground colour of L{CustomTreeCtrl}.

Parameters:colour – the colour to be used as the foreground colour, pass wx.NullColour to reset to the default colour.
Note :Overridden from wx.PyScrolledWindow.
SetGradientStyle(vertical=0)

Sets the gradient style for gradient-style selections.

Parameters:vertical – 0 for horizontal gradient-style selections, 1 for vertical gradient-style selections.
SetHelpText(*args, **kwargs)

SetHelpText(self, String 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.

SetHelpTextForId(*args, **kwargs)

SetHelpTextForId(self, String text)

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

SetHilightFocusColour(colour)

Sets the colour used to highlight focused selected items.

Parameters:colour – a valid wx.Colour instance.
Note :This is applied only if gradient and Windows Vista selection styles are disabled.
SetHilightNonFocusColour(colour)

Sets the colour used to highlight unfocused selected items.

Parameters:colour – a valid wx.Colour instance.
Note :This is applied only if gradient and Windows Vista selection styles are disabled.
SetHyperTextFont(font)

Sets the font used to render hypertext items.

Parameters:font – a valid wx.Font instance.
SetHyperTextNewColour(colour)

Sets the colour used to render a non-visited hypertext item.

Parameters:colour – a valid wx.Colour instance.
SetHyperTextVisitedColour(colour)

Sets the colour used to render a visited hypertext item.

Parameters:colour – a valid wx.Colour instance.
SetId(*args, **kwargs)

SetId(self, int 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.

SetImageList(imageList)

Sets the normal image list for L{CustomTreeCtrl}.

Parameters:imageList – an instance of wx.ImageList.
SetImageListCheck(sizex, sizey, imglist=None)

Sets the checkbox/radiobutton image list.

Parameters:
  • sizex – the width of the bitmaps in the imglist;
  • sizey – the height of the bitmaps in the imglist;
  • imglist – an instance of wx.ImageList.
SetIndent(indent)

Sets the indentation for L{CustomTreeCtrl}.

Parameters:indent – an integer representing the indentation for the items in the tree.
SetInitialSize(*args, **kwargs)

SetInitialSize(self, Size 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.

SetItemBackgroundColour(item, colour)

Sets the item background colour.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • colour – a valid wx.Colour instance.
SetItemBold(item, bold=True)

Sets the item font as bold/unbold.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • boldTrue to set the item font as bold, False otherwise.
SetItemDropHighlight(item, highlight=True)

Gives the item the visual feedback for drag and drop operations. This is useful when something is dragged from outside the L{CustomTreeCtrl}.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • highlightTrue to highlight the dragged items, False otherwise.
SetItemFont(item, font)

Sets the item font.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • font – a valid wx.Font instance.
SetItemHasChildren(item, has=True)

Forces the appearance/disappearance of the button next to the item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • hasTrue to have a button next to an item, False otherwise.
SetItemHyperText(item, hyper=True)

Sets whether the item is hypertext or not.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • hyperTrue to have an item with hypertext behaviour, False otherwise.
SetItemImage(item, image, which=0)

Sets the item image, depending on the item state.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • image – an index within the normal image list specifying the image to use for the item in the state specified by the which parameter;
  • which – the item state.
See :

L{GetItemImage} for an explanation of the which parameter.

SetItemItalic(item, italic=True)

Sets the item font as italic/non-italic.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • italicTrue to set the item font as italic, False otherwise.
SetItemPyData(item, data)

Sets the data associated to an item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • data – can be any Python object.
SetItemText(item, text)

Sets the item text.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • text – the new item label.
SetItemTextColour(item, colour)

Sets the item text colour.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • colour – a valid wx.Colour instance.
SetItemType(item, ct_type)

Sets the item type.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • ct_type

    May be one of the following integers:

    ct_type Value Description
    0 A normal item
    1 A checkbox-like item
    2 A radiobutton-type item
Note :

Regarding radiobutton-type items (with ct_type = 2), the following approach is used:

  • All peer-nodes that are radiobuttons will be mutually exclusive. In other words, only one of a set of radiobuttons that share a common parent can be checked at once. If a radiobutton node becomes checked, then all of its peer radiobuttons must be unchecked.
  • If a radiobutton node becomes unchecked, then all of its child nodes will become inactive.
SetItemVisited(item, visited=True)

Sets whether an hypertext item was visited.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • visitedTrue to mark an hypertext item as visited, False otherwise.
SetItemWindow(item, wnd)

Sets the window for the given item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • wnd – if not None, a non-toplevel window to be displayed next to the item.
SetItemWindowEnabled(item, enable=True)

Enables/disables the window associated to the item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • enableTrue to enable the associated window, False to disable it.
SetLabel(*args, **kwargs)

SetLabel(self, String label)

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

SetLayoutDirection(*args, **kwargs)

SetLayoutDirection(self, int dir)

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

SetMaxSize(*args, **kwargs)

SetMaxSize(self, Size maxSize)

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

SetMinSize(*args, **kwargs)

SetMinSize(self, Size minSize)

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

SetName(*args, **kwargs)

SetName(self, String 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

SetNextHandler(*args, **kwargs)

SetNextHandler(self, EvtHandler handler)

SetOwnBackgroundColour(*args, **kwargs)

SetOwnBackgroundColour(self, Colour colour)

SetOwnFont(*args, **kwargs)

SetOwnFont(self, Font font)

SetOwnForegroundColour(*args, **kwargs)

SetOwnForegroundColour(self, Colour colour)

SetPosition(*args, **kwargs)

Move(self, Point pt, int flags=SIZE_USE_EXISTING)

Moves the window to the given position.

SetPreviousHandler(*args, **kwargs)

SetPreviousHandler(self, EvtHandler handler)

SetPyData(item, data)

Sets the data associated to an item.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • data – can be any Python object.
SetRect(*args, **kwargs)

SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)

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

SetScale(*args, **kwargs)

SetScale(self, double xs, double ys)

SetScrollPageSize(*args, **kwargs)

SetScrollPageSize(self, int orient, int pageSize)

SetScrollPos(*args, **kwargs)

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

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

SetScrollRate(*args, **kwargs)

SetScrollRate(self, int xstep, int ystep)

SetScrollbar(*args, **kwargs)
SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)

Sets the scrollbar properties of a built-in scrollbar.

SetScrollbars(*args, **kwargs)
SetScrollbars(self, int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX,
int noUnitsY, int xPos=0, int yPos=0, bool noRefresh=False)
SetSecondGradientColour(colour=None)

Sets the second gradient colour for gradient-style selections.

Parameters:colour – if not None, a valid wx.Colour instance. Otherwise, the colour generated is a slightly darker version of the L{CustomTreeCtrl} background colour.
SetSize(*args, **kwargs)

SetSize(self, Size size)

Sets the size of the window in pixels.

SetSizeHints(*args, **kwargs)
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int 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.

SetSizeHintsSz(*args, **kwargs)

SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size 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.

SetSizeWH(*args, **kwargs)

SetSizeWH(self, int width, int height)

Sets the size of the window in pixels.

SetSizer(*args, **kwargs)

SetSizer(self, Sizer sizer, bool 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.

SetSizerAndFit(*args, **kwargs)

SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)

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

SetSpacing(spacing)

Sets the spacing between items in L{CustomTreeCtrl}.

Parameters:spacing – an integer representing the spacing between items in the tree.
SetStateImageList(imageList)

Sets the state image list for L{CustomTreeCtrl} (from which application-defined state images are taken).

Parameters:imageList – an instance of wx.ImageList.
SetTargetRect(*args, **kwargs)

SetTargetRect(self, Rect rect)

SetTargetWindow(*args, **kwargs)

SetTargetWindow(self, Window target)

SetThemeEnabled(*args, **kwargs)

SetThemeEnabled(self, bool 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.

SetToolTip(*args, **kwargs)

SetToolTip(self, ToolTip tip)

Attach a tooltip to the window.

SetToolTipString(*args, **kwargs)

SetToolTipString(self, String tip)

Attach a tooltip to the window.

SetTransparent(*args, **kwargs)

SetTransparent(self, byte alpha) -> bool

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.

SetValidator(*args, **kwargs)

SetValidator(self, Validator 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(*args, **kwargs)

SetVirtualSize(self, Size 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.

SetVirtualSizeHints(*args, **kwargs)

SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int 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.

SetVirtualSizeHintsSz(*args, **kwargs)

SetVirtualSizeHintsSz(self, Size minSize, Size 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.

SetVirtualSizeWH(*args, **kwargs)

SetVirtualSizeWH(self, int w, int 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.

SetWindowStyle(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowStyleFlag(*args, **kwargs)

SetWindowStyleFlag(self, long 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.

SetWindowVariant(*args, **kwargs)

SetWindowVariant(self, int variant)

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

ShouldInheritColours()

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 wx.Control where it returns True.

L{CustomTreeCtrl} does not inherit colours from anyone.

Show(*args, **kwargs)

Show(self, bool show=True) -> bool

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.

Shown

See IsShown and Show

Size

See GetSize and SetSize

Sizer

See GetSizer and SetSizer

SortChildren(item)

Sorts the children of the given item using the L{OnCompareItems} method of L{CustomTreeCtrl}.

Parameters:item – an instance of L{GenericTreeItem}.
Note :You should override the L{OnCompareItems} method in your derived class to change the sort order (the default is ascending case-sensitive alphabetical order).
TagAllChildrenUntilLast(crt_item, last_item, select)

Used internally.

TagNextChildren(crt_item, last_item, select)

Used internally.

TargetWindow

See GetTargetWindow and SetTargetWindow

Thaw()

Thaw L{CustomTreeCtrl}.

Reenables window updating after a previous call to L{Freeze}. To really thaw the control, it must be called exactly the same number of times as L{Freeze}.

ThemeEnabled

See GetThemeEnabled and SetThemeEnabled

TileBackground(dc)

Tiles the background image to fill all the available area.

Parameters:dc – an instance of wx.DC.
Todo :Support background images also in stretch and centered modes.
Toggle(item)

Toggles the item state (collapsed/expanded).

Parameters:item – an instance of L{GenericTreeItem}.
ToggleItemSelection(item)

Toggles the item selection.

Parameters:item – an instance of L{GenericTreeItem}.
ToggleWindowStyle(*args, **kwargs)

ToggleWindowStyle(self, int flag) -> bool

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.

ToolTip

See GetToolTip and SetToolTip

TopLevel

See IsTopLevel

TopLevelParent

See GetTopLevelParent

TransferDataFromWindow(*args, **kwargs)

TransferDataFromWindow(self) -> bool

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.

TransferDataToWindow(*args, **kwargs)

TransferDataToWindow(self) -> bool

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.

UnCheckRadioParent(item, checked=False)

Used internally to handle radio node parent correctly.

Parameters:
  • item – an instance of L{GenericTreeItem};
  • checkedTrue to check an item, False to uncheck it.
Unbind(event, source=None, id=-1, id2=-1, handler=None)

Disconnects the event handler binding for event from self. Returns True if successful.

UnregisterHotKey(*args, **kwargs)

UnregisterHotKey(self, int hotkeyId) -> bool

Unregisters a system wide hotkey.

Unselect()

Unselects the current selection.

UnselectAll()

Unselect all the items.

UnselectAllChildren(item)

Unselects all the children of the given item.

Parameters:item – an instance of L{GenericTreeItem}.
Update(*args, **kwargs)

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.

UpdateClientRect

See GetUpdateClientRect

UpdateRegion

See GetUpdateRegion

UpdateWindowUI(*args, **kwargs)

UpdateWindowUI(self, long 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.

UseBgCol(*args, **kwargs)

UseBgCol(self) -> bool

Validate(*args, **kwargs)

Validate(self) -> bool

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.

Validator

See GetValidator and SetValidator

ViewStart

See GetViewStart

VirtualSize

See GetVirtualSize and SetVirtualSize

WarpPointer(*args, **kwargs)

WarpPointer(self, int x, int 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.

WindowStyle

See GetWindowStyle and SetWindowStyle

WindowStyleFlag

See GetWindowStyleFlag and SetWindowStyleFlag

WindowToClientSize(*args, **kwargs)

WindowToClientSize(self, Size size) -> Size

WindowVariant

See GetWindowVariant and SetWindowVariant

base_AcceptsFocus(*args, **kwargs)

Please use PyScrolledWindow.AcceptsFocus instead.

base_AcceptsFocusFromKeyboard(*args, **kwargs)

Please use PyScrolledWindow.AcceptsFocusFromKeyboard instead.

base_AddChild(*args, **kwargs)

Please use PyScrolledWindow.AddChild instead.

base_DoGetBestSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetBestSize instead.

base_DoGetClientSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetClientSize instead.

base_DoGetPosition(*args, **kwargs)

Please use PyScrolledWindow.DoGetPosition instead.

base_DoGetSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetSize instead.

base_DoGetVirtualSize(*args, **kwargs)

Please use PyScrolledWindow.DoGetVirtualSize instead.

base_DoMoveWindow(*args, **kwargs)

Please use PyScrolledWindow.DoMoveWindow instead.

base_DoSetClientSize(*args, **kwargs)

Please use PyScrolledWindow.DoSetClientSize instead.

base_DoSetSize(*args, **kwargs)

Please use PyScrolledWindow.DoSetSize instead.

base_DoSetVirtualSize(*args, **kwargs)

Please use PyScrolledWindow.DoSetVirtualSize instead.

base_Enable(*args, **kwargs)

Please use PyScrolledWindow.Enable instead.

base_GetDefaultAttributes(*args, **kwargs)

Please use PyScrolledWindow.GetDefaultAttributes instead.

base_GetMaxSize(*args, **kwargs)

Please use PyScrolledWindow.GetMaxSize instead.

base_InitDialog(*args, **kwargs)

Please use PyScrolledWindow.InitDialog instead.

base_OnInternalIdle(*args, **kwargs)

Please use PyScrolledWindow.OnInternalIdle instead.

base_RemoveChild(*args, **kwargs)

Please use PyScrolledWindow.RemoveChild instead.

base_ShouldInheritColours(*args, **kwargs)

Please use PyScrolledWindow.ShouldInheritColours instead.

base_TransferDataFromWindow(*args, **kwargs)

Please use PyScrolledWindow.TransferDataFromWindow instead.

base_TransferDataToWindow(*args, **kwargs)

Please use PyScrolledWindow.TransferDataToWindow instead.

base_Validate(*args, **kwargs)

Please use PyScrolledWindow.Validate instead.

thisown

The membership flag

class sans.guiframe.data_panel.State
sans.guiframe.data_panel.set_data_state(data=None, path=None, theory=None, state=None)

Table Of Contents

Previous topic

data_manager

Next topic

data_processor

This Page