A generic bitmap button.
wx.lib.buttons.GenBitmapTextButton
, wx.lib.buttons.GenBitmapToggleButton
, wx.lib.buttons.ThemedGenBitmapButton
, wx.lib.colourselect.ColourSelect
Default class constructor. |
|
Returns the bitmap for the button’s disabled state, which may be invalid. |
|
Returns the bitmap for the button’s focused state, which may be invalid. |
|
Returns the bitmap for the button’s normal state. |
|
Returns the bitmap for the button’s pressed state, which may be invalid. |
|
Sets the bitmap for the disabled button appearance. |
|
Sets the bitmap for the focused button appearance. |
|
Set the bitmap to display normally. |
|
Sets the bitmap for the selected (depressed) button appearance. |
GenBitmapButton
(GenButton)¶A generic bitmap button.
__init__
(self, parent, id=-1, bitmap=wx.NullBitmap, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0, validator = wx.DefaultValidator, name = "genbutton")¶Default class constructor.
parent (wx.Window) – parent window. Must not be None
;
id (integer) – window identifier. A value of -1 indicates a default value;
bitmap (wx.Bitmap) – the button bitmap;
pos (tuple or wx.Point
) – the control position. A value of (-1, -1) indicates a default position,
chosen by either the windowing system or wxPython, depending on platform;
size (tuple or wx.Size
) – the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform;
style (integer) – the button style;
validator (wx.Validator) – the validator associated to the button;
name (string) – the button name.
See also
wx.Button
for a list of valid window styles.
DrawLabel
(self, dc, width, height, dx=0, dy=0)¶GetBitmapDisabled
(self)¶Returns the bitmap for the button’s disabled state, which may be invalid.
See also
GetBitmapFocus
(self)¶Returns the bitmap for the button’s focused state, which may be invalid.
See also
GetBitmapLabel
(self)¶Returns the bitmap for the button’s normal state.
See also
GetBitmapSelected
(self)¶Returns the bitmap for the button’s pressed state, which may be invalid.
See also
SetBitmapDisabled
(self, bitmap)¶Sets the bitmap for the disabled button appearance.
bitmap (wx.Bitmap) – the bitmap for the disabled button appearance.
SetBitmapFocus
(self, bitmap)¶Sets the bitmap for the focused button appearance.
bitmap (wx.Bitmap) – the bitmap for the focused button appearance.
SetBitmapLabel
(self, bitmap, createOthers=True)¶Set the bitmap to display normally. This is the only one that is required.
If createOthers is True
, then the other bitmaps will be generated
on the fly. Currently, only the disabled bitmap is generated.
bitmap (wx.Bitmap) – the bitmap for the normal button appearance.
Note
This is the bitmap used for the unselected state, and for all other states if no other bitmaps are provided.