This class holds information about every button that is added to
ButtonPanel
. It is an auxiliary class that you should use
every time you add a button.
Default class constructor. |
|
Add a programmer-defined status in addition to the 5 default status |
|
Checks whether a |
|
Draws the button on |
|
Enables/disables this instance of |
|
Returns the best size for the button. |
|
Returns the bitmap associated with this instance of |
|
Returns the |
|
Returns the button type (standard or toggle). |
|
Returns the help string shown in the statusbar. |
|
Returns the |
|
Returns the help string shown in a tooltip. |
|
Returns the |
|
Returns the text associated to the button. |
|
Returns the text alignment in the button (bottom or right). |
|
Returns whether a |
|
Returns whether the button has text or not. |
|
Returns |
|
Sets the bitmap associated with this instance of |
|
Sets the |
|
Sets the button type (standard or toggle). |
|
Sets the help string to be shown in the statusbar. |
|
Sets the |
|
Sets the help string to be shown in a tooltip. |
|
Sets the |
|
Sets the button label text. |
|
Sets the text alignment in the button (bottom or right). |
|
Sets a |
Returns the bitmap associated with this instance of |
|
Returns the |
|
Returns the |
|
Returns the |
This class holds information about every button that is added to
ButtonPanel
. It is an auxiliary class that you should use
every time you add a button.
Default class constructor.
parent – the parent window (ButtonPanel
);
id (integer) – the button id;
bmp (wx.Bitmap) – the associated bitmap;
status (string) – button status (“Pressed”, “Hover”, “Normal”, “Toggled”, “Disabled”);
text (string) – text to be displayed either below of to the right of the button;
kind (integer) – button kind, may be wx.ITEM_NORMAL
for standard buttons or
wx.ITEM_CHECK
for toggle buttons;
shortHelp (string) – a short help to be shown in the button tooltip;
longHelp (string) – this string is shown in the statusbar (if any) of the parent frame when the mouse pointer is inside the button.
Add a programmer-defined status in addition to the 5 default status:
Normal;
Disabled;
Hover;
Pressed;
Toggled.
name (string) – the new status name;
bmp (wx.Bitmap) – the bitmap associated with the new status.
Checks whether a ButtonPanel
repaint is needed or not. This is a convenience function.
status (bool) – the status of a newly added ButtonInfo
or a change in the
ButtonInfo
status.
Draws the button on ButtonPanel
. Actually the drawing is done in BPArt
.
Enables/disables this instance of ButtonInfo
.
enable (bool) – True
to enable the button, False
otherwise.
Returns the best size for the button.
An instance of wx.Size
.
Returns the bitmap associated with this instance of ButtonInfo
.
status (string) – the ButtonInfo
status (“Pressed”, “Hover”, “Normal”,
“Toggled”, “Disabled”).
An instance of wx.Bitmap
.
Returns the ButtonInfo
id.
An integer representing the button id.
Returns the button type (standard or toggle).
An integer representing the button type, one of wx.ITEM_NORMAL
, wx.ITEM_CHECK
.
Returns the help string shown in the statusbar.
A string containing the ButtonInfo
long help string.
Returns the ButtonInfo
client rectangle.
An instance of wx.Rect
.
Returns the help string shown in a tooltip.
A string containing the ButtonInfo
short help string.
Returns the ButtonInfo
status.
A string containing the ButtonInfo
status (one of “Pressed”, “Hover”, “Normal”,
“Toggled”, “Disabled”).
Returns the text associated to the button.
A string containing the ButtonInfo
text.
Returns the text alignment in the button (bottom or right).
An integer representing the ButtonInfo
text alignment.
Returns whether a wx.ITEM_CHECK
button is toggled or not.
True
if the button is toggled, False
otherwise.
Returns whether the button has text or not.
True
if this ButtonInfo
instance has a label, False
otherwise.
Returns True
if this instance of ButtonInfo
is enabled for input,
False
otherwise.
Sets the bitmap associated with this instance of ButtonInfo
.
bmp – a valid wx.Bitmap
object;
status (string) – the ButtonInfo
status (“Pressed”, “Hover”, “Normal”,
“Toggled”, “Disabled”).
Sets the ButtonInfo
identifier.
id (integer) – the identifier of the window.
Sets the button type (standard or toggle).
kind (integer) – one of wx.ITEM_NORMAL
, wx.ITEM_CHECK
.
Sets the help string to be shown in the statusbar.
help (string) – the string for the long help.
Sets the ButtonInfo
client rectangle.
rect – an instance of wx.Rect
.
Sets the help string to be shown in a tooltip.
help (string) – the string for the short help.
Sets the ButtonInfo
status.
status (string) – one of “Pressed”, “Hover”, “Normal”, “Toggled”, “Disabled”.
Sets the button label text.
text (string) – the button label string.
Sets the text alignment in the button (bottom or right).
alignment (integer) – the text alignment in this ButtonInfo
instance.
Sets a wx.ITEM_CHECK
button toggled/not toggled.
toggle (bool) – True
to toggle the button, False
otherwise.
Returns the bitmap associated with this instance of ButtonInfo
.
status (string) – the ButtonInfo
status (“Pressed”, “Hover”, “Normal”,
“Toggled”, “Disabled”).
An instance of wx.Bitmap
.
Returns the ButtonInfo
id.
An integer representing the button id.
Returns the ButtonInfo
client rectangle.
An instance of wx.Rect
.
Returns the ButtonInfo
status.
A string containing the ButtonInfo
status (one of “Pressed”, “Hover”, “Normal”,
“Toggled”, “Disabled”).