diff --git a/wxPython/docs/xml/wxPython-metadata.xml b/wxPython/docs/xml/wxPython-metadata.xml
index 50c344832c..8c0171e6e4 100644
--- a/wxPython/docs/xml/wxPython-metadata.xml
+++ b/wxPython/docs/xml/wxPython-metadata.xml
@@ -3617,10 +3617,249 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
#---------------------------------------------------------------------------
+
+wx.Window is the base class for all windows and represents any visible
+object on the screen. All controls, top level windows and so on are
+wx.Windows. Sizers and device contexts are not however, as they don't
+appear on screen themselves.
+
+
+ Styles
+
+ wx.SIMPLE_BORDER: Displays a thin border around the window.
+
+ wx.DOUBLE_BORDER: Displays a double border. Windows and Mac only.
+
+ wx.SUNKEN_BORDER: Displays a sunken border.
+
+ wx.RAISED_BORDER: Displays a raised border.
+
+ wx.STATIC_BORDER: Displays a border suitable for a static
+ control. Windows only.
+
+ wx.NO_BORDER: Displays no border, overriding the default
+ border style for the window.
+
+ wx.TRANSPARENT_WINDOW: The window is transparent, that is, it
+ will not receive paint events. Windows only.
+
+ wx.TAB_TRAVERSAL: Use this to enable tab traversal for
+ non-dialog windows.
+
+ wx.WANTS_CHARS: Use this to indicate that the window
+ wants to get all char/key events for
+ all keys - even for keys like TAB or
+ ENTER which are usually used for
+ dialog navigation and which wouldn't
+ be generated without this style. If
+ you need to use this style in order to
+ get the arrows or etc., but would
+ still like to have normal keyboard
+ navigation take place, you should
+ create and send a wxNavigationKeyEvent
+ in response to the key events for Tab
+ and Shift-Tab.
+
+ wx.NO_FULL_REPAINT_ON_RESIZE: Disables repainting the window
+ completely when its size is changed
+ - you will have to repaint the new
+ window area manually if you use this
+ style. As of version 2.5.1 this
+ style is on by default. Use
+ wx.FULL_REPAINT_ON_RESIZE to
+ deactivate it.
+
+ wx.VSCROLL: Use this style to enable a vertical scrollbar.
+
+ wx.HSCROLL: Use this style to enable a horizontal scrollbar.
+
+ wx.ALWAYS_SHOW_SB: If a window has scrollbars, disable them
+ instead of hiding them when they are
+ not needed (i.e. when the size of the
+ window is big enough to not require
+ the scrollbars to navigate it). This
+ style is currently only implemented
+ for wxMSW and wxUniversal and does
+ nothing on the other platforms.
+
+ wx.CLIP_CHILDREN: Use this style to eliminate flicker caused by
+ the background being repainted, then
+ children being painted over
+ them. Windows only.
+
+ wx.FULL_REPAINT_ON_RESIZE: Use this style to force a complete
+ redraw of the window whenever it is
+ resized instead of redrawing just the
+ part of the window affected by
+ resizing. Note that this was the
+ behaviour by default before 2.5.1
+ release and that if you experience
+ redraw problems with the code which
+ previously used to work you may want
+ to try this.
+
+ Extra Styles
+
+ wx.WS_EX_VALIDATE_RECURSIVELY: By default,
+ Validate/TransferDataTo/FromWindow()
+ only work on direct children of
+ the window (compatible
+ behaviour). Set this flag to make
+ them recursively descend into all
+ subwindows.
+
+ wx.WS_EX_BLOCK_EVENTS: wx.CommandEvents and the objects of the
+ derived classes are forwarded to
+ the parent window and so on
+ recursively by default. Using this
+ flag for the given window allows
+ to block this propagation at this
+ window, i.e. prevent the events
+ from being propagated further
+ upwards. Dialogs have this flag on
+ by default.
+
+ wx.WS_EX_TRANSIENT Don't use this window as an implicit parent for
+ the other windows: this must be
+ used with transient windows as
+ otherwise there is the risk of
+ creating a dialog/frame with this
+ window as a parent which would
+ lead to a crash if the parent is
+ destroyed before the child.
+
+ wx.WS_EX_PROCESS_IDLE: This window should always process idle
+ events, even if the mode set by
+ wx.IdleEvent.SetMode is
+ wx.IDLE_PROCESS_SPECIFIED.
+
+ wx.WS_EX_PROCESS_UI_UPDATES This window should always process UI
+ update events, even if the mode
+ set by wxUpdateUIEvent::SetMode is
+ wxUPDATE_UI_PROCESS_SPECIFIED.
+
+
__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, String name=PanelNameStr) -> Window
+ Construct and show a generic Window.
+
+ Styles
+
+ wx.SIMPLE_BORDER: Displays a thin border around the window.
+
+ wx.DOUBLE_BORDER: Displays a double border. Windows and Mac only.
+
+ wx.SUNKEN_BORDER: Displays a sunken border.
+
+ wx.RAISED_BORDER: Displays a raised border.
+
+ wx.STATIC_BORDER: Displays a border suitable for a static
+ control. Windows only.
+
+ wx.NO_BORDER: Displays no border, overriding the default
+ border style for the window.
+
+ wx.TRANSPARENT_WINDOW: The window is transparent, that is, it
+ will not receive paint events. Windows only.
+
+ wx.TAB_TRAVERSAL: Use this to enable tab traversal for
+ non-dialog windows.
+
+ wx.WANTS_CHARS: Use this to indicate that the window
+ wants to get all char/key events for
+ all keys - even for keys like TAB or
+ ENTER which are usually used for
+ dialog navigation and which wouldn't
+ be generated without this style. If
+ you need to use this style in order to
+ get the arrows or etc., but would
+ still like to have normal keyboard
+ navigation take place, you should
+ create and send a wxNavigationKeyEvent
+ in response to the key events for Tab
+ and Shift-Tab.
+
+ wx.NO_FULL_REPAINT_ON_RESIZE: Disables repainting the window
+ completely when its size is changed
+ - you will have to repaint the new
+ window area manually if you use this
+ style. As of version 2.5.1 this
+ style is on by default. Use
+ wx.FULL_REPAINT_ON_RESIZE to
+ deactivate it.
+
+ wx.VSCROLL: Use this style to enable a vertical scrollbar.
+
+ wx.HSCROLL: Use this style to enable a horizontal scrollbar.
+
+ wx.ALWAYS_SHOW_SB: If a window has scrollbars, disable them
+ instead of hiding them when they are
+ not needed (i.e. when the size of the
+ window is big enough to not require
+ the scrollbars to navigate it). This
+ style is currently only implemented
+ for wxMSW and wxUniversal and does
+ nothing on the other platforms.
+
+ wx.CLIP_CHILDREN: Use this style to eliminate flicker caused by
+ the background being repainted, then
+ children being painted over
+ them. Windows only.
+
+ wx.FULL_REPAINT_ON_RESIZE: Use this style to force a complete
+ redraw of the window whenever it is
+ resized instead of redrawing just the
+ part of the window affected by
+ resizing. Note that this was the
+ behaviour by default before 2.5.1
+ release and that if you experience
+ redraw problems with the code which
+ previously used to work you may want
+ to try this.
+
+ Extra Styles
+
+ wx.WS_EX_VALIDATE_RECURSIVELY: By default,
+ Validate/TransferDataTo/FromWindow()
+ only work on direct children of
+ the window (compatible
+ behaviour). Set this flag to make
+ them recursively descend into all
+ subwindows.
+
+ wx.WS_EX_BLOCK_EVENTS: wx.CommandEvents and the objects of the
+ derived classes are forwarded to
+ the parent window and so on
+ recursively by default. Using this
+ flag for the given window allows
+ to block this propagation at this
+ window, i.e. prevent the events
+ from being propagated further
+ upwards. Dialogs have this flag on
+ by default.
+
+ wx.WS_EX_TRANSIENT Don't use this window as an implicit parent for
+ the other windows: this must be
+ used with transient windows as
+ otherwise there is the risk of
+ creating a dialog/frame with this
+ window as a parent which would
+ lead to a crash if the parent is
+ destroyed before the child.
+
+ wx.WS_EX_PROCESS_IDLE: This window should always process idle
+ events, even if the mode set by
+ wx.IdleEvent.SetMode is
+ wx.IDLE_PROCESS_SPECIFIED.
+
+ wx.WS_EX_PROCESS_UI_UPDATES This window should always process UI
+ update events, even if the mode
+ set by wxUpdateUIEvent::SetMode is
+ wxUPDATE_UI_PROCESS_SPECIFIED.
+
+
@@ -3632,10 +3871,128 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
PreWindow() -> Window
+ Precreate a Window for 2-phase creation.
+
+ Styles
+
+ wx.SIMPLE_BORDER: Displays a thin border around the window.
+
+ wx.DOUBLE_BORDER: Displays a double border. Windows and Mac only.
+
+ wx.SUNKEN_BORDER: Displays a sunken border.
+
+ wx.RAISED_BORDER: Displays a raised border.
+
+ wx.STATIC_BORDER: Displays a border suitable for a static
+ control. Windows only.
+
+ wx.NO_BORDER: Displays no border, overriding the default
+ border style for the window.
+
+ wx.TRANSPARENT_WINDOW: The window is transparent, that is, it
+ will not receive paint events. Windows only.
+
+ wx.TAB_TRAVERSAL: Use this to enable tab traversal for
+ non-dialog windows.
+
+ wx.WANTS_CHARS: Use this to indicate that the window
+ wants to get all char/key events for
+ all keys - even for keys like TAB or
+ ENTER which are usually used for
+ dialog navigation and which wouldn't
+ be generated without this style. If
+ you need to use this style in order to
+ get the arrows or etc., but would
+ still like to have normal keyboard
+ navigation take place, you should
+ create and send a wxNavigationKeyEvent
+ in response to the key events for Tab
+ and Shift-Tab.
+
+ wx.NO_FULL_REPAINT_ON_RESIZE: Disables repainting the window
+ completely when its size is changed
+ - you will have to repaint the new
+ window area manually if you use this
+ style. As of version 2.5.1 this
+ style is on by default. Use
+ wx.FULL_REPAINT_ON_RESIZE to
+ deactivate it.
+
+ wx.VSCROLL: Use this style to enable a vertical scrollbar.
+
+ wx.HSCROLL: Use this style to enable a horizontal scrollbar.
+
+ wx.ALWAYS_SHOW_SB: If a window has scrollbars, disable them
+ instead of hiding them when they are
+ not needed (i.e. when the size of the
+ window is big enough to not require
+ the scrollbars to navigate it). This
+ style is currently only implemented
+ for wxMSW and wxUniversal and does
+ nothing on the other platforms.
+
+ wx.CLIP_CHILDREN: Use this style to eliminate flicker caused by
+ the background being repainted, then
+ children being painted over
+ them. Windows only.
+
+ wx.FULL_REPAINT_ON_RESIZE: Use this style to force a complete
+ redraw of the window whenever it is
+ resized instead of redrawing just the
+ part of the window affected by
+ resizing. Note that this was the
+ behaviour by default before 2.5.1
+ release and that if you experience
+ redraw problems with the code which
+ previously used to work you may want
+ to try this.
+
+ Extra Styles
+
+ wx.WS_EX_VALIDATE_RECURSIVELY: By default,
+ Validate/TransferDataTo/FromWindow()
+ only work on direct children of
+ the window (compatible
+ behaviour). Set this flag to make
+ them recursively descend into all
+ subwindows.
+
+ wx.WS_EX_BLOCK_EVENTS: wx.CommandEvents and the objects of the
+ derived classes are forwarded to
+ the parent window and so on
+ recursively by default. Using this
+ flag for the given window allows
+ to block this propagation at this
+ window, i.e. prevent the events
+ from being propagated further
+ upwards. Dialogs have this flag on
+ by default.
+
+ wx.WS_EX_TRANSIENT Don't use this window as an implicit parent for
+ the other windows: this must be
+ used with transient windows as
+ otherwise there is the risk of
+ creating a dialog/frame with this
+ window as a parent which would
+ lead to a crash if the parent is
+ destroyed before the child.
+
+ wx.WS_EX_PROCESS_IDLE: This window should always process idle
+ events, even if the mode set by
+ wx.IdleEvent.SetMode is
+ wx.IDLE_PROCESS_SPECIFIED.
+
+ wx.WS_EX_PROCESS_UI_UPDATES This window should always process UI
+ update events, even if the mode
+ set by wxUpdateUIEvent::SetMode is
+ wxUPDATE_UI_PROCESS_SPECIFIED.
+
+
Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, String name=PanelNameStr) -> bool
+ Create the GUI part of the Window for 2-phase creation mode.
@@ -3647,79 +4004,146 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
Close(bool force=False) -> bool
+ This function simply generates a EVT_CLOSE event whose handler usually
+tries to close the window. It doesn't close the window itself,
+however. If force is False (the default) then the window's close
+handler will be allowed to veto the destruction of the window.
+
+Usually Close is only used with the top level windows (wx.Frame and
+wx.Dialog classes) as the others are not supposed to have any special
+EVT_CLOSE logic.
+
+The close handler should check whether the window is being deleted
+forcibly, using wx.CloseEvent.GetForce, in which case it should
+destroy the window using wx.Window.Destroy.
+
+Note that calling Close does not guarantee that the window will be
+destroyed; but it provides a way to simulate a manual close of a
+window, which may or may not be implemented by destroying the
+window. The default EVT_CLOSE handler for wx.Dialog does not
+necessarily delete the dialog, since it will simply simulate an
+wxID_CANCEL event which is handled by the appropriate button event
+handler and may do anything at all.
+
+To guarantee that the window will be destroyed, call wx.Window.Destroy
+instead.
Destroy() -> bool
- Deletes the C++ object this Python object is a proxy for.
+ Destroys the window safely. Frames and dialogs are not destroyed
+immediately when this function is called -- they are added to a list
+of windows to be deleted on idle time, when all the window's events
+have been processed. This prevents problems with events being sent to
+non-existent windows.
+
+Returns True if the window has either been successfully deleted, or it
+has been added to the list of windows pending real deletion.
DestroyChildren() -> bool
+ Destroys all children of a window. Called automatically by the destructor.
IsBeingDeleted() -> bool
+ Is the window in the process of being deleted?
SetTitle(String title)
+ Sets the window's title. Applicable only to frames and dialogs.
GetTitle() -> String
+ Gets the window's title. Applicable only to frames and dialogs.
SetLabel(String label)
+ Set the text which the window shows in its label if applicable.
GetLabel() -> String
+ Generic way of getting a label from any window, for identification
+purposes. The interpretation of this function differs from class to
+class. For frames and dialogs, the value returned is the title. For
+buttons or static text controls, it is the button text. This function
+can be useful for meta-programs (such as testing tools or
+special-needs access programs) which need to identify windows by name.
SetName(String name)
+ Sets the window's name. The window name is used for ressource setting
+in X, it is not the same as the window title/label
GetName() -> String
+ Returns the window's 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.
SetId(int winid)
+ Sets the identifier of the window. Each window has an integer
+identifier. If the application has not provided one, an identifier
+will be generated. Normally, the identifier should be provided on
+creation and should not be modified subsequently.
GetId() -> int
+ Returns the identifier of the window. Each window has an integer
+identifier. If the application has not provided one (or the default Id
+-1 is used) then an unique identifier with a negative value will be
+generated.
NewControlId() -> int
+ Generate a control id for the controls which were not given one.
NextControlId(int winid) -> int
+ Get the id of the control following the one with the given
+(autogenerated) id
PrevControlId(int winid) -> int
+ Get the id of the control preceding the one with the given
+(autogenerated) id
SetSize(Size size)
+ Sets the size of the window in pixels.
SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
+ Sets the position and size of the window in pixels. The sizeFlags
+parameter indicates the interpretation of the other params if they are
+-1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
+shoudl 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.
@@ -3730,6 +4154,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
SetRect(Rect rect, int sizeFlags=SIZE_AUTO)
+ Sets the position and size of the window in pixels using a wx.Rect.
@@ -3737,6 +4162,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
SetSizeWH(int width, int height)
+ Sets the size of the window in pixels.
@@ -3744,6 +4170,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
Move(Point pt, int flags=SIZE_USE_EXISTING)
+ Moves the window to the given position.
@@ -3751,6 +4178,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)
+ Moves the window to the given position.
@@ -3759,18 +4187,32 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
Raise()
+ Raises the window to the top of the window hierarchy if it is a
+managed window (dialog or frame).
Lower()
+ Lowers the window to the bottom of the window hierarchy if it is a
+managed window (dialog or frame).
SetClientSize(Size size)
+ This sets the size of the window client area in pixels. Using this
+function to size a window tends to be more device-independent than
+wx.Window.SetSize, since the application need not worry about what
+dimensions the border or title bar have when trying to fit the window
+around panel items, for example.
SetClientSizeWH(int width, int height)
+ This sets the size of the window client area in pixels. Using this
+function to size a window tends to be more device-independent than
+wx.Window.SetSize, since the application need not worry about what
+dimensions the border or title bar have when trying to fit the window
+around panel items, for example.
@@ -3778,6 +4220,11 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
SetClientRect(Rect rect)
+ This sets the size of the window client area in pixels. Using this
+function to size a window tends to be more device-independent than
+wx.Window.SetSize, since the application need not worry about what
+dimensions the border or title bar have when trying to fit the window
+around panel items, for example.
@@ -3808,14 +4255,19 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
GetRect() -> Rect
+ Returns the size and position of the window as a wx.Rect object.
GetClientSize() -> Size
- Get the window's client size.
+ This gets the size of the window's 'client area' in pixels. The client
+area is the area which may be drawn on by the programmer, excluding
+title bar, border, scrollbars, etc.
GetClientSizeTuple() -> (width, height)
- Get the window's client size.
+ This gets the size of the window's 'client area' in pixels. The client
+area is the area which may be drawn on by the programmer, excluding
+title bar, border, scrollbars, etc.
@@ -3823,19 +4275,31 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
GetClientAreaOrigin() -> Point
+ Get the origin of the client area of the window relative to the
+window's top left corner (the client area may be shifted because of
+the borders, scrollbars, other decorations...)
GetClientRect() -> Rect
+ Get the client area position and size as a wx.Rect object.
GetBestSize() -> Size
- Get the size best suited for the window (in fact, minimal acceptable size
-using which it will still look "nice")
+ This functions returns the best acceptable minimal size for the
+window, if applicable. For example, for a static text control, it will be
+the minimal size such that the control label is not truncated. For
+windows containing subwindows (suzh aswx.Panel), the size returned
+by this function will be the same as the size the window would have
+had after calling Fit.
GetBestSizeTuple() -> (width, height)
- Get the size best suited for the window (in fact, minimal acceptable size
-using which it will still look "nice")
+ This functions returns the best acceptable minimal size for the
+window, if applicable. For example, for a static text control, it will be
+the minimal size such that the control label is not truncated. For
+windows containing subwindows (suzh aswx.Panel), the size returned
+by this function will be the same as the size the window would have
+had after calling Fit.
@@ -3843,34 +4307,65 @@ using which it will still look "nice")
GetAdjustedBestSize() -> Size
+ This method is similar to GetBestSize, except in one
+thing. GetBestSize should return the minimum untruncated size of the
+window, while this method will return the largest of BestSize and any
+user specified minimum size. ie. it is the minimum size the window
+should currently be drawn at, not the minimal size it can possibly
+tolerate.
Center(int direction=BOTH)
+ Centers the window. The parameter specifies the direction for
+cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
+also include wx.CENTER_ON_SCREEN flag if you want to center the window
+on the entire screen and not on its parent window. If it is a
+top-level window and has no parent then it will always be centered
+relative to the screen.
CenterOnScreen(int dir=BOTH)
+ Center on screen (only works for top level windows)
CenterOnParent(int dir=BOTH)
+ Center with respect to the the parent window
Fit()
+ Sizes the window so that it fits around its subwindows. This function
+won't do anything if there are no subwindows and will only really work
+correctly if sizers are used for the subwindows layout. Also, if the
+window has exactly one subwindow it is better (faster and the result
+is more precise as Fit adds some margin to account for fuzziness of
+its calculations) to call window.SetClientSize(child.GetSize())
+instead of calling Fit.
FitInside()
+ 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.
SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
int incH=-1)
+ Allows specification of minimum and maximum window sizes, and window
+size increments. If a pair of values is not set (or set to -1), the
+default values will be used. If this function is called, the user
+will not be able to size the window outside the given bounds. The
+resizing increments are only significant under Motif or Xt.
@@ -3882,6 +4377,10 @@ using which it will still look "nice")
SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)
+ Allows specification of minimum and maximum virtual window sizes. If a
+pair of values is not set (or set to -1), the default values will be
+used. If this function is called, the user will not be able to size
+the virtual area of the window outside the given bounds.
@@ -3906,18 +4405,18 @@ using which it will still look "nice")
SetVirtualSize(Size size)
- Set the the virtual size of a window. 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.
+ 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.
SetVirtualSizeWH(int w, int h)
- Set the the virtual size of a window. 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.
+ 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.
@@ -3925,15 +4424,15 @@ less independent of the screen window size.
GetVirtualSize() -> Size
- Get the the virtual size of the window. 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.
GetVirtualSizeTuple() -> (width, height)
- Get the the virtual size of the window. 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.
@@ -3941,204 +4440,311 @@ more or less independent of the screen window size.
GetBestVirtualSize() -> Size
+ Return the largest of ClientSize and BestSize (as determined by a
+sizer, interior children, or other means)
Show(bool show=True) -> bool
+ Shows or hides the window. You may need to call Raise for a top level
+window if you want to bring it to top, although this is not needed if
+Show is called immediately after the frame creation. Returns True if
+the window has been shown or hidden or False if nothing was done
+because it already was in the requested state.
Hide() -> bool
+ Equivalent to calling Show(False).
Enable(bool enable=True) -> bool
+ Enable or disable the window for user input. Note that when a parent
+window is disabled, all of its children are disabled as well and they
+are reenabled again when the parent is. Returns true if the window
+has been enabled or disabled, false if nothing was done, i.e. if the
+window had already been in the specified state.
Disable() -> bool
+ Disables the window, same as Enable(false).
IsShown() -> bool
+ Returns true if the window is shown, false if it has been hidden.
IsEnabled() -> bool
+ Returns true if the window is enabled for input, false otherwise.
SetWindowStyleFlag(long style)
+ Sets the style of the window. Please note that some styles cannot be
+changed after the window creation and that Refresh() might be called
+after changing the others for the change to take place immediately.
GetWindowStyleFlag() -> long
-
-
- SetWindowStyle(long style)
-
-
-
-
-
- GetWindowStyle() -> long
+ Gets the window style that was passed to the constructor or Create
+method.
HasFlag(int flag) -> bool
+ Test if the given style is set for this window.
IsRetained() -> bool
+ Returns true if the window is retained, false otherwise. Retained
+windows are only available on X platforms.
SetExtraStyle(long exStyle)
+ Sets the extra style bits for the window. Extra styles are the less
+often used style bits which can't be set with the constructor or with
+SetWindowStyleFlag()
GetExtraStyle() -> long
+ Returns the extra style bits for the window.
MakeModal(bool modal=True)
+ Disables all other windows in the application so that the user can
+only interact with this window. Passing False will reverse this
+effect.
SetThemeEnabled(bool enableTheme)
+ This function tells a window if it should use the system's "theme"
+ code to draw the windows' background instead if its own background
+ drawing code. This will only have an effect on platforms that support
+ the notion of themes in user defined windows. One such platform is
+ GTK+ where windows can have (very colourful) backgrounds defined by a
+ user's selected theme.
+
+Dialogs, notebook pages and the status bar have this flag set to true
+by default so that the default look and feel is simulated best.
GetThemeEnabled() -> bool
-
-
- ShouldInheritColours() -> bool
+ Return the themeEnabled flag.
SetFocus()
+ Set's the focus to this window, allowing it to receive keyboard input.
SetFocusFromKbd()
+ Set focus to this window as the result of a keyboard action. Normally
+only called internally.
FindFocus() -> Window
+ Returns the window or control that currently has the keyboard focus,
+or None.
AcceptsFocus() -> bool
+ Can this window have focus?
AcceptsFocusFromKeyboard() -> bool
+ Can this window be given focus by keyboard navigation? if not, the
+only way to give it focus (provided it accepts it at all) is to click
+it.
GetDefaultItem() -> Window
+ Get the default child of this parent, i.e. the one which is activated
+by pressing <Enter> such as the OK button on a wx.Dialog.
SetDefaultItem(Window child) -> Window
+ Set this child as default, return the old default.
SetTmpDefaultItem(Window win)
+ Set this child as temporary default
GetChildren() -> PyObject
+ Returns a list of the window's children. NOTE: Currently this is a
+copy of the child window list maintained by the window, so the return
+value of this function is only valid as long as the window's children
+do not change.
GetParent() -> Window
+ Returns the parent window of this window, or None if there isn't one.
GetGrandParent() -> Window
+ Returns the parent of the parent of this window, or None if there isn't one.
IsTopLevel() -> bool
+ Returns true if the given window is a top-level one. Currently all
+frames and dialogs are always considered to be top-level windows (even
+if they have a parent window).
Reparent(Window newParent) -> bool
+ Reparents the window, i.e the window will be removed from its current
+parent window (e.g. a non-standard toolbar in a wxFrame) and then
+re-inserted into another. Available on Windows and GTK. Returns True
+if the parent was changed, False otherwise (error or newParent ==
+oldParent)
AddChild(Window child)
+ Adds a child window. This is called automatically by window creation
+functions so should not be required by the application programmer.
RemoveChild(Window child)
+ Removes a child window. This is called automatically by window
+deletion functions so should not be required by the application
+programmer.
FindWindowById(long winid) -> Window
+ Find a chld of this window by window ID
FindWindowByName(String name) -> Window
+ Find a child of this window by name
GetEventHandler() -> EvtHandler
+ Returns the event handler for this window. By default, the window is
+its own event handler.
SetEventHandler(EvtHandler handler)
+ Sets the event handler for this window. An event handler is an object
+that is capable of processing the events sent to a window. 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 to the next one in the chain.
PushEventHandler(EvtHandler handler)
+ Pushes this event handler onto the event handler stack for the window.
+An event handler is an object that is capable of processing the events
+sent to a window. 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.
PopEventHandler(bool deleteHandler=False) -> EvtHandler
+ Removes and returns the top-most event handler on the event handler
+stack. If deleteHandler is True then the wx.EvtHandler object will be
+destroyed after it is popped.
RemoveEventHandler(EvtHandler handler) -> bool
+ Find the given handler in the event handler chain and remove (but
+not delete) it from the event handler chain, return 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.)
SetValidator(Validator validator)
+ Deletes the current validator (if any) and sets the window validator,
+having called wx.Validator.Clone to create a new validator of this
+type.
GetValidator() -> Validator
+ Returns a pointer to the current validator for the window, or None if
+there is none.
SetAcceleratorTable(AcceleratorTable accel)
+ Sets the accelerator table for this window.
GetAcceleratorTable() -> AcceleratorTable
+ Gets the accelerator table for this window.
RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool
+ Registers a system wide hotkey. Every time the user presses the hotkey
+registered here, this window will receive a hotkey event. It will
+receive the event even if the application is in the background and
+does not have the input focus because the user is working with some
+other application. To bind an event handler function to this hotkey
+use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
+hotkey was registered successfully.
@@ -4147,30 +4753,55 @@ more or less independent of the screen window size.
UnregisterHotKey(int hotkeyId) -> bool
+ Unregisters a system wide hotkey.
ConvertDialogPointToPixels(Point pt) -> Point
+ Converts a point or size from dialog units to pixels. Dialog units
+are used for maintaining a dialog's proportions even if the font
+changes. For the x dimension, the dialog units are multiplied by the
+average character width and then divided by 4. For the y dimension,
+the dialog units are multiplied by the average character height and
+then divided by 8.
ConvertDialogSizeToPixels(Size sz) -> Size
+ Converts a point or size from dialog units to pixels. Dialog units
+are used for maintaining a dialog's proportions even if the font
+changes. For the x dimension, the dialog units are multiplied by the
+average character width and then divided by 4. For the y dimension,
+the dialog units are multiplied by the average character height and
+then divided by 8.
DLG_PNT(Point pt) -> Point
+ Converts a point or size from dialog units to pixels. Dialog units
+are used for maintaining a dialog's proportions even if the font
+changes. For the x dimension, the dialog units are multiplied by the
+average character width and then divided by 4. For the y dimension,
+the dialog units are multiplied by the average character height and
+then divided by 8.
DLG_SZE(Size sz) -> Size
+ Converts a point or size from dialog units to pixels. Dialog units
+are used for maintaining a dialog's proportions even if the font
+changes. For the x dimension, the dialog units are multiplied by the
+average character width and then divided by 4. For the y dimension,
+the dialog units are multiplied by the average character height and
+then divided by 8.
@@ -4189,6 +4820,10 @@ more or less independent of the screen window size.
WarpPointer(int x, int y)
+ Moves the pointer to the given position on the window.
+
+NOTE: This function is not supported under Mac because Apple Human
+Interface Guidelines forbid moving the mouse cursor programmatically.
@@ -4196,18 +4831,32 @@ more or less independent of the screen window size.
CaptureMouse()
+ 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.
ReleaseMouse()
+ Releases mouse input captured with wx.Window.CaptureMouse.
GetCapture() -> Window
+ Returns the window which currently captures the mouse or None
HasCapture() -> bool
+ Returns true if this window has the current mouse capture.
Refresh(bool eraseBackground=True, Rect rect=None)
+ Mark the specified rectangle (or the whole window) as "dirty" so it
+will be repainted. Causes an EVT_PAINT event to be generated and sent
+to the window.
@@ -4215,36 +4864,67 @@ more or less independent of the screen window size.
RefreshRect(Rect rect)
+ 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.
Update()
+ 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.
ClearBackground()
+ Clears the window by filling it with the current background
+colour. Does not cause an erase background event to be generated.
Freeze()
+ 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.
+
+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.
Thaw()
+ Reenables window updating after a previous call to Freeze.
PrepareDC(DC dc)
+ Call this function to prepare the device context for drawing a
+scrolled image. It sets the device origin according to the current
+scroll position.
GetUpdateRegion() -> Region
+ Returns the region specifying which parts of the window have been
+damaged. Should only be called within an EVT_PAINT handler.
GetUpdateClientRect() -> Rect
+ Get the update rectangle region bounding box in client coords.
IsExposed(int x, int y, int w=1, int h=1) -> bool
+ Returns true if the given point or rectangle area has been exposed
+since the last repaint. Call this in an paint event handler to
+optimize redrawing by only redrawing those areas, which have been
+exposed.
@@ -4254,66 +4934,107 @@ more or less independent of the screen window size.
IsExposedPoint(Point pt) -> bool
+ Returns true if the given point or rectangle area has been exposed
+since the last repaint. Call this in an paint event handler to
+optimize redrawing by only redrawing those areas, which have been
+exposed.
isExposedRect(Rect rect) -> bool
+ Returns true if the given point or rectangle area has been exposed
+since the last repaint. Call this in an paint event handler to
+optimize redrawing by only redrawing those areas, which have been
+exposed.
SetBackgroundColour(Colour colour) -> bool
+ Sets the background colour of the window. Returns True if the colour
+was changed. The background colour is usually painted by the default
+EVT_ERASE_BACKGROUND event handler function under Windows and
+automatically under GTK.
+
+Note that setting the background colour does not cause an immediate
+refresh, so you may wish to call ClearBackground or Refresh after
+calling this function.
+
+Use this function with care under GTK+ as the new appearance of the
+window might not look equally well when used with themes, i.e GTK+'s
+ability to change its look as the user wishes with run-time loadable
+modules.
SetForegroundColour(Colour colour) -> bool
+ Sets the foreground colour of the window. Returns True is the colour
+was changed. The interpretation of foreground colour is dependent on
+the window class; it may be the text colour or other colour, or it may
+not be used at all.
GetBackgroundColour() -> Colour
+ Returns the background colour of the window.
GetForegroundColour() -> Colour
+ Returns the foreground colour of the window. The interpretation of
+foreground colour is dependent on the window class; it may be the text
+colour or other colour, or it may not be used at all.
SetCursor(Cursor cursor) -> bool
+ Sets the window's cursor. Notice that the window cursor also sets it
+for the children of the window implicitly.
+
+The cursor may be wx.NullCursor in which case the window cursor will
+be reset back to default.
GetCursor() -> Cursor
+ Return the cursor associated with this window.
SetFont(Font font) -> bool
+ Sets the font for this window.
GetFont() -> Font
+ Returns a reference to the font for this window.
SetCaret(Caret caret)
+ Sets the caret associated with the window.
GetCaret() -> Caret
+ Returns the caret associated with the window.
GetCharHeight() -> int
+ Get the (average) character size for the current font.
GetCharWidth() -> int
+ Get the (average) character size for the current font.
GetTextExtent(String string) -> (width, height)
@@ -4327,7 +5048,8 @@ more or less independent of the screen window size.
GetFullTextExtent(String string, Font font=None) ->
(width, height, descent, externalLeading)
- Get the width, height, decent and leading of the text using the current or specified font.
+ Get the width, height, decent and leading of the text using the
+current or specified font.
@@ -4338,14 +5060,16 @@ more or less independent of the screen window size.
- ClientToScreenXY(int x, int y)
+ ClientToScreenXY(int x, int y) -> (x,y)
+ Converts to screen coordinates from coordinates relative to this window.
- ScreenToClientXY(int x, int y)
+ ScreenToClientXY(int x, int y) -> (x,y)
+ Converts from screen to client window coordinates.
@@ -4353,18 +5077,21 @@ more or less independent of the screen window size.
ClientToScreen(Point pt) -> Point
+ Converts to screen coordinates from coordinates relative to this window.
ScreenToClient(Point pt) -> Point
+ Converts from screen to client window coordinates.
HitTestXY(int x, int y) -> int
+ Test where the given (in client coords) point lies
@@ -4372,27 +5099,66 @@ more or less independent of the screen window size.
HitTest(Point pt) -> int
+ Test where the given (in client coords) point lies
-
- GetBorderFlags(long flags) -> int
+
+ Get the window border style from the given flags: this is different
+from simply doing flags & wxBORDER_MASK because it uses
+GetDefaultBorder() to translate wxBORDER_DEFAULT to something
+reasonable.
+
-
- GetBorder() -> int
+
+ GetBorder(long flags) -> int
+GetBorder() -> int
+ Get border for the flags of this window
UpdateWindowUI(long flags=UPDATE_UI_NONE)
+ This function sends EVT_UPDATE_UI events to the window. The particular
+implementation depends on the window; for example a wx.ToolBar will
+send an update UI event for each toolbar button, and a wx.Frame will
+send an update UI event for each menubar menu item. You can call this
+function from your application to ensure that your UI is up-to-date at
+a particular point in time (as far as your EVT_UPDATE_UI handlers are
+concerned). This may be necessary if you have called
+wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
+limit the overhead that wxWindows incurs by sending update UI events
+in idle time.
+
+The flags should be a bitlist of one or more of the following values:
+
+ wx.UPDATE_UI_NONE No particular value
+ wx.UPDATE_UI_RECURSE Call the function for descendants
+ wx.UPDATE_UI_FROMIDLE Invoked from OnIdle
+
+If you are calling this function from an OnIdle function, make sure
+you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to
+only update the UI elements that need to be updated in idle time. Some
+windows update their elements only when necessary, for example when a
+menu is about to be shown. The following is an example of how to call
+UpdateWindowUI from an idle function.
+
+ def OnIdle(self, evt):
+ if wx.UpdateUIEvent.CanUpdate(self):
+ self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE);
+
PopupMenuXY(Menu menu, int x, int y) -> bool
+ Pops up the given menu at the specified coordinates, relative to this
+window, and returns control when the user has dismissed the menu. If a
+menu item is selected, the corresponding menu event is generated and
+will be processed as usual.
@@ -4401,6 +5167,10 @@ more or less independent of the screen window size.
PopupMenu(Menu menu, Point pos) -> bool
+ Pops up the given menu at the specified coordinates, relative to this
+window, and returns control when the user has dismissed the menu. If a
+menu item is selected, the corresponding menu event is generated and
+will be processed as usual.
@@ -4408,17 +5178,35 @@ more or less independent of the screen window size.
GetHandle() -> long
+ Returns the platform-specific handle (as a long integer) of the
+physical window. Currently on wxMac it returns the handle of the
+toplevel parent of the window.
HasScrollbar(int orient) -> bool
+ Does the window have the scrollbar for this orientation?
- SetScrollbar(int orient, int pos, int thumbvisible, int range, bool refresh=True)
+ SetScrollbar(int orientation, int pos, int thumbvisible, int range,
+ bool refresh=True)
+ Sets the scrollbar properties of a built-in scrollbar.
+
+ orientation: Determines the scrollbar whose page size is to be
+ set. May be wx.HORIZONTAL or wx.VERTICAL.
+
+ position: The position of the scrollbar in scroll units.
+
+ thumbSize: The size of the thumb, or visible portion of the
+ scrollbar, in scroll units.
+
+ range: The maximum position of the scrollbar.
+
+ refresh: True to redraw the scrollbar, false otherwise.
-
+
@@ -4426,33 +5214,51 @@ more or less independent of the screen window size.
- SetScrollPos(int orient, int pos, bool refresh=True)
+ SetScrollPos(int orientation, int pos, bool refresh=True)
+ Sets the position of one of the built-in scrollbars.
-
+
- GetScrollPos(int orient) -> int
+ GetScrollPos(int orientation) -> int
+ Returns the built-in scrollbar position.
-
+
- GetScrollThumb(int orient) -> int
+ GetScrollThumb(int orientation) -> int
+ Returns the built-in scrollbar thumb size.
-
+
- GetScrollRange(int orient) -> int
+ GetScrollRange(int orientation) -> int
+ Returns the built-in scrollbar range.
-
+
ScrollWindow(int dx, int dy, Rect rect=None)
+ Physically scrolls the pixels in the window and move child windows
+accordingly. Use this function to optimise your scrolling
+implementations, to minimise the area that must be redrawn. Note that
+it is rarely required to call this function from a user program.
+
+ dx: Amount to scroll horizontally.
+
+ dy: Amount to scroll vertically.
+
+ rect: Rectangle to invalidate. If this is None, the whole window
+ is invalidated. If you pass a rectangle corresponding to the
+ area of the window exposed by the scroll, your painting
+ handler can optimize painting by checking for the
+ invalidated region.
@@ -4461,90 +5267,143 @@ more or less independent of the screen window size.
ScrollLines(int lines) -> bool
+ If the platform and window class supports it, scrolls the window by
+the given number of lines down, if lines is positive, or up if lines
+is negative. Returns True if the window was scrolled, False if it was
+already on top/bottom and nothing was done.
ScrollPages(int pages) -> bool
+ If the platform and window class supports it, scrolls the window by
+the given number of pages down, if pages is positive, or up if pages
+is negative. Returns True if the window was scrolled, False if it was
+already on top/bottom and nothing was done.
LineUp() -> bool
+ This is just a wrapper for ScrollLines(-1).
LineDown() -> bool
+ This is just a wrapper for ScrollLines(1).
PageUp() -> bool
+ This is just a wrapper for ScrollPages(-1).
PageDown() -> bool
+ This is just a wrapper for ScrollPages(1).
SetHelpText(String text)
+ Sets the help text to be used as context-sensitive help for this
+window. Note that the text is actually stored by the current
+wxHelpProvider implementation, and not in the window object itself.
SetHelpTextForId(String text)
+ Associate this help text with all windows with the same id as this
+one.
GetHelpText() -> String
+ Gets the help text to be used as context-sensitive help for this
+window. Note that the text is actually stored by the current
+wxHelpProvider implementation, and not in the window object itself.
SetToolTipString(String tip)
+ Attach a tooltip to the window.
SetToolTip(ToolTip tip)
+ Attach a tooltip to the window.
GetToolTip() -> ToolTip
+ get the associated tooltip or None if none
- SetDropTarget(PyDropTarget dropTarget)
+ SetDropTarget(DropTarget dropTarget)
+ Associates a drop target with this window. If the window already has
+a drop target, it is deleted.
- GetDropTarget() -> PyDropTarget
+ GetDropTarget() -> DropTarget
+ Returns the associated drop target, which may be None.
SetConstraints(LayoutConstraints constraints)
+ Sets the window to have the given layout constraints. If an existing
+layout constraints object is already owned by the window, it will be
+deleted. Pass None to disassociate and delete the window's current
+constraints.
+
+You must call SetAutoLayout to tell a window to use the constraints
+automatically in its default EVT_SIZE handler; otherwise, you must
+handle EVT_SIZE yourself and call Layout() explicitly. When setting
+both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
+effect.
GetConstraints() -> LayoutConstraints
+ Returns a pointer to the window's layout constraints, or None if there
+are none.
SetAutoLayout(bool autoLayout)
+ Determines whether the Layout function will be called automatically
+when the window is resized. It 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.
GetAutoLayout() -> bool
+ Returns the current autoLayout setting
Layout() -> bool
+ Invokes the constraint-based layout algorithm or the sizer-based
+algorithm for this window. See SetAutoLayout: when auto layout is on,
+this function gets called automatically by the default EVT_SIZE
+handler when the window is resized.
SetSizer(Sizer sizer, bool deleteOld=True)
+ Sets the window to have the given layout sizer. The window will then
+own the object, and will take care of its deletion. If an existing
+layout sizer object is already owned by the window, it will be deleted
+if the deleteOld parameter is true. Note that this function will also
+call SetAutoLayout implicitly with a True parameter if the sizer is
+non-NoneL and False otherwise.
@@ -4552,6 +5411,8 @@ more or less independent of the screen window size.
SetSizerAndFit(Sizer sizer, bool deleteOld=True)
+ The same as SetSizer, except it also sets the size hints for the
+window based on the sizer's minimum size.
@@ -4559,25 +5420,39 @@ more or less independent of the screen window size.
GetSizer() -> Sizer
+ Return the sizer associated with the window by a previous call to
+SetSizer or None if there isn't one.
SetContainingSizer(Sizer sizer)
+ This normally does not need to be called by application code. It is
+called internally when a window is added to a sizer, and is used so
+the window can remove itself from the sizer when it is destroyed.
GetContainingSizer() -> Sizer
+ Return the sizer that this window is a member of, if any, otherwise None.
def DLG_PNT(win, point_or_x, y=None):
+ """
+ Convenience function for converting a Point or (x,y) in
+ dialog units to pixel units.
+ """
if y is None:
return win.ConvertDialogPointToPixels(point_or_x)
else:
return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
def DLG_SZE(win, size_width, height=None):
+ """
+ Convenience function for converting a Size or (w,h) in
+ dialog units to pixel units.
+ """
if height is None:
return win.ConvertDialogSizeToPixels(size_width)
else:
@@ -4585,6 +5460,10 @@ def DLG_SZE(win, size_width, height=None):
FindWindowById(long id, Window parent=None) -> Window
+ Find the first window in the application with the given id. If parent
+is None, the search will start from all top-level frames and dialog
+boxes; if non-None, the search will be limited to the given window
+hierarchy. The search is recursive in both cases.
@@ -4592,6 +5471,13 @@ def DLG_SZE(win, size_width, height=None):
FindWindowByName(String name, Window parent=None) -> Window
+ Find a window by its name (as given in a window constructor or Create
+function call). If parent is None, the search will start from all
+top-level frames and dialog boxes; if non-None, the search will be
+limited to the given window hierarchy. The search is recursive in both
+cases.
+
+If no window with such name is found, wx.FindWindowByLabel is called.
@@ -4599,6 +5485,11 @@ def DLG_SZE(win, size_width, height=None):
FindWindowByLabel(String label, Window parent=None) -> Window
+ Find a window by its label. Depending on the type of window, the label
+may be a window title or panel item label. If parent is None, the
+search will start from all top-level frames and dialog boxes; if
+non-None, the search will be limited to the given window
+hierarchy. The search is recursive in both cases.
@@ -5297,11 +6188,17 @@ def DLG_SZE(win, size_width, height=None):
#---------------------------------------------------------------------------
+ This is the base class for a control or 'widget'.
+
+A control is generally a small window which processes user input and/or
+displays one or more item of data.
__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, Validator validator=DefaultValidator,
String name=ControlNameStr) -> Control
+ Create a Control. Normally you should only call this from a
+subclass' __init__ as a plain old wx.Control is not very useful.
@@ -5314,11 +6211,13 @@ def DLG_SZE(win, size_width, height=None):
PreControl() -> Control
+ Precreate a Control control for 2-phase creation
Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, Validator validator=DefaultValidator,
String name=ControlNameStr) -> bool
+ Do the 2nd phase and create the GUI control.
@@ -5331,15 +6230,19 @@ def DLG_SZE(win, size_width, height=None):
Command(CommandEvent event)
+ Simulates the effect of the user issuing a command to the
+item. See wxCommandEvent.
GetLabel() -> String
+ Return a control's text.
SetLabel(String label)
+ Sets the item's text.
@@ -5349,8 +6252,25 @@ def DLG_SZE(win, size_width, height=None):
#---------------------------------------------------------------------------
+ wx.ItemContainer defines an interface which is implemented by all
+controls which have string subitems, each of which may be
+selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and
+wx.ComboBox (which implements an extended interface deriving from
+this one)
+
+It defines the methods for accessing the control's items and
+although each of the derived classes implements them differently,
+they still all conform to the same interface.
+
+The items in a wx.ItemContainer have (non empty) string labels
+and, optionally, client data associated with them.
+
Append(String item, PyObject clientData=None) -> int
+ Adds the item to the control, associating the given data with the
+item if not None. The return value is the index of the newly
+added item which may be different from the last one if the
+control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style).
@@ -5358,12 +6278,17 @@ def DLG_SZE(win, size_width, height=None):
AppendItems(wxArrayString strings)
+ Apend several items at once to the control. Notice that calling
+this method may be much faster than appending the items one by
+one if you need to add a lot of items.
Insert(String item, int pos, PyObject clientData=None) -> int
+ Insert an item into the control before the item at the pos index,
+optionally associating some data object with the item.
@@ -5372,21 +6297,29 @@ def DLG_SZE(win, size_width, height=None):
Clear()
+ Removes all items from the control.
Delete(int n)
+ Deletes the item at the zero-based index 'n' from the control.
+Note that it is an error (signalled by a PyAssertionError
+exception if enabled) to remove an item with the index negative
+or greater or equal than the number of items in the control.
GetCount() -> int
+ Returns the number of items in the control.
IsEmpty() -> bool
+ Returns True if the control is empty or False if it has some items.
GetString(int n) -> String
+ Returns the label of the item with the given index.
@@ -5396,6 +6329,7 @@ def DLG_SZE(win, size_width, height=None):
SetString(int n, String s)
+ Sets the label for the given item.
@@ -5403,30 +6337,38 @@ def DLG_SZE(win, size_width, height=None):
FindString(String s) -> int
+ Finds an item whose label matches the given string. Returns the
+zero-based position of the item, or wx.NOT_FOUND if the string
+was not found.
Select(int n)
+ Sets the item at index 'n' to be the selected item.
GetSelection() -> int
+ Returns the index of the selected item or wx.NOT_FOUND if no item is selected.
GetStringSelection() -> String
+ Returns the label of the selected item or an empty string if no item is selected.
GetClientData(int n) -> PyObject
+ Returns the client data associated with the given item, (if any.)
SetClientData(int n, PyObject clientData)
+ Associate the given client data with the item at position n.
@@ -5437,6 +6379,9 @@ def DLG_SZE(win, size_width, height=None):
#---------------------------------------------------------------------------
+ wx.ControlWithItems combines the wx.ItemContainer class with the
+wx.Control class, and is used for the base class of various
+controls that have items.
@@ -6001,15 +6946,15 @@ def DLG_SZE(win, size_width, height=None):
- __eq__(GBPosition p) -> bool
+ __eq__(GBPosition other) -> bool
-
+
- __ne__(GBPosition p) -> bool
+ __ne__(GBPosition other) -> bool
-
+
@@ -6050,15 +6995,15 @@ def DLG_SZE(win, size_width, height=None):
- __eq__(GBSpan o) -> bool
+ __eq__(GBSpan other) -> bool
-
+
- __ne__(GBSpan o) -> bool
+ __ne__(GBSpan other) -> bool
-
+
@@ -6332,6 +7277,49 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
#---------------------------------------------------------------------------
+ Objects of this class are stored in the wx.LayoutConstraint class as one of
+eight possible constraints that a window can be involved in. You will never
+need to create an instance of wx.IndividualLayoutConstraint, rather you should
+use create a wx.LayoutContstraints instance and use the individual contstraints
+that it contains.
+
+Constraints are initially set to have the relationship wx.Unconstrained, which
+means that their values should be calculated by looking at known constraints.
+
+The Edge specifies the type of edge or dimension of a window.
+
+ Edges
+
+ wx.Left The left edge.
+ wx.Top The top edge.
+ wx.Right The right edge.
+ wx.Bottom The bottom edge.
+ wx.CentreX The x-coordinate of the centre of the window.
+ wx.CentreY The y-coordinate of the centre of the window.
+
+
+The Relationship specifies the relationship that this edge or dimension has
+with another specified edge or dimension. Normally, the user doesn't use these
+directly because functions such as Below and RightOf are a convenience for
+using the more general Set function.
+
+ Relationships
+
+ wx.Unconstrained The edge or dimension is unconstrained
+ (the default for edges.)
+ wx.AsIs The edge or dimension is to be taken from the current
+ window position or size (the default for dimensions.)
+ wx.Above The edge should be above another edge.
+ wx.Below The edge should be below another edge.
+ wx.LeftOf The edge should be to the left of another edge.
+ wx.RightOf The edge should be to the right of another edge.
+ wx.SameAs The edge or dimension should be the same as another edge
+ or dimension.
+ wx.PercentOf The edge or dimension should be a percentage of another
+ edge or dimension.
+ wx.Absolute The edge or dimension should be a given absolute value.
+
+
Set(int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
@@ -6345,6 +7333,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
LeftOf(Window sibling, int marg=0)
+ Sibling relationship
@@ -6352,6 +7341,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
RightOf(Window sibling, int marg=0)
+ Sibling relationship
@@ -6359,6 +7349,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
Above(Window sibling, int marg=0)
+ Sibling relationship
@@ -6366,6 +7357,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
Below(Window sibling, int marg=0)
+ Sibling relationship
@@ -6373,6 +7365,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
SameAs(Window otherW, int edge, int marg=0)
+ 'Same edge' alignment
@@ -6381,6 +7374,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
PercentOf(Window otherW, int wh, int per)
+ The edge is a percentage of the other window's edge
@@ -6389,15 +7383,18 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
Absolute(int val)
+ Edge has absolute value
Unconstrained()
+ Dimension is unconstrained
AsIs()
+ Dimension is 'as is' (use current size settings)
GetOtherWindow() -> Window
@@ -6455,12 +7452,14 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
ResetIfWin(Window otherW) -> bool
+ Reset constraint if it mentions otherWin
SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool
+ Try to satisfy constraint
@@ -6468,6 +7467,8 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
GetEdge(int which, Window thisWin, Window other) -> int
+ Get the value of this edge or dimension, or if this
+is not determinable, -1.
@@ -6476,6 +7477,31 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None)
+ Note: constraints are now deprecated and you should use sizers instead.
+
+Objects of this class can be associated with a window to define its layout
+constraints, with respect to siblings or its parent.
+
+The class consists of the following eight constraints of class
+wx.IndividualLayoutConstraint, some or all of which should be accessed
+directly to set the appropriate constraints.
+
+ * left: represents the left hand edge of the window
+ * right: represents the right hand edge of the window
+ * top: represents the top edge of the window
+ * bottom: represents the bottom edge of the window
+ * width: represents the width of the window
+ * height: represents the height of the window
+ * centreX: represents the horizontal centre point of the window
+ * centreY: represents the vertical centre point of the window
+
+Most constraints are initially set to have the relationship wxUnconstrained,
+which means that their values should be calculated by looking at known
+constraints. The exceptions are width and height, which are set to wxAsIs to
+ensure that if the user does not specify a constraint, the existing width and
+height will be used, to be compatible with panel items which often have take a
+default size. If the constraint is wxAsIs, the dimension will not be changed.
+
__init__() -> LayoutConstraints
@@ -6757,9 +7783,25 @@ _core._wxPyFixStockObjects()
#---------------------------------------------------------------------------
+ A colour is an object representing a combination of Red, Green, and Blue (RGB)
+intensity values, and is used to determine drawing colours, window colours,
+etc. Valid RGB values are in the range 0 to 255.
+
+In wxPython there are typemaps that will automatically convert from a colour
+name, or from a "#RRGGBB" colour hex value string to a wx.Colour object when
+calling C++ methods that expect a wxColour. This means that the following are
+all equivallent:
+
+ win.SetBackgroundColour(wxColour(0,0,255))
+ win.SetBackgroundColour("BLUE")
+ win.SetBackgroundColour("#0000FF")
+
+You can retrieve the various current system colour settings with
+wx.SystemSettings.GetColour.
__init__(unsigned char red=0, unsigned char green=0, unsigned char blue=0) -> Colour
+ Constructs a colour from red, green and blue values.
@@ -6768,12 +7810,14 @@ _core._wxPyFixStockObjects()
NamedColour(String colorName) -> Colour
+ Constructs a colour object using a colour name listed in wx.TheColourDatabase.
ColourRGB(unsigned long colRGB) -> Colour
+ Constructs a colour from a packed RGB value.
@@ -6783,18 +7827,24 @@ _core._wxPyFixStockObjects()
Red() -> unsigned char
+ Returns the red intensity.
Green() -> unsigned char
+ Returns the green intensity.
Blue() -> unsigned char
+ Returns the blue intensity.
Ok() -> bool
+ Returns True if the colour object is valid (the colour has been
+initialised with RGB values).
Set(unsigned char red, unsigned char green, unsigned char blue)
+ Sets the RGB intensity values.
@@ -6803,30 +7853,45 @@ _core._wxPyFixStockObjects()
SetRGB(unsigned long colRGB)
+ Sets the RGB intensity values from a packed RGB value.
+
+ SetFromName(String colourName)
+ Sets the RGB intensity values using a colour name listed in wx.TheColourDatabase.
+
+
+
+
+
+ GetPixel() -> long
+ Returns a pixel value which is platform-dependent. On Windows, a
+COLORREF is returned. On X, an allocated pixel value is returned.
+-1 is returned if the pixel is invalid (on X, unallocated).
+
__eq__(Colour colour) -> bool
+ Compare colours for equality
__ne__(Colour colour) -> bool
+ Compare colours for inequality
-
- InitFromName(String colourName)
-
-
-
-
- Get() -> PyObject
+ Get() -> (r, g, b)
+ Returns the RGB intensity values as a tuple.
+
+
+ GetRGB() -> unsigned long
+ Return the colour as a packed RGB value
@@ -6944,9 +8009,15 @@ _core._wxPyFixStockObjects()
GetDashes() -> PyObject
- __eq__(Pen pen) -> bool
+ __eq__(Pen other) -> bool
-
+
+
+
+
+ __ne__(Pen other) -> bool
+
+
@@ -7350,40 +8421,88 @@ the transparent portions of the mask, by default BLACK is used.
+ A cursor is a small bitmap usually used for denoting where the
+mouse pointer is, with a picture that might indicate the
+interpretation of a mouse click.
+
+A single cursor object may be used in many windows (any subwindow
+type). The wxWindows convention is to set the cursor for a
+window, as in X, rather than to set it globally as in MS Windows,
+although a global wx.SetCursor function is also available for use
+on MS Windows.
- __init__(String cursorName, long flags, int hotSpotX=0, int hotSpotY=0) -> Cursor
+ __init__(String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
+ Construct a Cursor from a file. Specify the type of file using
+wx.BITAMP_TYPE* constants, and specify the hotspot if not using a
+.cur file.
+
+This cursor is not available on wxGTK, use wx.StockCursor,
+wx.CursorFromImage, or wx.CursorFromBits instead.
-
+
StockCursor(int id) -> Cursor
+ Create a cursor using one of the stock cursors. Note that not
+all cursors are available on all platforms.
+
+ Stock Cursor IDs
+
+ wx.CURSOR_ARROW A standard arrow cursor.
+ wx.CURSOR_RIGHT_ARROW A standard arrow cursor pointing to the right.
+ wx.CURSOR_BLANK Transparent cursor.
+ wx.CURSOR_BULLSEYE Bullseye cursor.
+ wx.CURSOR_CHAR Rectangular character cursor.
+ wx.CURSOR_CROSS A cross cursor.
+ wx.CURSOR_HAND A hand cursor.
+ wx.CURSOR_IBEAM An I-beam cursor (vertical line).
+ wx.CURSOR_LEFT_BUTTON Represents a mouse with the left button depressed.
+ wx.CURSOR_MAGNIFIER A magnifier icon.
+ wx.CURSOR_MIDDLE_BUTTON Represents a mouse with the middle button depressed.
+ wx.CURSOR_NO_ENTRY A no-entry sign cursor.
+ wx.CURSOR_PAINT_BRUSH A paintbrush cursor.
+ wx.CURSOR_PENCIL A pencil cursor.
+ wx.CURSOR_POINT_LEFT A cursor that points left.
+ wx.CURSOR_POINT_RIGHT A cursor that points right.
+ wx.CURSOR_QUESTION_ARROW An arrow and question mark.
+ wx.CURSOR_RIGHT_BUTTON Represents a mouse with the right button depressed.
+ wx.CURSOR_SIZENESW A sizing cursor pointing NE-SW.
+ wx.CURSOR_SIZENS A sizing cursor pointing N-S.
+ wx.CURSOR_SIZENWSE A sizing cursor pointing NW-SE.
+ wx.CURSOR_SIZEWE A sizing cursor pointing W-E.
+ wx.CURSOR_SIZING A general sizing cursor.
+ wx.CURSOR_SPRAYCAN A spraycan cursor.
+ wx.CURSOR_WAIT A wait cursor.
+ wx.CURSOR_WATCH A watch cursor.
+ wx.CURSOR_ARROWWAIT A cursor with both an arrow and an hourglass, (windows.)
+
+
CursorFromImage(Image image) -> Cursor
+ Constructs a cursor from a wxImage. The cursor is monochrome,
+colors with the RGB elements all greater than 127 will be
+foreground, colors less than this background. The mask (if any)
+will be used as transparent.
+
+In MSW the foreground will be white and the background black. The
+cursor is resized to 32x32 In GTK, the two most frequent colors
+will be used for foreground and background. The cursor will be
+displayed at the size of the image. On MacOS the cursor is
+resized to 16x16 and currently only shown as black/white (mask
+respected).
-
- CursorFromBits(PyObject bits, int width, int height, int hotSpotX=-1,
- int hotSpotY=-1, PyObject maskBits=0) -> Cursor
-
-
-
-
-
-
-
-
-
__del__()
@@ -7886,15 +9005,15 @@ the transparent portions of the mask, by default BLACK is used.
Ok() -> bool
- __eq__(Font font) -> bool
+ __eq__(Font other) -> bool
-
+
- __ne__(Font font) -> bool
+ __ne__(Font other) -> bool
-
+
@@ -9099,39 +10218,33 @@ Works for single as well as multi-line strings.
__init__(DC dc, Bitmap buffer) -> BufferedDC
-__init__(DC dc, Size area, int flags=BUFFER_DC_DEFAULT) -> BufferedDC
+__init__(DC dc, Size area) -> BufferedDC
-
- BufferedDCInternalBuffer(DC dc, Size area, int flags=BUFFER_DC_DEFAULT) -> BufferedDC
+ BufferedDCInternalBuffer(DC dc, Size area) -> BufferedDC
-
+
+ __del__()
+
UnMask()
-
+
+ __init__(Window window, Bitmap buffer=NullBitmap) -> BufferedPaintDC
-
-
-
-
- __init__(Window window, Bitmap buffer) -> BufferedPaintDC
-__init__(Window window, int flags=BUFFER_DC_DEFAULT) -> BufferedPaintDC
-
-
-
+
@@ -9838,6 +10951,7 @@ __init__(Window window, int flags=BUFFER_DC_DEFAULT) -> BufferedPaintDCCreate(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxTAB_TRAVERSAL|wxNO_BORDER,
String name=PanelNameStr) -> bool
+ Create the GUI part of the Window for 2-phase creation mode.
@@ -9876,6 +10990,7 @@ __init__(Window window, int flags=BUFFER_DC_DEFAULT) -> BufferedPaintDCCreate(Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL,
String name=PanelNameStr) -> bool
+ Create the GUI part of the Window for 2-phase creation mode.
@@ -10067,12 +11182,14 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy)
SetTitle(String title)
+ Sets the window's title. Applicable only to frames and dialogs.
GetTitle() -> String
+ Gets the window's title. Applicable only to frames and dialogs.
SetShape(Region region) -> bool
@@ -10119,6 +11236,9 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy)
GetClientAreaOrigin() -> Point
+ Get the origin of the client area of the window relative to the
+window's top left corner (the client area may be shifted because of
+the borders, scrollbars, other decorations...)
SendSizeEvent()
@@ -11138,12 +12258,20 @@ EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 )
ScrollLines(int lines) -> bool
+ If the platform and window class supports it, scrolls the window by
+the given number of lines down, if lines is positive, or up if lines
+is negative. Returns True if the window was scrolled, False if it was
+already on top/bottom and nothing was done.
ScrollPages(int pages) -> bool
+ If the platform and window class supports it, scrolls the window by
+the given number of pages down, if pages is positive, or up if pages
+is negative. Returns True if the window was scrolled, False if it was
+already on top/bottom and nothing was done.
@@ -11163,6 +12291,7 @@ EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 )
HitTestXT(int x, int y) -> int
+ Test where the given (in client coords) point lies
@@ -11170,6 +12299,7 @@ EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 )
HitTest(Point pt) -> int
+ Test where the given (in client coords) point lies
@@ -11435,39 +12565,53 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
#---------------------------------------------------------------------------
+ This class holds a variety of information related to colour dialogs.
__init__() -> ColourData
+ Constructor, sets default values.
__del__()
GetChooseFull() -> bool
+ Under Windows, determines whether the Windows colour dialog will display
+the full dialog with custom colour selection controls. Has no meaning
+under other platforms. The default value is true.
GetColour() -> Colour
+ Gets the colour (pre)selected by the dialog.
GetCustomColour(int i) -> Colour
+ Gets the i'th custom colour associated with the colour dialog. i should
+be an integer between 0 and 15. The default custom colours are all white.
SetChooseFull(int flag)
+ Under Windows, tells the Windows colour dialog to display the full dialog
+with custom colour selection controls. Under other platforms, has no effect.
+The default value is true.
SetColour(Colour colour)
+ Sets the default colour for the colour dialog. The default colour is black.
SetCustomColour(int i, Colour colour)
+ Sets the i'th custom colour for the colour dialog. i should be an integer
+between 0 and 15. The default custom colours are all white.
@@ -11475,9 +12619,12 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
+ This class represents the colour chooser dialog.
__init__(Window parent, ColourData data=None) -> ColourDialog
+ Constructor. Pass a parent window, and optionally a ColourData, which
+will be copied to the colour dialog's internal ColourData instance.
@@ -11485,18 +12632,30 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
GetColourData() -> ColourData
-
-
- ShowModal() -> int
+ Returns a reference to the ColourData used by the dialog.
+ This class represents the directory chooser dialog.
+
+ Styles
+ wxDD_NEW_DIR_BUTTON Add "Create new directory" button and allow
+ directory names to be editable. On Windows the new
+ directory button is only available with recent
+ versions of the common dialogs.
__init__(Window parent, String message=DirSelectorPromptStr,
String defaultPath=EmptyString, long style=0,
Point pos=DefaultPosition, Size size=DefaultSize,
String name=DirDialogNameStr) -> DirDialog
+ Constructor. Use ShowModal method to show the dialog.
+
+ Styles
+ wxDD_NEW_DIR_BUTTON Add "Create new directory" button and allow
+ directory names to be editable. On Windows the new
+ directory button is only available with recent
+ versions of the common dialogs.
@@ -11509,36 +12668,106 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
GetPath() -> String
+ Returns the default or user-selected path.
GetMessage() -> String
+ Returns the message that will be displayed on the dialog.
GetStyle() -> long
+ Returns the dialog style.
SetMessage(String message)
+ Sets the message that will be displayed on the dialog.
SetPath(String path)
+ Sets the default path.
-
- ShowModal() -> int
-
+ This class represents the file chooser dialog.
+
+In Windows, this is the common file selector dialog. In X, this is a file
+selector box with somewhat less functionality. The path and filename are
+distinct elements of a full file pathname. If path is "", the current
+directory will be used. If filename is "", no default filename will be
+supplied. The wildcard determines what files are displayed in the file
+selector, and file extension supplies a type extension for the required
+filename.
+
+Both the X and Windows versions implement a wildcard filter. Typing a filename
+containing wildcards (*, ?) in the filename text item, and clicking on Ok,
+will result in only those files matching the pattern being displayed. The
+wildcard may be a specification for multiple types of file with a description
+for each, such as:
+
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
+
+ Styles
+ wx.OPEN This is an open dialog.
+
+ wx.SAVE This is a save dialog.
+
+ wx.HIDE_READONLY For open dialog only: hide the checkbox allowing to
+ open the file in read-only mode.
+
+ wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation if a
+ file will be overwritten.
+
+ wx.MULTIPLE For open dialog only: allows selecting multiple files.
+
+ wx.CHANGE_DIR Change the current working directory to the directory
+ where the file(s) chosen by the user are.
+
__init__(Window parent, String message=FileSelectorPromptStr,
String defaultDir=EmptyString, String defaultFile=EmptyString,
String wildcard=FileSelectorDefaultWildcardStr,
long style=0, Point pos=DefaultPosition) -> FileDialog
+ Constructor. Use ShowModal method to show the dialog.
+
+In Windows, this is the common file selector dialog. In X, this is a file
+selector box with somewhat less functionality. The path and filename are
+distinct elements of a full file pathname. If path is "", the current
+directory will be used. If filename is "", no default filename will be
+supplied. The wildcard determines what files are displayed in the file
+selector, and file extension supplies a type extension for the required
+filename.
+
+Both the X and Windows versions implement a wildcard filter. Typing a filename
+containing wildcards (*, ?) in the filename text item, and clicking on Ok,
+will result in only those files matching the pattern being displayed. The
+wildcard may be a specification for multiple types of file with a description
+for each, such as:
+
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
+
+ Styles
+ wx.OPEN This is an open dialog.
+
+ wx.SAVE This is a save dialog.
+
+ wx.HIDE_READONLY For open dialog only: hide the checkbox allowing to
+ open the file in read-only mode.
+
+ wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation if a
+ file will be overwritten.
+
+ wx.MULTIPLE For open dialog only: allows selecting multiple files.
+
+ wx.CHANGE_DIR Change the current working directory to the directory
+ where the file(s) chosen by the user are.
+
@@ -11551,80 +12780,107 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
SetMessage(String message)
+ Sets the message that will be displayed on the dialog.
SetPath(String path)
+ Sets the path (the combined directory and filename that will
+be returned when the dialog is dismissed).
SetDirectory(String dir)
+ Sets the default directory.
SetFilename(String name)
+ Sets the default filename.
SetWildcard(String wildCard)
+ Sets the wildcard, which can contain multiple file types, for example:
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
SetStyle(long style)
+ Sets the dialog style.
SetFilterIndex(int filterIndex)
+ Sets the default filter index, starting from zero.
GetMessage() -> String
+ Returns the message that will be displayed on the dialog.
GetPath() -> String
+ Returns the full path (directory and filename) of the selected file.
GetDirectory() -> String
+ Returns the default directory.
GetFilename() -> String
+ Returns the default filename.
GetWildcard() -> String
+ Returns the file dialog wildcard.
GetStyle() -> long
+ Returns the dialog style.
GetFilterIndex() -> int
+ Returns the index into the list of filters supplied, optionally, in
+the wildcard parameter. Before the dialog is shown, this is the index
+which will be used when the dialog is first displayed. After the dialog
+is shown, this is the index selected by the user.
GetFilenames() -> PyObject
+ Returns a list of filenames chosen in the dialog. This function should
+only be used with the dialogs which have wx.MULTIPLE style, use
+GetFilename for the others.
GetPaths() -> PyObject
+ Fills the array paths with the full paths of the files chosen. This
+function should only be used with the dialogs which have wx.MULTIPLE style,
+use GetPath for the others.
+ A simple dialog with a multi selection listbox.
- __init__(Window parent, String message, String caption, int choices=0,
- String choices_array, long style=CHOICEDLG_STYLE,
+ __init__(Window parent, String message, String caption,
+ List choices=[], long style=CHOICEDLG_STYLE,
Point pos=DefaultPosition) -> MultiChoiceDialog
+ Constructor. Use ShowModal method to show the dialog.
@@ -11636,21 +12892,25 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
- SetSelections(wxArrayInt selections)
+ SetSelections(List selections)
+ Specify the items in the list that shoudl be selected, using a list of integers.
- GetSelections() -> PyObject
+ GetSelections() -> [selections]
+ Returns a list of integers representing the items that are selected.
+ A simple dialog with a single selection listbox.
- __init__(Window parent, String message, String caption, int choices,
- String choices_array, long style=CHOICEDLG_STYLE,
+ __init__(Window parent, String message, String caption,
+ List choices=[], long style=CHOICEDLG_STYLE,
Point pos=DefaultPosition) -> SingleChoiceDialog
+ Constructor. Use ShowModal method to show the dialog.
@@ -11663,26 +12923,28 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
GetSelection() -> int
+ Get the index of teh currently selected item.
GetStringSelection() -> String
+ Returns the string value of the currently selected item
SetSelection(int sel)
+ Set the current selected item to sel
-
- ShowModal() -> int
-
+ A dialog with text control, [ok] and [cancel] buttons
__init__(Window parent, String message, String caption=GetTextFromUserPromptStr,
String defaultValue=EmptyString,
long style=wxOK|wxCANCEL|wxCENTRE, Point pos=DefaultPosition) -> TextEntryDialog
+ Constructor. Use ShowModal method to show the dialog.
@@ -11694,75 +12956,97 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
GetValue() -> String
+ Returns the text that the user has entered if the user has pressed OK,
+or the original value if the user has pressed Cancel.
SetValue(String value)
+ Sets the default text value.
-
- ShowModal() -> int
-
+ This class holds a variety of information related to font dialogs.
__init__() -> FontData
+ This class holds a variety of information related to font dialogs.
__del__()
EnableEffects(bool enable)
+ Enables or disables 'effects' under MS Windows only. This refers
+to the controls for manipulating colour, strikeout and underline
+properties. The default value is true.
GetAllowSymbols() -> bool
+ Under MS Windows, returns a flag determining whether symbol fonts can be
+selected. Has no effect on other platforms. The default value is true.
GetColour() -> Colour
+ Gets the colour associated with the font dialog. The default value is black.
GetChosenFont() -> Font
+ Gets the font chosen by the user.
GetEnableEffects() -> bool
+ Determines whether 'effects' are enabled under Windows.
GetInitialFont() -> Font
+ Gets the font that will be initially used by the font dialog. This should have
+previously been set by the application.
GetShowHelp() -> bool
+ Returns true if the Help button will be shown (Windows only). The default
+value is false.
SetAllowSymbols(bool allowSymbols)
+ Under MS Windows, determines whether symbol fonts can be selected. Has no
+effect on other platforms. The default value is true.
SetChosenFont(Font font)
+ Sets the font that will be returned to the user (for internal use only).
SetColour(Colour colour)
+ Sets the colour that will be used for the font foreground colour. The default
+colour is black.
SetInitialFont(Font font)
+ Sets the font that will be initially used by the font dialog.
SetRange(int min, int max)
+ Sets the valid range for the font point size (Windows only). The default is
+0, 0 (unrestricted range).
@@ -11770,15 +13054,20 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
SetShowHelp(bool showHelp)
+ Determines whether the Help button will be displayed in the font dialog
+(Windows only). The default value is false.
+ This class represents the font chooser dialog.
__init__(Window parent, FontData data) -> FontDialog
+ Constructor. Pass a parent window and the FontData object to be
+used to initialize the dialog controls.
@@ -11786,17 +13075,67 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
GetFontData() -> FontData
-
-
- ShowModal() -> int
+ Returns a reference to the internal FontData used by the FontDialog.
+ This class provides a dialog that shows a single or multi-line message, with
+a choice of OK, Yes, No and Cancel buttons.
+
+ Styles
+ wx.OK: Show an OK button.
+
+ wx.CANCEL: Show a Cancel button.
+
+ wx.YES_NO: Show Yes and No buttons.
+
+ wx.YES_DEFAULT: Used with wxYES_NO, makes Yes button the default - which is the default behaviour.
+
+ wx.NO_DEFAULT: Used with wxYES_NO, makes No button the default.
+
+ wx.ICON_EXCLAMATION: Shows an exclamation mark icon.
+
+ wx.ICON_HAND: Shows an error icon.
+
+ wx.ICON_ERROR: Shows an error icon - the same as wxICON_HAND.
+
+ wx.ICON_QUESTION: Shows a question mark icon.
+
+ wx.ICON_INFORMATION: Shows an information (i) icon.
+
+ wx.STAY_ON_TOP: The message box stays on top of all other window, even those of the other applications (Windows only).
+
__init__(Window parent, String message, String caption=MessageBoxCaptionStr,
long style=wxOK|wxCANCEL|wxCENTRE,
Point pos=DefaultPosition) -> MessageDialog
+ This class provides a dialog that shows a single or multi-line message, with
+a choice of OK, Yes, No and Cancel buttons.
+
+ Styles
+ wx.OK: Show an OK button.
+
+ wx.CANCEL: Show a Cancel button.
+
+ wx.YES_NO: Show Yes and No buttons.
+
+ wx.YES_DEFAULT: Used with wxYES_NO, makes Yes button the default - which is the default behaviour.
+
+ wx.NO_DEFAULT: Used with wxYES_NO, makes No button the default.
+
+ wx.ICON_EXCLAMATION: Shows an exclamation mark icon.
+
+ wx.ICON_HAND: Shows an error icon.
+
+ wx.ICON_ERROR: Shows an error icon - the same as wxICON_HAND.
+
+ wx.ICON_QUESTION: Shows a question mark icon.
+
+ wx.ICON_INFORMATION: Shows an information (i) icon.
+
+ wx.STAY_ON_TOP: The message box stays on top of all other window, even those of the other applications (Windows only).
+
@@ -11805,15 +13144,68 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
-
- ShowModal() -> int
-
+ A dialog that shows a short message and a progress bar. Optionally, it can
+display an ABORT button.
+
+ Styles
+
+ wx.PD_APP_MODAL: Make the progress dialog modal. If this flag is
+ not given, it is only "locally" modal - that is
+ the input to the parent window is disabled,
+ but not to the other ones.
+
+ wx.PD_AUTO_HIDE: Causes the progress dialog to disappear from screen
+ as soon as the maximum value of the progress
+ meter has been reached.
+
+ wx.PD_CAN_ABORT: This flag tells the dialog that it should have
+ a "Cancel" button which the user may press. If
+ this happens, the next call to Update() will
+ return false.
+
+ wx.PD_ELAPSED_TIME: This flag tells the dialog that it should show
+ elapsed time (since creating the dialog).
+
+ wx.PD_ESTIMATED_TIME: This flag tells the dialog that it should show
+ estimated time.
+
+ wx.PD_REMAINING_TIME: This flag tells the dialog that it should show
+ remaining time.
+
__init__(String title, String message, int maximum=100, Window parent=None,
int style=wxPD_AUTO_HIDE|wxPD_APP_MODAL) -> ProgressDialog
+ Constructor. Creates the dialog, displays it and disables user input for other
+windows, or, if wxPD_APP_MODAL flag is not given, for its parent window only.
+
+ Styles
+
+ wx.PD_APP_MODAL: Make the progress dialog modal. If this flag is
+ not given, it is only "locally" modal - that is
+ the input to the parent window is disabled,
+ but not to the other ones.
+
+ wx.PD_AUTO_HIDE: Causes the progress dialog to disappear from screen
+ as soon as the maximum value of the progress
+ meter has been reached.
+
+ wx.PD_CAN_ABORT: This flag tells the dialog that it should have
+ a "Cancel" button which the user may press. If
+ this happens, the next call to Update() will
+ return false.
+
+ wx.PD_ELAPSED_TIME: This flag tells the dialog that it should show
+ elapsed time (since creating the dialog).
+
+ wx.PD_ESTIMATED_TIME: This flag tells the dialog that it should show
+ estimated time.
+
+ wx.PD_REMAINING_TIME: This flag tells the dialog that it should show
+ remaining time.
+
@@ -11824,6 +13216,13 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
Update(int value, String newmsg=EmptyString) -> bool
+ Updates the dialog, setting the progress bar to the new value and, if given
+changes the message above it. Returns true unless the Cancel button has been
+pressed.
+
+If false is returned, the application can either immediately destroy the
+dialog or ask the user for the confirmation and if the abort is not confirmed
+the dialog may be resumed with Resume function.
@@ -11831,6 +13230,7 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
Resume()
+ Can be used to continue with the dialog, after the user had chosen to abort.
@@ -11848,9 +13248,11 @@ EVT_COMMAND_FIND_REPLACE_ALL = EVT_FIND_REPLACE_ALL
EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE
+ Events for the FindReplaceDialog
__init__(wxEventType commandType=wxEVT_NULL, int id=0) -> FindDialogEvent
+ Events for the FindReplaceDialog
@@ -11858,15 +13260,21 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE
GetFlags() -> int
+ Get the currently selected flags: this is the combination of
+wx.FR_DOWN, wx.FR_WHOLEWORD and wx.FR_MATCHCASE flags.
GetFindString() -> String
+ Return the string to find (never empty).
GetReplaceString() -> String
+ Return the string to replace the search string with (only
+for replace and replace all events).
GetDialog() -> FindReplaceDialog
+ Return the pointer to the dialog which generated this event.
SetFlags(int flags)
@@ -11888,9 +13296,27 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE
+ FindReplaceData holds the data for FindReplaceDialog. It is used to initialize
+the dialog with the default values and will keep the last values from the
+dialog when it is closed. It is also updated each time a wxFindDialogEvent is
+generated so instead of using the wxFindDialogEvent methods you can also
+directly query this object.
+
+Note that all SetXXX() methods may only be called before showing the dialog
+and calling them has no effect later.
+
+ Flags
+ wxFR_DOWN: downward search/replace selected (otherwise, upwards)
+
+ wxFR_WHOLEWORD: whole word search/replace selected
+
+ wxFR_MATCHCASE: case sensitive search/replace selected (otherwise,
+ case insensitive)
+
__init__(int flags=0) -> FindReplaceData
+ Constuctor initializes the flags to default value (0).
@@ -11900,37 +13326,72 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE
GetFindString() -> String
+ Get the string to find.
GetReplaceString() -> String
+ Get the replacement string.
GetFlags() -> int
+ Get the combination of flag values.
SetFlags(int flags)
+ Set the flags to use to initialize the controls of the dialog.
SetFindString(String str)
+ Set the string to find (used as initial value by the dialog).
SetReplaceString(String str)
+ Set the replacement string (used as initial value by the dialog).
+ FindReplaceDialog is a standard modeless dialog which is used to allow the
+user to search for some text (and possibly replace it with something
+else). The actual searching is supposed to be done in the owner window which
+is the parent of this dialog. Note that it means that unlike for the other
+standard dialogs this one must have a parent window. Also note that there is
+no way to use this dialog in a modal way; it is always, by design and
+implementation, modeless.
+
+ Styles
+ wx.FR_REPLACEDIALOG: replace dialog (otherwise find dialog)
+
+ wx.FR_NOUPDOWN: don't allow changing the search direction
+
+ wx.FR_NOMATCHCASE: don't allow case sensitive searching
+
+ wx.FR_NOWHOLEWORD: don't allow whole word searching
+
__init__(Window parent, FindReplaceData data, String title,
int style=0) -> FindReplaceDialog
+ Create a FindReplaceDialog. The parent and data parameters must be
+non-None. Use Show to display the dialog.
+
+ Styles
+ wx.FR_REPLACEDIALOG: replace dialog (otherwise find dialog)
+
+ wx.FR_NOUPDOWN: don't allow changing the search direction
+
+ wx.FR_NOMATCHCASE: don't allow case sensitive searching
+
+ wx.FR_NOWHOLEWORD: don't allow whole word searching
+
@@ -11940,10 +13401,22 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE
PreFindReplaceDialog() -> FindReplaceDialog
+ Precreate a FindReplaceDialog for 2-phase creation
+
+ Styles
+ wx.FR_REPLACEDIALOG: replace dialog (otherwise find dialog)
+
+ wx.FR_NOUPDOWN: don't allow changing the search direction
+
+ wx.FR_NOMATCHCASE: don't allow case sensitive searching
+
+ wx.FR_NOWHOLEWORD: don't allow whole word searching
+
Create(Window parent, FindReplaceData data, String title,
int style=0) -> bool
+ Create the dialog, for 2-phase create.
@@ -11953,9 +13426,11 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE
GetData() -> FindReplaceData
+ Get the FindReplaceData object used by this dialog.
SetData(FindReplaceData data)
+ Set the FindReplaceData object used by this dialog.
@@ -13553,11 +15028,44 @@ unselected state, and for all other states if no other bitmaps are provided.
+ A checkbox is a labelled box which by default is either on (checkmark is
+visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag
+is set) it can have a third state, called the mixed or undetermined
+state. Often this is used as a "Does Not Apply" state.
+
+ Styles
+ wx.CHK_2STATE: Create a 2-state checkbox. This is the default.
+ wx.CHK_3STATE: Create a 3-state checkbox.
+ wx.CHK_ALLOW_3RD_STATE_FOR_USER: By default a user can't set a 3-state
+ checkbox to the third state. It can only
+ be done from code. Using this flags
+ allows the user to set the checkbox to
+ the third state by clicking.
+ wx.ALIGN_RIGHT: Makes the text appear on the left of the checkbox.
+
+ Events
+ EVT_CHECKBOX: Sent when checkbox is clicked.
+
__init__(Window parent, int id, String label, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox
+ Creates and shows a CheckBox control
+
+ Styles
+ wx.CHK_2STATE: Create a 2-state checkbox. This is the default.
+ wx.CHK_3STATE: Create a 3-state checkbox.
+ wx.CHK_ALLOW_3RD_STATE_FOR_USER: By default a user can't set a 3-state
+ checkbox to the third state. It can only
+ be done from code. Using this flags
+ allows the user to set the checkbox to
+ the third state by clicking.
+ wx.ALIGN_RIGHT: Makes the text appear on the left of the checkbox.
+
+ Events
+ EVT_CHECKBOX: Sent when checkbox is clicked.
+
@@ -13571,11 +15079,27 @@ unselected state, and for all other states if no other bitmaps are provided.
PreCheckBox() -> CheckBox
+ Precreate a CheckBox for 2-phase creation.
+
+ Styles
+ wx.CHK_2STATE: Create a 2-state checkbox. This is the default.
+ wx.CHK_3STATE: Create a 3-state checkbox.
+ wx.CHK_ALLOW_3RD_STATE_FOR_USER: By default a user can't set a 3-state
+ checkbox to the third state. It can only
+ be done from code. Using this flags
+ allows the user to set the checkbox to
+ the third state by clicking.
+ wx.ALIGN_RIGHT: Makes the text appear on the left of the checkbox.
+
+ Events
+ EVT_CHECKBOX: Sent when checkbox is clicked.
+
Create(Window parent, int id, String label, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool
+ Actually create the GUI CheckBox for 2-phase creation.
@@ -13589,42 +15113,67 @@ unselected state, and for all other states if no other bitmaps are provided.
GetValue() -> bool
+ Gets the state of a 2-state CheckBox. Returns True if it is checked,
+False otherwise.
IsChecked() -> bool
+ Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.
SetValue(bool state)
+ Set the state of a 2-state CheckBox. Pass True for checked,
+False for unchecked.
Get3StateValue() -> int
+ Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when
+it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state.
+Raises an exceptiion when the function is used with a 2-state CheckBox.
Set3StateValue(int state)
+ Sets the CheckBox to the given state. The state parameter can be
+one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED
+(Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an
+exception when the CheckBox is a 2-state checkbox and setting the state
+to wx.CHK_UNDETERMINED.
Is3State() -> bool
+ Returns whether or not the CheckBox is a 3-state CheckBox.
Is3rdStateAllowedForUser() -> bool
+ Returns whether or not the user can set the CheckBox to the third state.
#---------------------------------------------------------------------------
+ A Choice control is used to select one of a list of strings. Unlike a ListBox,
+only the selection is visible until the user pulls down the menu of choices.
+
+ Events
+ EVT_CHOICE: Sent when an item in the list is selected.
+
- __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
+ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> Choice
+ Create and show a Choice control
+
+ Events
+ EVT_CHOICE: Sent when an item in the list is selected.
+
@@ -13638,12 +15187,17 @@ unselected state, and for all other states if no other bitmaps are provided.
PreChoice() -> Choice
+ Precreate a Choice control for 2-phase creation.
+
+ Events
+ EVT_CHOICE: Sent when an item in the list is selected.
+
- Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
+ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool
+ Actually create the GUI Choice control for 2-phase creation
@@ -13655,32 +15209,26 @@ unselected state, and for all other states if no other bitmaps are provided.
-
- GetColumns() -> int
-
-
- SetColumns(int n=1)
-
-
-
-
SetSelection(int n)
+ Select the n'th item (zero based) in the list.
SetStringSelection(String string)
+ Select the item with the specifed string
- SetString(int n, String s)
+ SetString(int n, String string)
+ Set the label for the n'th item (zero based) in the list.
-
+
@@ -13688,14 +15236,55 @@ unselected state, and for all other states if no other bitmaps are provided.
+ A combobox is like a combination of an edit control and a listbox. It can be
+displayed as static list with editable or read-only text field; or a drop-down
+list with text field.
+
+ Styles
+ wx.CB_SIMPLE: Creates a combobox with a permanently displayed list.
+ Windows only.
+
+ wx.CB_DROPDOWN: Creates a combobox with a drop-down list.
+
+ wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as
+ the combobox choices can be selected, it is impossible
+ to select (even from a program) a string which is not in
+ the choices list.
+
+ wx.CB_SORT: Sorts the entries in the list alphabetically.
+
+ Events
+
+ EVT_COMBOBOX: Sent when an item on the list is selected.
+ EVT_TEXT: Sent when the combobox text changes.
+
- __init__(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition,
- Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
- String name=ComboBoxNameStr) -> ComboBox
+ __init__(Window parent, int id, String value=EmptyString,
+ Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
+ String name=ComboBoxNameStr) -> ComboBox
+ Constructor, creates and shows a ComboBox control.
+
+ Styles
+ wx.CB_SIMPLE: Creates a combobox with a permanently displayed list.
+ Windows only.
+
+ wx.CB_DROPDOWN: Creates a combobox with a drop-down list.
+
+ wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as
+ the combobox choices can be selected, it is impossible
+ to select (even from a program) a string which is not in
+ the choices list.
+
+ wx.CB_SORT: Sorts the entries in the list alphabetically.
+
+ Events
+
+ EVT_COMBOBOX: Sent when an item on the list is selected.
+ EVT_TEXT: Sent when the combobox text changes.
+
@@ -13710,13 +15299,33 @@ unselected state, and for all other states if no other bitmaps are provided.
PreComboBox() -> ComboBox
+ Precreate a ComboBox control for 2-phase creation.
+
+ Styles
+ wx.CB_SIMPLE: Creates a combobox with a permanently displayed list.
+ Windows only.
+
+ wx.CB_DROPDOWN: Creates a combobox with a drop-down list.
+
+ wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as
+ the combobox choices can be selected, it is impossible
+ to select (even from a program) a string which is not in
+ the choices list.
+
+ wx.CB_SORT: Sorts the entries in the list alphabetically.
+
+ Events
+
+ EVT_COMBOBOX: Sent when an item on the list is selected.
+ EVT_TEXT: Sent when the combobox text changes.
+
- Create(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition,
- Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
- String name=ComboBoxNameStr) -> bool
+ Create(Window parent, int id, String value=EmptyString,
+ Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
+ String name=ChoiceNameStr) -> bool
+ Actually create the GUI wxComboBox control for 2-phase creation
@@ -13726,11 +15335,12 @@ unselected state, and for all other states if no other bitmaps are provided.
-
+
GetValue() -> String
+ Returns the current value in the combobox text field.
SetValue(String value)
@@ -13740,27 +15350,35 @@ unselected state, and for all other states if no other bitmaps are provided.
Copy()
+ Copies the selected text to the clipboard.
Cut()
+ Copies the selected text to the clipboard and removes the selection.
Paste()
+ Pastes text from the clipboard to the text field.
SetInsertionPoint(long pos)
+ Sets the insertion point in the combobox text field.
GetInsertionPoint() -> long
+ Returns the insertion point for the combobox's text field.
GetLastPosition() -> long
+ Returns the last position in the combobox text field.
Replace(long from, long to, String value)
+ Replaces the text between two positions with the given text, in the
+combobox text field.
@@ -13769,6 +15387,7 @@ unselected state, and for all other states if no other bitmaps are provided.
SetSelection(int n)
+ Selects the text between the two positions, in the combobox text field.
@@ -13788,9 +15407,11 @@ unselected state, and for all other states if no other bitmaps are provided.
SetInsertionPointEnd()
+ Sets the insertion point at the end of the combobox text field.
Remove(long from, long to)
+ Removes the text between the two positions in the combobox text field.
@@ -14086,6 +15707,8 @@ unselected state, and for all other states if no other bitmaps are provided.
Insert(String item, int pos, PyObject clientData=None)
+ Insert an item into the control before the item at the pos index,
+optionally associating some data object with the item.
@@ -14120,6 +15743,7 @@ unselected state, and for all other states if no other bitmaps are provided.
Select(int n)
+ Sets the item at index 'n' to be the selected item.
@@ -14253,12 +15877,14 @@ unselected state, and for all other states if no other bitmaps are provided.
HitTest(Point pt) -> int
+ Test where the given (in client coords) point lies
HitTestXY(int x, int y) -> int
+ Test where the given (in client coords) point lies
@@ -14734,6 +16360,7 @@ EVT_TEXT_MAXLEN = wx.PyEventBinder( wxEVT_COMMAND_TEXT_MAXLEN, 1)
Create(Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=SB_HORIZONTAL,
Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> bool
+ Do the 2nd phase and create the GUI control.
@@ -14768,6 +16395,19 @@ EVT_TEXT_MAXLEN = wx.PyEventBinder( wxEVT_COMMAND_TEXT_MAXLEN, 1)
SetScrollbar(int position, int thumbSize, int range, int pageSize,
bool refresh=True)
+ Sets the scrollbar properties of a built-in scrollbar.
+
+ orientation: Determines the scrollbar whose page size is to be
+ set. May be wx.HORIZONTAL or wx.VERTICAL.
+
+ position: The position of the scrollbar in scroll units.
+
+ thumbSize: The size of the thumb, or visible portion of the
+ scrollbar, in scroll units.
+
+ range: The maximum position of the scrollbar.
+
+ refresh: True to redraw the scrollbar, false otherwise.
@@ -15307,6 +16947,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1)
SetLabel(String label)
+ Sets the item's text.
@@ -16405,6 +18046,7 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED
Create(Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=LC_ICON,
Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool
+ Do the 2nd phase and create the GUI control.
@@ -16424,12 +18066,29 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED
SetForegroundColour(Colour col) -> bool
+ Sets the foreground colour of the window. Returns True is the colour
+was changed. The interpretation of foreground colour is dependent on
+the window class; it may be the text colour or other colour, or it may
+not be used at all.
SetBackgroundColour(Colour col) -> bool
+ Sets the background colour of the window. Returns True if the colour
+was changed. The background colour is usually painted by the default
+EVT_ERASE_BACKGROUND event handler function under Windows and
+automatically under GTK.
+
+Note that setting the background colour does not cause an immediate
+refresh, so you may wish to call ClearBackground or Refresh after
+calling this function.
+
+Use this function with care under GTK+ as the new appearance of the
+window might not look equally well when used with themes, i.e GTK+'s
+ability to change its look as the user wishes with run-time loadable
+modules.
@@ -16597,6 +18256,9 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED
SetWindowStyleFlag(long style)
+ Sets the style of the window. Please note that some styles cannot be
+changed after the window creation and that Refresh() might be called
+after changing the others for the change to take place immediately.
@@ -16836,6 +18498,7 @@ giving details in the second return value (see wxLIST_HITTEST_... flags.)Create(Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=LC_REPORT,
Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool
+ Do the 2nd phase and create the GUI control.
@@ -17077,6 +18740,7 @@ EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP
Size size=DefaultSize, long style=TR_DEFAULT_STYLE,
Validator validator=DefaultValidator,
String name=TreeCtrlNameStr) -> bool
+ Do the 2nd phase and create the GUI control.
@@ -17807,6 +19471,29 @@ EVT_DETAILED_HELP = wx.PyEventBinder( wxEVT_DETAILED_HELP, 1)
EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
+ A help event is sent when the user has requested
+context-sensitive help. This can either be caused by the
+application requesting context-sensitive help mode via
+wx.ContextHelp, or (on MS Windows) by the system generating a
+WM_HELP message when the user pressed F1 or clicked on the query
+button in a dialog caption.
+
+A help event is sent to the window that the user clicked on, and
+is propagated up the window hierarchy until the event is
+processed or there are no more event handlers. The application
+should call event.GetId to check the identity of the clicked-on
+window, and then either show some suitable help or call
+event.Skip if the identifier is unrecognised. Calling Skip is
+important because it allows wxWindows to generate further events
+for ancestors of the clicked-on window. Otherwise it would be
+impossible to show help for container windows, since processing
+would stop after the first window found.
+
+ Events
+ EVT_HELP Sent when the user has requested context-
+ sensitive help.
+ EVT_HELP_RANGE Allows to catch EVT_HELP for a range of IDs
+
__init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> HelpEvent
@@ -17818,36 +19505,68 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
GetPosition() -> Point
+ Returns the left-click position of the mouse, in screen
+coordinates. This allows the application to position the help
+appropriately.
SetPosition(Point pos)
+ Sets the left-click position of the mouse, in screen coordinates.
GetLink() -> String
+ Get an optional link to further help
SetLink(String link)
+ Set an optional link to further help
GetTarget() -> String
+ Get an optional target to display help in. E.g. a window specification
SetTarget(String target)
+ Set an optional target to display help in. E.g. a window specification
+ This class changes the cursor to a query and puts the application
+into a 'context-sensitive help mode'. When the user left-clicks
+on a window within the specified window, a EVT_HELP event is sent
+to that control, and the application may respond to it by popping
+up some help.
+
+There are a couple of ways to invoke this behaviour implicitly:
+
+ * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a
+ dialog (Windows only). This will put a question mark in the
+ titlebar, and Windows will put the application into
+ context-sensitive help mode automatically, with further
+ programming.
+
+ * Create a wx.ContextHelpButton, whose predefined behaviour
+ is to create a context help object. Normally you will write
+ your application so that this button is only added to a
+ dialog for non-Windows platforms (use
+ wx.DIALOG_EX_CONTEXTHELP on Windows).
+
__init__(Window window=None, bool doNow=True) -> ContextHelp
+ Constructs a context help object, calling BeginContextHelp if
+doNow is true (the default).
+
+If window is None, the top window is used.
@@ -17858,19 +19577,40 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
BeginContextHelp(Window window=None) -> bool
+ Puts the application into context-sensitive help mode. window is
+the window which will be used to catch events; if NULL, the top
+window will be used.
+
+Returns true if the application was successfully put into
+context-sensitive help mode. This function only returns when the
+event loop has finished.
EndContextHelp() -> bool
+ Ends context-sensitive help mode. Not normally called by the
+application.
+ Instances of this class may be used to add a question mark button
+that when pressed, puts the application into context-help
+mode. It does this by creating a wx.ContextHelp object which
+itself generates a EVT_HELP event when the user clicks on a
+window.
+
+On Windows, you may add a question-mark icon to a dialog by use
+of the wx.DIALOG_EX_CONTEXTHELP extra style, but on other
+platforms you will have to add a button explicitly, usually next
+to OK, Cancel or similar buttons.
+
__init__(Window parent, int id=ID_CONTEXT_HELP, Point pos=DefaultPosition,
Size size=DefaultSize, long style=BU_AUTODRAW) -> ContextHelpButton
+ Constructor, creating and showing a context help button.
@@ -17881,29 +19621,49 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
+ wx.HelpProvider is an abstract class used by a program
+implementing context-sensitive help to show the help text for the
+given window.
+
+The current help provider must be explicitly set by the
+application using wx.HelpProvider.Set().
Set(HelpProvider helpProvider) -> HelpProvider
+ Sset the current, application-wide help provider. Returns the
+previous one. Unlike some other classes, the help provider is
+not created on demand. This must be explicitly done by the
+application.
Get() -> HelpProvider
+ Return the current application-wide help provider.
GetHelp(Window window) -> String
+ Gets the help string for this window. Its interpretation is
+dependent on the help provider except that empty string always
+means that no help is associated with the window.
ShowHelp(Window window) -> bool
+ Shows help for the given window. Uses GetHelp internally if
+applicable.
+
+Returns true if it was done, or false if no help was available
+for this window.
AddHelp(Window window, String text)
+ Associates the text with the given window.
@@ -17911,19 +19671,38 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
AddHelpById(int id, String text)
+ This version associates the given text with all windows with this
+id. May be used to set the same help string for all Cancel
+buttons in the application, for example.
+
+ RemoveHelp(Window window)
+ Removes the association between the window pointer and the help
+text. This is called by the wx.Window destructor. Without this,
+the table of help strings will fill up and when window pointers
+are reused, the wrong help string will be found.
+
+
+
+
Destroy()
+ wx.SimpleHelpProvider is an implementation of wx.HelpProvider
+which supports only plain text help strings, and shows the string
+associated with the control (if any) in a tooltip.
__init__() -> SimpleHelpProvider
+ wx.SimpleHelpProvider is an implementation of wx.HelpProvider
+which supports only plain text help strings, and shows the string
+associated with the control (if any) in a tooltip.
@@ -19916,92 +21695,146 @@ wx.NullIcon if no provider provides it.
#---------------------------------------------------------------------------
+ wx.ConfigBase class defines the basic interface of all config
+classes. It can not be used by itself (it is an abstract base
+class) and you will always use one of its derivations: wx.Config
+or wx.FileConfig.
+
+wx.ConfigBase organizes the items in a tree-like structure
+(modeled after the Unix/Dos filesystem). There are groups
+(directories) and keys (files). There is always one current
+group given by the current path. As in the file system case, to
+specify a key in the config class you must use a path to it.
+Config classes also support the notion of the current group,
+which makes it possible to use relative paths.
+
+Keys are pairs "key_name = value" where value may be of string, integer
+floating point or boolean, you can not store binary data without first
+encoding it as a string. For performance reasons items should be kept small,
+no more than a couple kilobytes.
+
__del__()
- Set(ConfigBase pConfig) -> ConfigBase
+ Set(ConfigBase config) -> ConfigBase
+ Sets the global config object (the one returned by Get) and
+returns a reference to the previous global config object.
-
+
Get(bool createOnDemand=True) -> ConfigBase
+ Returns the current global config object, creating one if neccessary.
Create() -> ConfigBase
+ Create and return a new global config object. This function will
+create the "best" implementation of wx.Config available for the
+current platform.
DontCreateOnDemand()
+ Should Get() try to create a new log object if there isn't a current one?
- SetPath(String strPath)
+ SetPath(String path)
+ Set current path: if the first character is '/', it's the absolute path,
+otherwise it's a relative path. '..' is supported. If the strPath
+doesn't exist it is created.
-
+
GetPath() -> String
+ Retrieve the current path (always as absolute path)
- GetFirstGroup() -> PyObject
+ GetFirstGroup() -> (more, value, index)
+ Allows enumerating the subgroups in a config object. Returns
+a tuple containing a flag indicating there are more items, the
+name of the current item, and an index to pass to GetNextGroup to
+fetch the next item.
- GetNextGroup(long index) -> PyObject
+ GetNextGroup(long index) -> (more, value, index)
+ Allows enumerating the subgroups in a config object. Returns
+a tuple containing a flag indicating there are more items, the
+name of the current item, and an index to pass to GetNextGroup to
+fetch the next item.
- GetFirstEntry() -> PyObject
+ GetFirstEntry() -> (more, value, index)
+ Allows enumerating the entries in the current group in a config
+object. Returns a tuple containing a flag indicating there are
+more items, the name of the current item, and an index to pass to
+GetNextGroup to fetch the next item.
- GetNextEntry(long index) -> PyObject
+ GetNextEntry(long index) -> (more, value, index)
+ Allows enumerating the entries in the current group in a config
+object. Returns a tuple containing a flag indicating there are
+more items, the name of the current item, and an index to pass to
+GetNextGroup to fetch the next item.
- GetNumberOfEntries(bool bRecursive=False) -> size_t
+ GetNumberOfEntries(bool recursive=False) -> size_t
+ Get the number of entries in the current group, with or
+without its subgroups.
-
+
- GetNumberOfGroups(bool bRecursive=False) -> size_t
+ GetNumberOfGroups(bool recursive=False) -> size_t
+ Get the number of subgroups in the current group, with or
+without its subgroups.
-
+
- HasGroup(String strName) -> bool
+ HasGroup(String name) -> bool
+ Returns True if the group by this name exists
-
+
- HasEntry(String strName) -> bool
+ HasEntry(String name) -> bool
+ Returns True if the entry by this name exists
-
+
- Exists(String strName) -> bool
+ Exists(String name) -> bool
+ Returns True if either a group or an entry with a given name exists
-
+
GetEntryType(String name) -> int
+ Get the type of the entry. Returns one of the wx.Config.Type_XXX values.
Read(String key, String defaultVal=EmptyString) -> String
+ Returns the value of key if it exists, defaultVal otherwise.
@@ -20009,6 +21842,7 @@ wx.NullIcon if no provider provides it.
ReadInt(String key, long defaultVal=0) -> long
+ Returns the value of key if it exists, defaultVal otherwise.
@@ -20016,6 +21850,7 @@ wx.NullIcon if no provider provides it.
ReadFloat(String key, double defaultVal=0.0) -> double
+ Returns the value of key if it exists, defaultVal otherwise.
@@ -20023,6 +21858,7 @@ wx.NullIcon if no provider provides it.
ReadBool(String key, bool defaultVal=False) -> bool
+ Returns the value of key if it exists, defaultVal otherwise.
@@ -20030,6 +21866,7 @@ wx.NullIcon if no provider provides it.
Write(String key, String value) -> bool
+ write the value (return True on success)
@@ -20037,6 +21874,7 @@ wx.NullIcon if no provider provides it.
WriteInt(String key, long value) -> bool
+ write the value (return True on success)
@@ -20044,6 +21882,7 @@ wx.NullIcon if no provider provides it.
WriteFloat(String key, double value) -> bool
+ write the value (return True on success)
@@ -20051,19 +21890,23 @@ wx.NullIcon if no provider provides it.
WriteBool(String key, bool value) -> bool
+ write the value (return True on success)
- Flush(bool bCurrentOnly=False) -> bool
+ Flush(bool currentOnly=False) -> bool
+ permanently writes all changes
-
+
RenameEntry(String oldName, String newName) -> bool
+ Rename an entry. Returns False on failure (probably because the new
+name is already taken by an existing entry)
@@ -20071,47 +21914,60 @@ wx.NullIcon if no provider provides it.
RenameGroup(String oldName, String newName) -> bool
+ Rename aa group. Returns False on failure (probably because the new
+name is already taken by an existing entry)
- DeleteEntry(String key, bool bDeleteGroupIfEmpty=True) -> bool
+ DeleteEntry(String key, bool deleteGroupIfEmpty=True) -> bool
+ Deletes the specified entry and the group it belongs to if
+it was the last key in it and the second parameter is True
-
+
DeleteGroup(String key) -> bool
+ Delete the group (with all subgroups)
DeleteAll() -> bool
+ Delete the whole underlying object (disk file, registry key, ...)
+primarly intended for use by desinstallation routine.
+
+
+ SetExpandEnvVars(bool doIt=True)
+ We can automatically expand environment variables in the config entries
+(this option is on by default, you can turn it on/off at any time)
+
+
+
IsExpandingEnvVars() -> bool
-
-
- SetExpandEnvVars(bool bDoIt=True)
-
-
-
+ Are we currently expanding environment variables?
- SetRecordDefaults(bool bDoIt=True)
+ SetRecordDefaults(bool doIt=True)
+ Set whether the config objec should record default values.
-
+
IsRecordingDefaults() -> bool
+ Are we currently recording default values?
ExpandEnvVars(String str) -> String
+ Expand any environment variables in str and return the result
@@ -20144,22 +22000,9 @@ wx.NullIcon if no provider provides it.
GetStyle() -> long
-
-
- __init__(ConfigBase pContainer, String strEntry) -> ConfigPathChanger
-
-
-
-
-
-
- __del__()
-
-
- Name() -> String
-
-
+ This ConfigBase-derived class will use the registry on Windows,
+and will be a wx.FileConfig on other platforms.
__init__(String appName=EmptyString, String vendorName=EmptyString,
@@ -20178,6 +22021,7 @@ wx.NullIcon if no provider provides it.
+ This config class will use a file for storage on all platforms.
__init__(String appName=EmptyString, String vendorName=EmptyString,
@@ -20195,8 +22039,32 @@ wx.NullIcon if no provider provides it.
__del__()
+
+ A handy little class which changes current path to the path of
+given entry and restores it in the destructoir: so if you declare
+a local variable of this type, you work in the entry directory
+and the path is automatically restored when the function returns.
+
+ __init__(ConfigBase config, String entry) -> ConfigPathChanger
+
+
+
+
+
+
+ __del__()
+
+
+ Name() -> String
+ Get the key name
+
+
ExpandEnvVars(String sz) -> String
+ Replace environment variables ($SOMETHING) with their values. The
+format is $VARNAME or ${VARNAME} where VARNAME contains
+alphanumeric characters and '_' only. '$' must be escaped ('\\$')
+in order to be taken literally.
@@ -21293,14 +23161,27 @@ __sub__(DateSpan other) -> DateTime
#---------------------------------------------------------------------------
+ A wx.DataFormat is an encapsulation of a platform-specific format
+handle which is used by the system for the clipboard and drag and
+drop operations. The applications are usually only interested in,
+for example, pasting data from the clipboard only if the data is
+in a format the program understands. A data format is is used to
+uniquely identify this format.
+
+On the system level, a data format is usually just a number
+(CLIPFORMAT under Windows or Atom under X11, for example).
__init__(int type) -> DataFormat
+ Constructs a data format object for one of the standard data
+formats or an empty data object (use SetType or SetId later in
+this case)
CustomDataFormat(String format) -> DataFormat
+ Constructs a data format object for a custom format identified by its name.
@@ -21334,18 +23215,22 @@ __ne__(DataFormat format) -> bool
SetType(int format)
+ Sets the format to the given value, which should be one of wx.DF_XXX constants.
GetType() -> int
+ Returns the platform-specific number identifying the format.
GetId() -> String
+ Returns the name of a custom format (this function will fail for a standard format).
SetId(String format)
+ Sets the format to be the custom format identified by the given name.
@@ -21529,6 +23414,12 @@ __ne__(DataFormat format) -> bool
GetFilenames() -> wxArrayString
+
+ AddFile(String filename)
+
+
+
+
@@ -21639,8 +23530,8 @@ __ne__(DataFormat format) -> bool
-
- PyDropTarget(DataObject dataObject=None) -> DropTarget
+
+ __init__(DataObject dataObject=None) -> DropTarget
@@ -21793,6 +23684,16 @@ __ne__(DataFormat format) -> bool
#---------------------------------------------------------------------------
+ wx.Clipboard represents the system clipboard and provides methods to copy data
+to or paste data from it. Normally, you should only use wx.TheClipboard which
+is a reference to a global wx.Clipboard instance.
+
+Call wx.TheClipboard.Open to get ownership of the clipboard. If this operation
+returns True, you now own the clipboard. Call wx.TheClipboard.SetData to put
+data on the clipboard, or wx.TheClipboard.GetData to retrieve data from the
+clipboard. Call wx.TheClipboard.Close to close the clipboard and relinquish
+ownership. You should keep the clipboard open only momentarily.
+
__init__() -> Clipboard
@@ -21802,53 +23703,81 @@ __ne__(DataFormat format) -> bool
Open() -> bool
+ Call this function to open the clipboard before calling SetData
+and GetData. Call Close when you have finished with the clipboard.
+You should keep the clipboard open for only a very short time.
+Returns true on success.
Close()
+ Closes the clipboard.
IsOpened() -> bool
+ Query whether the clipboard is opened
AddData(DataObject data) -> bool
+ Call this function to add the data object to the clipboard. You
+may call this function repeatedly after having cleared the clipboard.
+After this function has been called, the clipboard owns the data, so
+do not delete the data explicitly.
SetData(DataObject data) -> bool
+ Set the clipboard data, this is the same as Clear followed by AddData.
IsSupported(DataFormat format) -> bool
+ Returns True if the given format is available in the data object(s) on
+the clipboard.
GetData(DataObject data) -> bool
+ Call this function to fill data with data on the clipboard, if available
+in the required format. Returns true on success.
Clear()
+ Clears data from the clipboard object and also the system's clipboard
+if possible.
Flush() -> bool
+ Flushes the clipboard: this means that the data which is currently on
+clipboard will stay available even after the application exits (possibly
+eating memory), otherwise the clipboard will be emptied on exit.
+Returns False if the operation is unsuccesful for any reason.
- UsePrimarySelection(bool primary=False)
+ UsePrimarySelection(bool primary=True)
+ On platforms supporting it (the X11 based platforms), selects the so
+called PRIMARY SELECTION as the clipboard as opposed to the normal
+clipboard, if primary is True.
-
+
+ A helpful class for opening the clipboard and automatically closing it when
+the locker is destroyed.
__init__(Clipboard clipboard=None) -> ClipboardLocker
+ A helpful class for opening the clipboard and automatically closing it when
+the locker is destroyed.
@@ -21858,6 +23787,8 @@ __ne__(DataFormat format) -> bool
__nonzero__() -> bool
+ A ClipboardLocker instance evaluates to True if the clipboard was
+successfully opened.
@@ -23614,6 +25545,9 @@ validity of the remaining two values. The result codes are:
Refresh(bool eraseb=True, Rect rect=None)
+ Mark the specified rectangle (or the whole window) as "dirty" so it
+will be repainted. Causes an EVT_PAINT event to be generated and sent
+to the window.
@@ -25617,6 +27551,7 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED )
SetTitle(String title)
+ Sets the window's title. Applicable only to frames and dialogs.
@@ -35639,6 +37574,7 @@ EVT_DYNAMIC_SASH_UNIFY = wx.PyEventBinder( wxEVT_DYNAMIC_SASH_UNIFY, 1 )
Size size=DefaultSize, long style=TR_DEFAULT_STYLE,
Validator validator=DefaultValidator,
String name=TreeListCtrlNameStr) -> bool
+ Do the 2nd phase and create the GUI control.