This module provides Graphic interface for the data_manager module.
Bases: wx._windows.Dialog
Allow file selection at loading time
See GetAcceleratorTable and SetAcceleratorTable
Can this window have focus?
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.
Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer.
Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32.
See GetAffirmativeId and SetAffirmativeId
Associate the window with a new native handle
See GetAutoLayout and SetAutoLayout
See GetBackgroundColour and SetBackgroundColour
See GetBackgroundStyle and SetBackgroundStyle
See GetBestSize
See GetBestVirtualSize
Bind an event to an event handler.
Parameters: |
|
---|
See GetBorder
Cache the best size so it doesn’t need to be calculated again, (at least until some properties of the window change.)
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.
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.
See GetCaret and SetCaret
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.
Center with respect to the the parent window
Center the window on screen
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(self, int dir=BOTH)
Center with respect to the the parent window
CenterOnScreen(self, int dir=BOTH)
Center the window on screen
See GetCharHeight
See GetCharWidth
See GetChildren
See GetClassName
Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated.
See GetClientAreaOrigin
See GetClientRect and SetClientRect
See GetClientSize and SetClientSize
Converts to screen coordinates from coordinates relative to this window.
Converts to screen coordinates from coordinates relative to this window.
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.
See GetConstraints and SetConstraints
See GetContainingSizer and SetContainingSizer
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.
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.
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
See GetCursor and SetCursor
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.
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.
See GetDefaultAttributes
See GetDefaultItem and SetDefaultItem
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.
Destroys all children of a window. Called automatically by the destructor.
Disables the window, same as Enable(false).
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL, PyObject func=None) -> bool
Dissociate the current native handle from the window
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
See GetDropTarget and SetDropTarget
See GetEffectiveMinSize
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.
See IsEnabled and Enable
See GetEscapeId and SetEscapeId
See GetEventHandler and SetEventHandler
See GetEvtHandlerEnabled and SetEvtHandlerEnabled
See GetExtraStyle and SetExtraStyle
Returns the window or control that currently has the keyboard focus, or None.
Find a child of this window by window ID
Find a child of this window by label
Find a child of this window by name
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.
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.
See GetFont and SetFont
See GetForegroundColour and SetForegroundColour
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.
Gets the accelerator table for this window.
Use GetEffectiveMinSize instead.
Returns the current autoLayout setting
Returns the background colour of the window.
Returns the background style of the window.
See : | SetBackgroundStyle |
---|
Use GetEffectiveMinSize instead.
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.
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.
Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)
GetBorder(self) -> int
Get border for the flags of this window
Returns the window which currently captures the mouse or None
Returns the caret associated with the window.
Get the (average) character size for the current font.
Get the (average) character size for the current font.
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..
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.
Returns the class name of the C++ class using wxRTTI.
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...)
Get the client area position and size as a wx.Rect object.
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.
This gets the size of the window’s ‘client area’ in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.
Returns a pointer to the window’s layout constraints, or None if there are none.
Return the sizer that this window is a member of, if any, otherwise None.
Return the cursor associated with this window.
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.
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.
Returns the associated drop target, which may be None.
This function will merge the window’s best size into the window’s minimum size, giving priority to the min size components, and returns the results.
Returns the event handler for this window. By default, the window is its own event handler.
Returns the extra style bits for the window.
Returns the default font used for this window.
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.
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the current or specified font.
Returns the parent of the parent of this window, or None if there isn’t one.
On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.
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.
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.
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
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.
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.
Get the layout direction (LTR or RTL) for this window. Returns wx.Layout_Default if layout direction is not supported.
Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName.
Returns the parent window of this window, or None if there isn’t one.
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.
Get the window’s position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use GetScreenPosition if you need screen coordinates for all kinds of windows.
Returns the size and position of the window as a wx.Rect object.
Get the position of the window in screen coordinantes.
Get the position of the window in screen coordinantes.
Returns the size and position of the window in screen coordinantes as a wx.Rect object.
Returns the built-in scrollbar position.
Returns the built-in scrollbar range.
Returns the built-in scrollbar thumb size.
Get the window size.
Get the window size.
Return the sizer associated with the window by a previous call to SetSizer or None if there isn’t one.
Get the width and height of the text using the current font.
Return the themeEnabled flag.
Return the temporary default item, which can be None.
get the associated tooltip or None if none
Returns the first frame or dialog in this window’s parental hierarchy.
Get the update rectangle region bounding box in client coords.
Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler.
Returns a pointer to the current validator for the window, or None if there is none.
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.
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.
Return the size of the left/right and top/bottom borders.
GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create method.
Gets the window style that was passed to the constructor or Create method.
See GetGrandParent
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.
See GetHandle
Returns true if this window has the current mouse capture.
Test if the given style is set for this window.
Does the window have the scrollbar for this orientation?
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.
See GetHelpText and SetHelpText
Equivalent to calling Show(False).
Test where the given (in client coords) point lies
Test where the given (in client coords) point lies
See GetIcon and SetIcon
See GetId and SetId
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.
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.
Reset the cached best size value so it will be recalculated the next time it is needed.
Is the window in the process of being deleted?
Returns True if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later.
Returns true if the window is enabled for input, false otherwise.
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.
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.
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.
Returns True if the window has been frozen and not thawed yet.
See : | Freeze and Thaw |
---|
Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms.
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.
Returns true if the window is shown, false if it has been hidden.
Returns True if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well.
Returns 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).
See GetLabel and SetLabel
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.
See GetLayoutDirection and SetLayoutDirection
This is just a wrapper for ScrollLines(1).
This is just a wrapper for ScrollLines(-1).
Lowers the window to the bottom of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this effect.
See GetMaxHeight
See GetMaxSize and SetMaxSize
See GetMaxWidth
See GetMinHeight
See GetMinSize and SetMinSize
See GetMinWidth
Moves the window to the given position.
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.
Same as MoveAfterInTabOrder except that it inserts this window just before win instead of putting it right after it.
Moves the window to the given position.
See GetName and SetName
Does keyboard navigation from this window to another, by sending a wx.NavigationKeyEvent.
Generate a control id for the controls which were not given one.
Get the id of the control following the one with the given autogenerated) id
See GetNextHandler and SetNextHandler
This is just a wrapper for ScrollPages(1).
This is just a wrapper for ScrollPages(-1).
See GetParent
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.
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.
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.
See GetPosition and SetPosition
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.
Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position.
Get the id of the control preceding the one with the given autogenerated) id
See GetPreviousHandler and SetPreviousHandler
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.
Raises the window to the top of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
See GetRect and SetRect
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.
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.
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.
Releases mouse input captured with wx.Window.CaptureMouse.
Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer.
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.)
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)
See GetReturnCode and SetReturnCode
See GetScreenPosition
See GetScreenRect
Converts from screen to client window coordinates.
Converts from screen to client window coordinates.
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.
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.
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.
Sets the accelerator table for this window.
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.
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.
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 |
---|
Use SetInitialSize
Sets the caret associated with the window.
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.
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.
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.
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.
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.
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.
Set this child as default, return the old default.
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.
Put the native window into double buffered or composited mode.
Associates a drop target with this window. If the window already has a drop target, it is deleted.
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.
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()
Set’s the focus to this window, allowing it to receive keyboard input.
Set focus to this window as the result of a keyboard action. Normally only called internally.
Sets the font for this window.
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.
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.
Associate this help text with all windows with the same id as this one.
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.
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.
Set the text which the window shows in its label if applicable.
Set the layout direction (LTR or RTL) for this window.
A more convenient method than SetSizeHints for setting just the max size.
A more convenient method than SetSizeHints for setting just the min size.
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
Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
Sets the position and size of the window in pixels using a wx.Rect.
Sets the position of one of the built-in scrollbars.
Sets the scrollbar properties of a built-in scrollbar.
Sets the size of the window in pixels.
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.
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.
Sets the size of the window in pixels.
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.
The same as SetSizer, except it also sets the size hints for the window based on the sizer’s minimum size.
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.
Set this child as temporary default
Attach a tooltip to the window.
Attach a tooltip to the window.
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.
Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.
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.
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.
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.
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.
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.
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.
Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac.
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.
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.
See IsShown and Show
See GetSize and SetSize
See GetSizer and SetSizer
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.
See GetThemeEnabled and SetThemeEnabled
See GetTitle and SetTitle
See GetTmpDefaultItem and SetTmpDefaultItem
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.
See GetToolTip and SetToolTip
See IsTopLevel
See GetTopLevelParent
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.
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.
Disconnects the event handler binding for event from self. Returns True if successful.
Unregisters a system wide hotkey.
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.
See GetUpdateClientRect
See GetUpdateRegion
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.
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.
See GetValidator and SetValidator
See GetVirtualSize and SetVirtualSize
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.
See GetWindowStyle and SetWindowStyle
See GetWindowStyleFlag and SetWindowStyleFlag
See GetWindowVariant and SetWindowVariant
layout the dialog
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
count selected data
return the selected data
The membership flag
Bases: wx._windows.Frame
See GetAcceleratorTable and SetAcceleratorTable
Can this window have focus?
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.
Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer.
Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32.
Associate the window with a new native handle
See GetAutoLayout and SetAutoLayout
See GetBackgroundColour and SetBackgroundColour
See GetBackgroundStyle and SetBackgroundStyle
See GetBestSize
See GetBestVirtualSize
Bind an event to an event handler.
Parameters: |
|
---|
See GetBorder
Cache the best size so it doesn’t need to be calculated again, (at least until some properties of the window change.)
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.
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.
See GetCaret and SetCaret
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.
Center with respect to the the parent window
Center the window on screen
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(self, int dir=BOTH)
Center with respect to the the parent window
CenterOnScreen(self, int dir=BOTH)
Center the window on screen
See GetCharHeight
See GetCharWidth
See GetChildren
See GetClassName
Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated.
See GetClientAreaOrigin
See GetClientRect and SetClientRect
See GetClientSize and SetClientSize
Converts to screen coordinates from coordinates relative to this window.
Converts to screen coordinates from coordinates relative to this window.
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.
ProcessCommand(self, int winid) -> bool
See GetConstraints and SetConstraints
See GetContainingSizer and SetContainingSizer
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.
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.
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(self, int number=1, long style=DEFAULT_STATUSBAR_STYLE, int winid=0, String name=StatusLineNameStr) -> StatusBar
See GetCursor and SetCursor
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.
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.
See GetDefaultAttributes
See GetDefaultItem and SetDefaultItem
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.
Destroys all children of a window. Called automatically by the destructor.
Disables the window, same as Enable(false).
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL, PyObject func=None) -> bool
Dissociate the current native handle from the window
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
See GetDropTarget and SetDropTarget
See GetEffectiveMinSize
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.
See IsEnabled and Enable
See GetEventHandler and SetEventHandler
See GetEvtHandlerEnabled and SetEvtHandlerEnabled
See GetExtraStyle and SetExtraStyle
Returns the window or control that currently has the keyboard focus, or None.
Find a child of this window by window ID
Find a child of this window by label
Find a child of this window by name
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.
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.
See GetFont and SetFont
See GetForegroundColour and SetForegroundColour
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.
Gets the accelerator table for this window.
Use GetEffectiveMinSize instead.
Returns the current autoLayout setting
Returns the background colour of the window.
Returns the background style of the window.
See : | SetBackgroundStyle |
---|
Use GetEffectiveMinSize instead.
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.
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.
Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)
GetBorder(self) -> int
Get border for the flags of this window
Returns the window which currently captures the mouse or None
Returns the caret associated with the window.
Get the (average) character size for the current font.
Get the (average) character size for the current font.
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..
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.
Returns the class name of the C++ class using wxRTTI.
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...)
Get the client area position and size as a wx.Rect object.
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.
This gets the size of the window’s ‘client area’ in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.
Returns a pointer to the window’s layout constraints, or None if there are none.
Return the sizer that this window is a member of, if any, otherwise None.
Return the cursor associated with this window.
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.
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.
Returns the associated drop target, which may be None.
This function will merge the window’s best size into the window’s minimum size, giving priority to the min size components, and returns the results.
Returns the event handler for this window. By default, the window is its own event handler.
Returns the extra style bits for the window.
Returns the default font used for this window.
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.
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the current or specified font.
Returns the parent of the parent of this window, or None if there isn’t one.
On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.
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.
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.
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
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.
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.
Get the layout direction (LTR or RTL) for this window. Returns wx.Layout_Default if layout direction is not supported.
Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName.
Returns the parent window of this window, or None if there isn’t one.
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.
Get the window’s position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use GetScreenPosition if you need screen coordinates for all kinds of windows.
Returns the size and position of the window as a wx.Rect object.
Get the position of the window in screen coordinantes.
Get the position of the window in screen coordinantes.
Returns the size and position of the window in screen coordinantes as a wx.Rect object.
Returns the built-in scrollbar position.
Returns the built-in scrollbar range.
Returns the built-in scrollbar thumb size.
Get the window size.
Get the window size.
Return the sizer associated with the window by a previous call to SetSizer or None if there isn’t one.
Get the width and height of the text using the current font.
Return the themeEnabled flag.
Return the temporary default item, which can be None.
get the associated tooltip or None if none
Returns the first frame or dialog in this window’s parental hierarchy.
Get the update rectangle region bounding box in client coords.
Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler.
Returns a pointer to the current validator for the window, or None if there is none.
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.
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.
Return the size of the left/right and top/bottom borders.
GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create method.
Gets the window style that was passed to the constructor or Create method.
See GetGrandParent
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.
See GetHandle
Returns true if this window has the current mouse capture.
Test if the given style is set for this window.
Does the window have the scrollbar for this orientation?
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.
See GetHelpText and SetHelpText
Equivalent to calling Show(False).
Test where the given (in client coords) point lies
Test where the given (in client coords) point lies
See GetIcon and SetIcon
See GetId and SetId
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.
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.
Reset the cached best size value so it will be recalculated the next time it is needed.
Is the window in the process of being deleted?
Returns True if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later.
Returns true if the window is enabled for input, false otherwise.
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.
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.
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.
Returns True if the window has been frozen and not thawed yet.
See : | Freeze and Thaw |
---|
Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms.
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.
Returns true if the window is shown, false if it has been hidden.
Returns True if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well.
Returns 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).
See GetLabel and SetLabel
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.
See GetLayoutDirection and SetLayoutDirection
This is just a wrapper for ScrollLines(1).
This is just a wrapper for ScrollLines(-1).
Lowers the window to the bottom of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this effect.
See GetMaxHeight
See GetMaxSize and SetMaxSize
See GetMaxWidth
See GetMenuBar and SetMenuBar
See GetMinHeight
See GetMinSize and SetMinSize
See GetMinWidth
Moves the window to the given position.
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.
Same as MoveAfterInTabOrder except that it inserts this window just before win instead of putting it right after it.
Moves the window to the given position.
See GetName and SetName
Does keyboard navigation from this window to another, by sending a wx.NavigationKeyEvent.
Generate a control id for the controls which were not given one.
Get the id of the control following the one with the given autogenerated) id
See GetNextHandler and SetNextHandler
This is just a wrapper for ScrollPages(1).
This is just a wrapper for ScrollPages(-1).
See GetParent
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.
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.
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.
See GetPosition and SetPosition
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.
Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position.
Get the id of the control preceding the one with the given autogenerated) id
See GetPreviousHandler and SetPreviousHandler
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.
Raises the window to the top of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
See GetRect and SetRect
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.
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.
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.
Releases mouse input captured with wx.Window.CaptureMouse.
Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer.
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.)
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)
See GetScreenPosition
See GetScreenRect
Converts from screen to client window coordinates.
Converts from screen to client window coordinates.
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.
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.
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.
Sets the accelerator table for this window.
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.
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.
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 |
---|
Use SetInitialSize
Sets the caret associated with the window.
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.
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.
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.
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.
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.
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.
Set this child as default, return the old default.
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.
Put the native window into double buffered or composited mode.
Associates a drop target with this window. If the window already has a drop target, it is deleted.
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.
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()
Set’s the focus to this window, allowing it to receive keyboard input.
Set focus to this window as the result of a keyboard action. Normally only called internally.
Sets the font for this window.
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.
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.
Associate this help text with all windows with the same id as this one.
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.
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.
Set the text which the window shows in its label if applicable.
Set the layout direction (LTR or RTL) for this window.
A more convenient method than SetSizeHints for setting just the max size.
A more convenient method than SetSizeHints for setting just the min size.
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
Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
Sets the position and size of the window in pixels using a wx.Rect.
Sets the position of one of the built-in scrollbars.
Sets the scrollbar properties of a built-in scrollbar.
Sets the size of the window in pixels.
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.
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.
Sets the size of the window in pixels.
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.
The same as SetSizer, except it also sets the size hints for the window based on the sizer’s minimum size.
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.
Set this child as temporary default
Attach a tooltip to the window.
Attach a tooltip to the window.
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.
Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.
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.
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.
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.
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.
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.
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.
Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac.
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.
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.
See IsShown and Show
See GetSize and SetSize
See GetSizer and SetSizer
See GetStatusBar and SetStatusBar
See GetStatusBarPane and SetStatusBarPane
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.
See GetThemeEnabled and SetThemeEnabled
See GetTitle and SetTitle
See GetTmpDefaultItem and SetTmpDefaultItem
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.
See GetToolBar and SetToolBar
See GetToolTip and SetToolTip
See IsTopLevel
See GetTopLevelParent
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.
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.
Disconnects the event handler binding for event from self. Returns True if successful.
Unregisters a system wide hotkey.
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.
See GetUpdateClientRect
See GetUpdateRegion
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.
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.
See GetValidator and SetValidator
See GetVirtualSize and SetVirtualSize
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.
See GetWindowStyle and SetWindowStyle
See GetWindowStyleFlag and SetWindowStyleFlag
See GetWindowVariant and SetWindowVariant
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Fill the list inside its panel
The membership flag
Bases: wx.lib.scrolledpanel.ScrolledPanel, sans.guiframe.panel_base.PanelBase
This panel displays data available in the application and widgets to interact with data.
See GetAcceleratorTable and SetAcceleratorTable
Can this window have focus?
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.
Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer.
Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32.
Associate the window with a new native handle
See GetAutoLayout and SetAutoLayout
See GetBackgroundColour and SetBackgroundColour
See GetBackgroundStyle and SetBackgroundStyle
See GetBestSize
See GetBestVirtualSize
Bind an event to an event handler.
Parameters: |
|
---|
See GetBorder
Cache the best size so it doesn’t need to be calculated again, (at least until some properties of the window change.)
CalcScrolledPosition(int x, int y) -> (sx, sy)
Translate between scrolled and unscrolled coordinates.
CalcUnscrolledPosition(int x, int y) -> (ux, uy)
Translate between scrolled and unscrolled coordinates.
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.
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.
See GetCaret and SetCaret
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.
Center with respect to the the parent window
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(self, int dir=BOTH)
Center with respect to the the parent window
See GetCharHeight
See GetCharWidth
See GetChildren
See GetClassName
Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated.
See GetClientAreaOrigin
See GetClientRect and SetClientRect
See GetClientSize and SetClientSize
Converts to screen coordinates from coordinates relative to this window.
Converts to screen coordinates from coordinates relative to this window.
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.
See GetConstraints and SetConstraints
See GetContainingSizer and SetContainingSizer
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.
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.
Create the GUI part of the Window for 2-phase creation mode.
See GetCursor and SetCursor
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.
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.
See GetDefaultAttributes
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.
Destroys all children of a window. Called automatically by the destructor.
Disables the window, same as Enable(false).
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL, PyObject func=None) -> bool
Dissociate the current native handle from the window
Normally what is called by PrepareDC.
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
See GetDropTarget and SetDropTarget
See GetEffectiveMinSize
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.
See IsEnabled and Enable
See GetEventHandler and SetEventHandler
See GetEvtHandlerEnabled and SetEvtHandlerEnabled
See GetExtraStyle and SetExtraStyle
Returns the window or control that currently has the keyboard focus, or None.
Find a child of this window by window ID
Find a child of this window by label
Find a child of this window by name
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.
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.
See GetFont and SetFont
See GetForegroundColour and SetForegroundColour
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.
Gets the accelerator table for this window.
Use GetEffectiveMinSize instead.
Returns the current autoLayout setting
Returns the background colour of the window.
Returns the background style of the window.
See : | SetBackgroundStyle |
---|
Use GetEffectiveMinSize instead.
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.
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.
Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)
GetBorder(self) -> int
Get border for the flags of this window
Returns the window which currently captures the mouse or None
Returns the caret associated with the window.
Get the (average) character size for the current font.
Get the (average) character size for the current font.
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..
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.
Returns the class name of the C++ class using wxRTTI.
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...)
Get the client area position and size as a wx.Rect object.
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.
This gets the size of the window’s ‘client area’ in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.
Returns a pointer to the window’s layout constraints, or None if there are none.
Return the sizer that this window is a member of, if any, otherwise None.
Return the cursor associated with this window.
Returns the associated drop target, which may be None.
This function will merge the window’s best size into the window’s minimum size, giving priority to the min size components, and returns the results.
Returns the event handler for this window. By default, the window is its own event handler.
Returns the extra style bits for the window.
Returns the default font used for this window.
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.
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the current or specified font.
Returns the parent of the parent of this window, or None if there isn’t one.
On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.
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.
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.
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
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.
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.
Get the layout direction (LTR or RTL) for this window. Returns wx.Layout_Default if layout direction is not supported.
Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName.
Returns the parent window of this window, or None if there isn’t one.
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.
Get the window’s position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use GetScreenPosition if you need screen coordinates for all kinds of windows.
Returns the size and position of the window as a wx.Rect object.
Get the position of the window in screen coordinantes.
Get the position of the window in screen coordinantes.
Returns the size and position of the window in screen coordinantes as a wx.Rect object.
Get the size of one logical unit in physical units.
Returns the built-in scrollbar position.
Returns the built-in scrollbar range.
Returns the built-in scrollbar thumb size.
Get the window size.
Get the window size.
Return the sizer associated with the window by a previous call to SetSizer or None if there isn’t one.
Get the width and height of the text using the current font.
Return the themeEnabled flag.
get the associated tooltip or None if none
Returns the first frame or dialog in this window’s parental hierarchy.
Get the update rectangle region bounding box in client coords.
Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler.
Returns a pointer to the current validator for the window, or None if there is none.
Get the view start
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.
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.
Return the size of the left/right and top/bottom borders.
GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create method.
Gets the window style that was passed to the constructor or Create method.
See GetGrandParent
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.
See GetHandle
Returns true if this window has the current mouse capture.
Test if the given style is set for this window.
Does the window have the scrollbar for this orientation?
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.
See GetHelpText and SetHelpText
Equivalent to calling Show(False).
Test where the given (in client coords) point lies
Test where the given (in client coords) point lies
See GetId and SetId
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.
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.
Reset the cached best size value so it will be recalculated the next time it is needed.
Is the window in the process of being deleted?
Returns True if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later.
Returns true if the window is enabled for input, false otherwise.
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.
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.
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.
Returns True if the window has been frozen and not thawed yet.
See : | Freeze and Thaw |
---|
Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms.
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.
Returns true if the window is shown, false if it has been hidden.
Returns True if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well.
Returns 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).
See GetLabel and SetLabel
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.
See GetLayoutDirection and SetLayoutDirection
This is just a wrapper for ScrollLines(1).
This is just a wrapper for ScrollLines(-1).
Lowers the window to the bottom of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this effect.
See GetMaxHeight
See GetMaxSize and SetMaxSize
See GetMaxWidth
See GetMinHeight
See GetMinSize and SetMinSize
See GetMinWidth
Moves the window to the given position.
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.
Same as MoveAfterInTabOrder except that it inserts this window just before win instead of putting it right after it.
Moves the window to the given position.
See GetName and SetName
Does keyboard navigation from this window to another, by sending a wx.NavigationKeyEvent.
Generate a control id for the controls which were not given one.
Get the id of the control following the one with the given autogenerated) id
See GetNextHandler and SetNextHandler
This is just a wrapper for ScrollPages(1).
This is just a wrapper for ScrollPages(-1).
See GetParent
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.
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.
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.
See GetPosition and SetPosition
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.
Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position.
Get the id of the control preceding the one with the given autogenerated) id
See GetPreviousHandler and SetPreviousHandler
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.
Raises the window to the top of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
See GetRect and SetRect
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.
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.
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.
Releases mouse input captured with wx.Window.CaptureMouse.
Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer.
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.)
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)
See GetScaleX
See GetScaleY
See GetScreenPosition
See GetScreenRect
Converts from screen to client window coordinates.
Converts from screen to client window coordinates.
Scrolls the panel such that the specified child window is in view.
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.
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.
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.
Sets the accelerator table for this window.
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.
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.
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 |
---|
Use SetInitialSize
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.
Sets the caret associated with the window.
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.
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.
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.
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.
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.
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.
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.
Put the native window into double buffered or composited mode.
Associates a drop target with this window. If the window already has a drop target, it is deleted.
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.
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()
Set’s the focus to this window, allowing it to receive keyboard input.
Set focus to this window as the result of a keyboard action. Normally only called internally.
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.
Sets the font for this window.
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.
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.
Associate this help text with all windows with the same id as this one.
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.
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.
Set the text which the window shows in its label if applicable.
Set the layout direction (LTR or RTL) for this window.
A more convenient method than SetSizeHints for setting just the max size.
A more convenient method than SetSizeHints for setting just the min size.
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
Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
Sets the position and size of the window in pixels using a wx.Rect.
Sets the position of one of the built-in scrollbars.
Sets the scrollbar properties of a built-in scrollbar.
SetScrollbars(self, int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, int xPos=0, int yPos=0, bool noRefresh=False)
Sets the size of the window in pixels.
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.
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.
Sets the size of the window in pixels.
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.
The same as SetSizer, except it also sets the size hints for the window based on the sizer’s minimum size.
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.
Attach a tooltip to the window.
Attach a tooltip to the window.
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.
Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.
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.
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.
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.
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.
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.
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.
Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac.
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.
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.
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.
See IsShown and Show
See GetSize and SetSize
See GetSizer and SetSizer
See GetTargetWindow and SetTargetWindow
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.
See GetThemeEnabled and SetThemeEnabled
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.
See GetToolTip and SetToolTip
See IsTopLevel
See GetTopLevelParent
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.
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.
Disconnects the event handler binding for event from self. Returns True if successful.
Unregisters a system wide hotkey.
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.
See GetUpdateClientRect
See GetUpdateRegion
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.
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.
See GetValidator and SetValidator
See GetViewStart
See GetVirtualSize and SetVirtualSize
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.
See GetWindowStyle and SetWindowStyle
See GetWindowStyleFlag and SetWindowStyleFlag
See GetWindowVariant and SetWindowVariant
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
send an event to the parent to trigger load from plugin module
get an event with attribute name and caption to delete existing name from the combobox of the current panel
select the current perspective for guiframe
On source combobox selection
Select data according to patterns
The derivative class sets the bookmark flag value to indicate that it can be bookmarked
The derivative class sets the copy flag value to indicate that the action done can be recovered
The derivative class sets the drag flag value to indicate that dragging motion is possible
The derivative class sets the paste flag value to indicate that the action done can be recovered
The derivative class sets the preview flag value to indicate that it can be previewed
The derivative class sets the print flag value to indicate that it can be printed
The derivative class sets the redo flag value to indicate that the action done can be recovered
The derivative class sets the reset flag value to indicate that it can be reset
The derivative class sets the drag flag value to indicate that it can be saved
The derivative class sets the undo flag value to indicate that the current action done can be canceled
The derivative class sets the zoom flag value to indicate that it can be zoomed
The derivative class sets the zoom in flag value to indicate that it can be zoomed in
The derivative class sets the zoom out flag value to indicate that it can be zoomed out
Uncheck all check boxes
append theory object under data from a state of id = state_id replace that theory if already displayed
Please use PyScrolledWindow.AcceptsFocus instead.
Please use PyScrolledWindow.AcceptsFocusFromKeyboard instead.
Please use PyScrolledWindow.AddChild instead.
Please use PyScrolledWindow.DoGetBestSize instead.
Please use PyScrolledWindow.DoGetClientSize instead.
Please use PyScrolledWindow.DoGetPosition instead.
Please use PyScrolledWindow.DoGetSize instead.
Please use PyScrolledWindow.DoGetVirtualSize instead.
Please use PyScrolledWindow.DoMoveWindow instead.
Please use PyScrolledWindow.DoSetClientSize instead.
Please use PyScrolledWindow.DoSetSize instead.
Please use PyScrolledWindow.DoSetVirtualSize instead.
Please use PyScrolledWindow.Enable instead.
Please use PyScrolledWindow.GetDefaultAttributes instead.
Please use PyScrolledWindow.GetMaxSize instead.
Please use PyScrolledWindow.InitDialog instead.
Please use PyScrolledWindow.OnInternalIdle instead.
Please use PyScrolledWindow.RemoveChild instead.
Please use PyScrolledWindow.ShouldInheritColours instead.
Please use PyScrolledWindow.TransferDataFromWindow instead.
Please use PyScrolledWindow.TransferDataToWindow instead.
Please use PyScrolledWindow.Validate instead.
Define the skeleton of the panel
enable or disable append button
enable or disable the freeze button
enable or disable send button
enable or disable plot button
enable or disable remove button
enable remove plot button if there is a plot panel on focus
enable or disable combobo box selection
fill the combobox with analysis name
Get the bookmark flag to update appropriately the tool bar
Get the copy flag to update appropriately the tool bar
return list of current data
Get the drag flag to update appropriately the tool bar
Get the copy flag to update appropriately the tool bar
Get the preview flag to update appropriately the tool bar
Get the print flag to update appropriately the tool bar
Get the redo flag to update appropriately the tool bar
Get the reset flag to update appropriately the tool bar
Get the save flag to update appropriately the tool bar
return the current state
Get the undo flag to update appropriately the tool bar
Get the zoom flag to update appropriately the tool bar
Get the zoom in flag to update appropriately the tool bar
Get the zoom out flag to update appropriately the tool bar
Layout widgets related to buttons
Add a listcrtl in the panel
add need data with its theory under the tree
Pop up an error message.
Parameters: | error – details error message to be displayed |
---|
Retrieve the state selected state
append plot to plot panel on focus
change guiframe to its batch mode
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)
The derivative class is on bookmark mode if implemented
On close
clseo the panel on focus
The copy action if possible
The derivative class allows dragging motion if implemented
Pop Up Data Editor
On freeze to make a theory to a data set
Get all select data and set them to the current active perspetive
The derivative class is on unfocus if implemented
The paste action if possible
Send a list of data names to plot
Display a printable version of the class derivative
The previous action is restored if possible
Get a list of item checked and remove them from the treectrl Ask the parent to remove reference to this item
The derivative class state is restored
Allow Editing Data
The state of the derivative class is restored
The derivative class is on focus if implemented
change guiframe to its single mode
Update menu on clicking the panel tap
The current action is canceled
The derivative class is on zoom mode (using pane) if zoom mode is implemented
The derivative class is on zoom in mode if implemented
The derivative class is on zoom out mode if implemented
return an xml node containing state of the panel that guiframe can write to file
set the active perspective
set the plot panel on focus
show load data and remove data button if dataloader on else hide them
The membership flag
Bases: wx.lib.agw.customtreectrl.CustomTreeCtrl
Check list control to be used for Data Panel
See GetAcceleratorTable and SetAcceleratorTable
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. |
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.
Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer.
Adds a root item to the L{CustomTreeCtrl}.
Parameters: |
|
---|---|
Warning : | only one root is allowed to exist in any given instance of L{CustomTreeCtrl}. |
Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32.
Internal method used to adjust the wx.PyScrolledWindow scrollbars.
Appends an item as a last child of its parent.
Parameters: |
|
---|
Assigns the button image list.
Parameters: | imageList – an instance of wx.ImageList. |
---|
Assigns the normal image list.
Parameters: | imageList – an instance of wx.ImageList. |
---|
Assigns the state image list.
Parameters: | imageList – an instance of wx.ImageList. |
---|
Associate the window with a new native handle
Transverses the tree and checks/unchecks the items.
Parameters: |
|
---|---|
Note : | This method is meaningful only for checkbox-like and radiobutton-like items. |
Traverses up the tree and checks/unchecks parent items.
Parameters: |
|
---|---|
Note : | This method is meaningful only for checkbox-like and radiobutton-like items. |
See GetAutoLayout and SetAutoLayout
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. |
See GetBackgroundColour and SetBackgroundColour
See GetBackgroundStyle and SetBackgroundStyle
See GetBestSize
See GetBestVirtualSize
Bind an event to an event handler.
Parameters: |
|
---|
See GetBorder
Cache the best size so it doesn’t need to be calculated again, (at least until some properties of the window change.)
CalcScrolledPosition(int x, int y) -> (sx, sy)
Translate between scrolled and unscrolled coordinates.
CalcUnscrolledPosition(int x, int y) -> (ux, uy)
Translate between scrolled and unscrolled coordinates.
Calculates the level of an item inside the tree hierarchy.
Parameters: |
|
---|
Calculates the height of a line.
Calculates all the positions of the visible items.
Calculates overall position and size of an item.
Parameters: |
|
---|
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.
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.
See GetCaret and SetCaret
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.
Center with respect to the the parent window
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(self, int dir=BOTH)
Center with respect to the the parent window
See GetCharHeight
See GetCharWidth
Programatically check/uncheck item children.
Parameters: |
|
---|---|
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. |
Actually checks/uncheks an item, sending (eventually) the two events EVT_TREE_ITEM_CHECKING and EVT_TREE_ITEM_CHECKED.
Parameters: |
|
---|
Used internally to avoid EVT_TREE_ITEM_CHECKED events.
Parameters: |
|
---|
Uncheck radio items which are on the same level of the checked one. Used internally.
Parameters: |
|
---|---|
Note : | This method is meaningful only for radiobutton-like items. |
See GetChildren
We are about to destroy the item children.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
See GetClassName
Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated.
See GetClientAreaOrigin
See GetClientRect and SetClientRect
See GetClientSize and SetClientSize
Converts to screen coordinates from coordinates relative to this window.
Converts to screen coordinates from coordinates relative to this window.
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 an item, sending a EVT_TREE_ITEM_COLLAPSING and EVT_TREE_ITEM_COLLAPSED events.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Collapse the given item and deletes its children.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
See GetConstraints and SetConstraints
See GetContainingSizer and SetContainingSizer
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.
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.
Create the GUI part of the Window for 2-phase creation mode.
See GetCursor and SetCursor
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.
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.
See GetDefaultAttributes
Deletes an item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Deletes all items in the L{CustomTreeCtrl}.
Delete all the item’s children.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Deletes the window associated to an item (if any).
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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.
Destroys all children of a window. Called automatically by the destructor.
Disables the window, same as Enable(false).
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL, PyObject func=None) -> bool
Dissociate the current native handle from the window
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().
Actually inserts an item in the tree.
Parameters: |
|
---|
Normally what is called by PrepareDC.
Actually selects/unselects an item, sending EVT_TREE_SEL_CHANGING and EVT_TREE_SEL_CHANGED events.
Parameters: |
|
---|
Enables or disables eligibility for drop file events, EVT_DROP_FILES.
Gradient fill from colour 1 to colour 2 from left to right.
Parameters: |
|
---|
Gradient fill from colour 1 to colour 2 from top to bottom.
Parameters: |
|
---|
Draws the selected item(s) with the Windows Vista style.
Parameters: |
|
---|
See GetDropTarget and SetDropTarget
Internal function. Starts the editing of an item label, sending a EVT_TREE_BEGIN_LABEL_EDIT event.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Starts editing an item label.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
See GetEffectiveMinSize
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.
Enables/disables the item children.
Parameters: |
|
---|---|
Note : | This method is used internally. |
Enables/disables an item.
Parameters: |
|
---|
Globally enables/disables drawing of gradient selections.
Parameters: | enable – True to enable gradient-style selections, False to disable it. |
---|---|
Note : | Calling this method disables any Vista-style selection previously enabled. |
Globally enables/disables drawing of Windows Vista selections.
Parameters: | enable – True to enable Vista-style selections, False to disable it. |
---|---|
Note : | Calling this method disables any gradient-style selection previously enabled. |
See IsEnabled and Enable
Scrolls and/or expands items to ensure that the given item is visible.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
See GetEventHandler and SetEventHandler
See GetEvtHandlerEnabled and SetEvtHandlerEnabled
Expands an item, sending a EVT_TREE_ITEM_EXPANDING and EVT_TREE_ITEM_EXPANDED events.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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. |
---|
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. |
See GetExtraStyle and SetExtraStyle
Internal function. Used to populate an array of selected items when the style TR_MULTIPLE is used.
Returns the window or control that currently has the keyboard focus, or None.
Finds the first item starting with the given prefix after the given parent.
Parameters: |
|
---|
Find a child of this window by window ID
Find a child of this window by label
Find a child of this window by name
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.
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.
See GetFont and SetFont
See GetForegroundColour and SetForegroundColour
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. |
---|
Returns the L{CustomTreeCtrl} style.
Gets the accelerator table for this window.
Use GetEffectiveMinSize instead.
Returns the current autoLayout setting
Returns the background colour of the window.
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. |
Returns the background style of the window.
See : | SetBackgroundStyle |
---|
Use GetEffectiveMinSize instead.
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.
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.
Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)
GetBorder(self) -> int
Get border for the flags of this window
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. |
---|
Retrieves the rectangle bounding the item.
Parameters: |
|
---|---|
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. |
Returns the buttons image list associated with L{CustomTreeCtrl} (from which application-defined button images are taken).
Returns the window which currently captures the mouse or None
Returns the caret associated with the window.
Get the (average) character size for the current font.
Get the (average) character size for the current font.
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..
Returns the item children count.
Parameters: |
|
---|
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. |
Returns the class name of the C++ class using wxRTTI.
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...)
Get the client area position and size as a wx.Rect object.
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.
This gets the size of the window’s ‘client area’ in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.
Returns the pen used to draw the connecting lines between items.
Returns a pointer to the window’s layout constraints, or None if there are none.
Return the sizer that this window is a member of, if any, otherwise None.
Returns a native looking checkbox or radio button bitmap.
Parameters: |
|
---|
Returns the global number of items in the tree.
Return the cursor associated with this window.
Returns the colour for items in a disabled state.
Returns the associated drop target, which may be None.
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).
This function will merge the window’s best size into the window’s minimum size, giving priority to the min size components, and returns the results.
Returns the event handler for this window. By default, the window is its own event handler.
Returns the extra style bits for the window.
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. |
Returns the first gradient colour for gradient-style selections.
Returns the first visible item.
Returns the default font used for this window.
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.
(width, height, descent, externalLeading)
Get the width, height, decent and leading of the text using the current or specified font.
Returns the gradient style for gradient-style selections.
Returns: | 0 for horizontal gradient-style selections, 1 for vertical gradient-style selections. |
---|
Returns the parent of the parent of this window, or None if there isn’t one.
On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.
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.
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.
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
Returns the colour used to highlight focused selected items.
Note : | This is used only if gradient and Windows Vista selection styles are disabled. |
---|
Returns the colour used to highlight unfocused selected items.
Note : | This is used only if gradient and Windows Vista selection styles are disabled. |
---|
Returns the font used to render hypertext items.
Returns the colour used to render a non-visited hypertext item.
Returns the colour used to render a visited hypertext item.
Returns the identifier of the window. Each window has an integer identifier. If the application has not provided one (or the default Id -1 is used) then an unique identifier with a negative value will be generated.
Returns the normal image list associated with L{CustomTreeCtrl}.
Returns the image list used to build the check/radio buttons in L{CustomTreeCtrl}.
Returns the item indentation.
Returns the item background colour.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the item font.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the item image.
Parameters: |
|
---|
Returns the item parent (can be None for root items).
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the data associated to an item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the item text.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the item text colour.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the item type.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|---|
See : | L{SetItemType} for a description of valid item types. |
Returns whether an hypertext item was visited.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the window associated to the item (if any).
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns whether the window associated to the item is enabled.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Generic way of getting a label from any window, for identification purposes. The interpretation of this function differs from class to class. For frames and dialogs, the value returned is the title. For buttons or static text controls, it is the button text. This function can be useful for meta-programs such as testing tools or special-needs access programs)which need to identify windows by name.
Returns the item last child.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Get the layout direction (LTR or RTL) for this window. Returns wx.Layout_Default if layout direction is not supported.
Returns the line height for the given item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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. |
---|
Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName.
Returns the next item. Only for internal use right now.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the next active item. Used Internally at present.
Parameters: |
|
---|
Returns the item’s next child.
Parameters: |
|
---|---|
Note : | This method returns None if there are no further children. |
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. |
Returns the next visible item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the parent window of this window, or None if there isn’t one.
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.
Get the window’s position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use GetScreenPosition if you need screen coordinates for all kinds of windows.
Returns the previous sibling of an item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|---|
Note : | This method returns None if there are no further siblings. |
Returns the previous visible item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the data associated to an item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns the size and position of the window as a wx.Rect object.
Returns the root item.
Get the position of the window in screen coordinantes.
Get the position of the window in screen coordinantes.
Returns the size and position of the window in screen coordinantes as a wx.Rect object.
Get the size of one logical unit in physical units.
Returns the built-in scrollbar position.
Returns the built-in scrollbar range.
Returns the built-in scrollbar thumb size.
Returns the second gradient colour for gradient-style selections.
Returns the current selection.
Note : | This method is valid only with the style TR_SINGLE set. Use L{GetSelections} for multiple-selections trees. |
---|
Returns a list of selected items.
Note : | This method can be used only if L{CustomTreeCtrl} has the TR_MULTIPLE style set. |
---|
Get the window size.
Get the window size.
Return the sizer associated with the window by a previous call to SetSizer or None if there isn’t one.
Returns the spacing between the start and the text.
Returns the state image list associated with L{CustomTreeCtrl} (from which application-defined state images are taken).
Get the width and height of the text using the current font.
Return the themeEnabled flag.
get the associated tooltip or None if none
Returns the first frame or dialog in this window’s parental hierarchy.
Get the update rectangle region bounding box in client coords.
Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler.
Returns a pointer to the current validator for the window, or None if there is none.
Get the view start
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.
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.
Return the size of the left/right and top/bottom borders.
GetWindowStyleFlag(self) -> long
Gets the window style that was passed to the constructor or Create method.
Gets the window style that was passed to the constructor or Create method.
See GetGrandParent
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.
See GetHandle
Handles the hyperlink items, sending the EVT_TREE_ITEM_HYPERLINK event.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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. |
Returns whether L{CustomTreeCtrl} has the TR_HAS_BUTTONS flag set.
Returns true if this window has the current mouse capture.
Returns whether an item has children or not.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Test if the given style is set for this window.
Does the window have the scrollbar for this orientation?
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.
See GetHelpText and SetHelpText
Equivalent to calling Show(False).
Hides the windows associated to the items. Used internally.
Calculates which (if any) item is under the given point, returning the tree item at this point plus extra information flags.
Parameters: |
|
|||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Note : | both the item (if any, None otherwise) and the flags are always returned as a tuple. |
Test where the given (in client coords) point lies
See GetId and SetId
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.
Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.
Inserts an item after the given previous.
See : | L{InsertItemByIndex} and L{InsertItemByItem} for an explanation of the input parameters. |
---|
Inserts an item after the given previous.
Parameters: |
|
---|
Inserts an item after the given previous.
Parameters: |
|
---|
Reset the cached best size value so it will be recalculated the next time it is needed.
Is the window in the process of being deleted?
Returns whether the item font is bold or not.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Checks if the given item is under another one in the tree hierarchy.
Parameters: |
|
---|
Returns True if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later.
Returns true if the window is enabled for input, false otherwise.
Returns whether the item is expanded or not.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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.
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.
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.
Returns True if the window has been frozen and not thawed yet.
See : | Freeze and Thaw |
---|
Returns whether the item font is italic or not.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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. |
Returns whether an item is enabled or disabled.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns whether an item is hypertext or not.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms.
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.
Returns whether the item is selected or not.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Returns true if the window is shown, false if it has been hidden.
Returns True if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well.
Returns true if the given window is a top-level one. Currently all frames and dialogs are always considered to be top-level windows (even if they have a parent window).
Returns 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}. |
---|
Returns whether the item has children or not.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
See GetLabel and SetLabel
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.
See GetLayoutDirection and SetLayoutDirection
This is just a wrapper for ScrollLines(1).
This is just a wrapper for ScrollLines(-1).
Lowers the window to the bottom of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this effect.
See GetMaxHeight
See GetMaxSize and SetMaxSize
See GetMaxWidth
See GetMinHeight
See GetMinSize and SetMinSize
See GetMinWidth
Moves the window to the given position.
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.
Same as MoveAfterInTabOrder except that it inserts this window just before win instead of putting it right after it.
Moves the window to the given position.
See GetName and SetName
Does keyboard navigation from this window to another, by sending a wx.NavigationKeyEvent.
Generate a control id for the controls which were not given one.
Get the id of the control following the one with the given autogenerated) id
See GetNextHandler and SetNextHandler
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: |
|
---|---|
Note : | The base class version compares items alphabetically. |
Handles the wx.EVT_WINDOW_DESTROY event for L{CustomTreeCtrl}.
Parameters: | event – a wx.WindowDestroyEvent event to be processed. |
---|
Handles the wx.EVT_ERASE_BACKGROUND event for L{CustomTreeCtrl}.
Parameters: | event – a wx.EraseEvent event to be processed. |
---|
Process the tooltip event, to speed up event processing. Does not actually get a tooltip.
Parameters: | event – a L{TreeEvent} event to be processed. |
---|
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.
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. |
---|
Handles the wx.EVT_KILL_FOCUS event for L{CustomTreeCtrl}.
Parameters: | event – a wx.FocusEvent event to be processed. |
---|
Handles a bunch of wx.EVT_MOUSE_EVENTS events for L{CustomTreeCtrl}.
Parameters: | event – a wx.MouseEvent event to be processed. |
---|
Handles the wx.EVT_PAINT event for L{CustomTreeCtrl}.
Parameters: | event – a wx.PaintEvent event to be processed. |
---|
Called by L{TreeTextCtrl}, to accept the changes and to send the EVT_TREE_END_LABEL_EDIT event.
Parameters: |
|
---|
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}. |
---|
The timer for renaming has expired. Start editing.
Handles the wx.EVT_SET_FOCUS event for L{CustomTreeCtrl}.
Parameters: | event – a wx.FocusEvent event to be processed. |
---|
Handles the wx.EVT_SIZE event for L{CustomTreeCtrl}.
Parameters: | event – a wx.SizeEvent event to be processed. |
---|
This is just a wrapper for ScrollPages(1).
This is just a wrapper for ScrollPages(-1).
Actually draws an item.
Parameters: |
|
---|
Paint a level in the hierarchy of L{CustomTreeCtrl}.
Parameters: |
|
---|
See GetParent
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.
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.
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.
See GetPosition and SetPosition
Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.
Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position.
Prepends an item as a first child of parent.
Parameters: |
|
---|
Get the id of the control preceding the one with the given autogenerated) id
See GetPreviousHandler and SetPreviousHandler
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.
Raises the window to the top of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.
See GetRect and SetRect
Recurses over all the children of the spcified items, calculating their maximum width.
Parameters: |
|
---|
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.
Refreshes a damaged item line.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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.
Refreshes a damaged selected item line.
Refreshes the selected items under the given item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Refreshes a damaged subtree of an item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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.
Releases mouse input captured with wx.Window.CaptureMouse.
Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer.
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.)
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)
Called by L{TreeTextCtrl} when it marks itself for deletion.
See GetScaleX
See GetScaleY
See GetScreenPosition
See GetScreenRect
Converts from screen to client window coordinates.
Converts from screen to client window coordinates.
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.
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.
Scrolls the specified item into view.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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.
Selects all the item in the tree.
Selects all the children of the given item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Selects/deselects an item.
Parameters: |
|
---|
Selects all the items between item1 and item2.
Parameters: |
|
---|
Actually sends the EVT_TREE_DELETE_ITEM event.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Sets the L{CustomTreeCtrl} window style.
Parameters: | agwStyle – the new L{CustomTreeCtrl} window style. |
---|---|
See : | The L{__init__} method for the agwStyle parameter description. |
Sets the accelerator table for this window.
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.
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. |
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. |
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 |
---|
Use SetInitialSize
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.
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. |
Sets the buttons image list for L{CustomTreeCtrl} (from which application-defined button images are taken).
Parameters: | imageList – an instance of wx.ImageList. |
---|
Sets the caret associated with the window.
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.
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.
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.
Sets the pen used to draw the connecting lines between items.
Parameters: | pen – an instance of wx.Pen. |
---|
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.
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.
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.
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.
Sets the colour for items in a disabled state.
Parameters: | colour – a valid wx.Colour instance. |
---|
Put the native window into double buffered or composited mode.
Associates a drop target with this window. If the window already has a drop target, it is deleted.
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.
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()
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. |
---|
Set’s the focus to this window, allowing it to receive keyboard input.
Set focus to this window as the result of a keyboard action. Normally only called internally.
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.
Sets the L{CustomTreeCtrl} font.
Parameters: | font – a valid wx.Font instance. |
---|---|
Note : | Overridden from wx.PyScrolledWindow. |
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. |
Sets the gradient style for gradient-style selections.
Parameters: | vertical – 0 for horizontal gradient-style selections, 1 for vertical gradient-style selections. |
---|
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.
Associate this help text with all windows with the same id as this one.
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. |
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. |
Sets the font used to render hypertext items.
Parameters: | font – a valid wx.Font instance. |
---|
Sets the colour used to render a non-visited hypertext item.
Parameters: | colour – a valid wx.Colour instance. |
---|
Sets the colour used to render a visited hypertext item.
Parameters: | colour – a valid wx.Colour instance. |
---|
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.
Sets the normal image list for L{CustomTreeCtrl}.
Parameters: | imageList – an instance of wx.ImageList. |
---|
Sets the checkbox/radiobutton image list.
Parameters: |
|
---|
Sets the indentation for L{CustomTreeCtrl}.
Parameters: | indent – an integer representing the indentation for the items in the tree. |
---|
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.
Sets the item background colour.
Parameters: |
|
---|
Sets the item font as bold/unbold.
Parameters: |
|
---|
Gives the item the visual feedback for drag and drop operations. This is useful when something is dragged from outside the L{CustomTreeCtrl}.
Parameters: |
|
---|
Sets the item font.
Parameters: |
|
---|
Forces the appearance/disappearance of the button next to the item.
Parameters: |
|
---|
Sets whether the item is hypertext or not.
Parameters: |
|
---|
Sets the item image, depending on the item state.
Parameters: |
|
---|---|
See : | L{GetItemImage} for an explanation of the which parameter. |
Sets the item font as italic/non-italic.
Parameters: |
|
---|
Sets the data associated to an item.
Parameters: |
|
---|
Sets the item text.
Parameters: |
|
---|
Sets the item text colour.
Parameters: |
|
---|
Sets the item type.
Parameters: |
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Note : | Regarding radiobutton-type items (with ct_type = 2), the following approach is used:
|
Sets whether an hypertext item was visited.
Parameters: |
|
---|
Sets the window for the given item.
Parameters: |
|
---|
Enables/disables the window associated to the item.
Parameters: |
|
---|
Set the text which the window shows in its label if applicable.
Set the layout direction (LTR or RTL) for this window.
A more convenient method than SetSizeHints for setting just the max size.
A more convenient method than SetSizeHints for setting just the min size.
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
Move(self, Point pt, int flags=SIZE_USE_EXISTING)
Moves the window to the given position.
Sets the data associated to an item.
Parameters: |
|
---|
Sets the position and size of the window in pixels using a wx.Rect.
Sets the position of one of the built-in scrollbars.
Sets the scrollbar properties of a built-in scrollbar.
SetScrollbars(self, int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, int xPos=0, int yPos=0, bool noRefresh=False)
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. |
---|
Sets the size of the window in pixels.
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.
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.
Sets the size of the window in pixels.
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.
The same as SetSizer, except it also sets the size hints for the window based on the sizer’s minimum size.
Sets the spacing between items in L{CustomTreeCtrl}.
Parameters: | spacing – an integer representing the spacing between items in the tree. |
---|
Sets the state image list for L{CustomTreeCtrl} (from which application-defined state images are taken).
Parameters: | imageList – an instance of wx.ImageList. |
---|
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.
Attach a tooltip to the window.
Attach a tooltip to the window.
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.
Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.
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.
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.
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.
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.
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.
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.
Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac.
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.
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.
See IsShown and Show
See GetSize and SetSize
See GetSizer and SetSizer
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). |
Used internally.
Used internally.
See GetTargetWindow and SetTargetWindow
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}.
See GetThemeEnabled and SetThemeEnabled
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. |
Toggles the item state (collapsed/expanded).
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
Toggles the item selection.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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.
See GetToolTip and SetToolTip
See IsTopLevel
See GetTopLevelParent
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.
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.
Used internally to handle radio node parent correctly.
Parameters: |
|
---|
Disconnects the event handler binding for event from self. Returns True if successful.
Unregisters a system wide hotkey.
Unselects the current selection.
Unselect all the items.
Unselects all the children of the given item.
Parameters: | item – an instance of L{GenericTreeItem}. |
---|
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.
See GetUpdateClientRect
See GetUpdateRegion
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.
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.
See GetValidator and SetValidator
See GetViewStart
See GetVirtualSize and SetVirtualSize
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.
See GetWindowStyle and SetWindowStyle
See GetWindowStyleFlag and SetWindowStyleFlag
See GetWindowVariant and SetWindowVariant
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Please use PyScrolledWindow.AcceptsFocus instead.
Please use PyScrolledWindow.AcceptsFocusFromKeyboard instead.
Please use PyScrolledWindow.AddChild instead.
Please use PyScrolledWindow.DoGetBestSize instead.
Please use PyScrolledWindow.DoGetClientSize instead.
Please use PyScrolledWindow.DoGetPosition instead.
Please use PyScrolledWindow.DoGetSize instead.
Please use PyScrolledWindow.DoGetVirtualSize instead.
Please use PyScrolledWindow.DoMoveWindow instead.
Please use PyScrolledWindow.DoSetClientSize instead.
Please use PyScrolledWindow.DoSetSize instead.
Please use PyScrolledWindow.DoSetVirtualSize instead.
Please use PyScrolledWindow.Enable instead.
Please use PyScrolledWindow.GetDefaultAttributes instead.
Please use PyScrolledWindow.GetMaxSize instead.
Please use PyScrolledWindow.InitDialog instead.
Please use PyScrolledWindow.OnInternalIdle instead.
Please use PyScrolledWindow.RemoveChild instead.
Please use PyScrolledWindow.ShouldInheritColours instead.
Please use PyScrolledWindow.TransferDataFromWindow instead.
Please use PyScrolledWindow.TransferDataToWindow instead.
Please use PyScrolledWindow.Validate instead.
The membership flag