This class represents a base class for all pseudo controls used in
ButtonPanel
.
wx.lib.agw.buttonpanel.ButtonInfo
, wx.lib.agw.buttonpanel.ButtonPanelText
, wx.lib.agw.buttonpanel.Separator
__init__ |
Default class constructor. |
Disable |
Disables the control. |
Draw |
Handles the drawing of the control. |
Enable |
Enable or disable the window for user input. |
GetBestSize |
This functions returns the best acceptable minimal size for the window. For |
GetId |
Returns the identifier of the window. |
HasFocus |
Returns whether the control has the focus or not. |
Hide |
Hides the control. |
IsShown |
Returns True if the window is shown, False if it has been hidden. |
OnMouseEvent |
Handles the wx.EVT_MOUSE_EVENTS events for the control. |
SetFocus |
Sets or kills the focus on the control. |
Show |
Shows or hide the control. |
This class represents a base class for all pseudo controls used in
ButtonPanel
.
Default class constructor.
Parameters: |
|
---|
Disables the control.
Returns: | True if the window has been disabled, False if it had been
already disabled before the call to this function. |
---|
Note
This is functionally equivalent of calling Enable
with a False
flag.
Handles the drawing of the control.
Parameters: | rect (wx.Rect) – the control client rectangle. |
---|
Enable or disable the window for user input.
Parameters: | enable (bool) – If True , enables the window for input. If False , disables the window. |
---|---|
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. |
Note
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.
This functions returns the best acceptable minimal size for the window. For
example, for a static control, it will be the minimal size such that the control
label is not truncated. For windows containing subwindows (typically Panel
),
the size returned by this function will be the same as the size the window would
have had after calling Fit().
Returns: | An instance of wx.Size . |
---|
Returns the identifier of the window.
Returns: | An integer representing the identifier of the window. |
---|
Note
Each window has an integer identifier. If the application has not provided
one (or the default wx.ID_ANY
) an unique identifier with a negative value will
be generated.
Returns whether the control has the focus or not.
Returns: | True if the control has the focus, False otherwise. |
---|
Hides the control.
Note
This is functionally equivalent of calling Show
with a False
input.
Returns True
if the window is shown, False
if it has been hidden.
Handles the wx.EVT_MOUSE_EVENTS
events for the control.
Parameters: |
|
---|
Sets or kills the focus on the control.
Parameters: | focus (bool) – whether the control can receive keyboard inputs or not. |
---|
Shows or hide the control.
Parameters: | show (bool) – If True displays the window. Otherwise, it hides it. |
---|