Subclass of SButton
which displays a bitmap, acting like a
wx.BitmapButton
.
wx.lib.agw.shapedbutton.SBitmapTextButton
, wx.lib.agw.shapedbutton.SBitmapToggleButton
wx.lib.agw.shapedbutton.SButton
Default class constructor. |
|
Draws the bitmap in the middle of the button. |
|
Returns the bitmap displayed when the button is disabled. |
|
Returns the bitmap displayed when the button has the focus. |
|
Returns the bitmap associated with the button in the normal state. |
|
Returns the bitmap displayed when the button is selected (pressed). |
|
Sets the bitmap to display when the button is disabled. |
|
Sets the bitmap to display when the button has the focus. |
|
Sets the bitmap to display normally. This is the only one that is |
|
Sets the bitmap to display when the button is selected (pressed). |
SBitmapButton
(SButton)¶Subclass of SButton
which displays a bitmap, acting like a
wx.BitmapButton
.
__init__
(self, parent, id, bitmap, pos=wx.DefaultPosition, size=wx.DefaultSize)¶Default class constructor.
parent – the SBitmapButton
parent. Must not be None
;
id – window identifier. A value of -1 indicates a default value;
bitmap – the button bitmap (if any);
pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform.
DrawLabel
(self, dc, width, height, dw=0, dh=0)¶Draws the bitmap in the middle of the button.
dc – an instance of wx.DC
;
width – the button width;
height – the button height;
dw – width differential, to show a 3D effect;
dh – height differential, to show a 3D effect.
GetBitmapDisabled
(self)¶Returns the bitmap displayed when the button is disabled.
GetBitmapFocus
(self)¶Returns the bitmap displayed when the button has the focus.
GetBitmapLabel
(self)¶Returns the bitmap associated with the button in the normal state.
GetBitmapSelected
(self)¶Returns the bitmap displayed when the button is selected (pressed).
SetBitmapDisabled
(self, bitmap)¶Sets the bitmap to display when the button is disabled.
bitmap – a valid wx.Bitmap
object.
SetBitmapFocus
(self, bitmap)¶Sets the bitmap to display when the button has the focus.
bitmap – a valid wx.Bitmap
object.
SetBitmapLabel
(self, bitmap, createothers=True)¶Sets the bitmap to display normally. This is the only one that is required.
bitmap – a valid wx.Bitmap
object;
createothers – if set to True
, then the other bitmaps will be
generated on the fly. Currently, only the disabled bitmap is generated.