Phoenix Logo

phoenix_title wx.lib.buttons.GenBitmapButton

A generic bitmap button.


class_hierarchy Class Hierarchy

Inheritance diagram for class GenBitmapButton:


super_classes Known Superclasses

wx.lib.buttons.GenButton


method_summary Methods Summary

__init__ Default class constructor.
DrawLabel  
GetBitmapDisabled Returns the bitmap for the button’s disabled state, which may be invalid.
GetBitmapFocus Returns the bitmap for the button’s focused state, which may be invalid.
GetBitmapLabel Returns the bitmap for the button’s normal state.
GetBitmapSelected Returns the bitmap for the button’s pressed state, which may be invalid.
SetBitmapDisabled Sets the bitmap for the disabled button appearance.
SetBitmapFocus Sets the bitmap for the focused button appearance.
SetBitmapLabel Set the bitmap to display normally.
SetBitmapSelected Sets the bitmap for the selected (depressed) button appearance.

api Class API



class GenBitmapButton(GenButton)

A generic bitmap button.


Methods



__init__(self, parent, id=-1, bitmap=wx.NullBitmap, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0, validator = wx.DefaultValidator, name = "genbutton")

Default class constructor.

Parameters:
  • 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.

Return type:wx.Bitmap


GetBitmapFocus(self)

Returns the bitmap for the button’s focused state, which may be invalid.

Return type:wx.Bitmap

See also

SetBitmapFocus



GetBitmapLabel(self)

Returns the bitmap for the button’s normal state.

Return type:wx.Bitmap

See also

SetBitmapLabel



GetBitmapSelected(self)

Returns the bitmap for the button’s pressed state, which may be invalid.

Return type:wx.Bitmap


SetBitmapDisabled(self, bitmap)

Sets the bitmap for the disabled button appearance.

Parameters:bitmap (wx.Bitmap) – the bitmap for the disabled button appearance.


SetBitmapFocus(self, bitmap)

Sets the bitmap for the focused button appearance.

Parameters: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.

Parameters: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.



SetBitmapSelected(self, bitmap)

Sets the bitmap for the selected (depressed) button appearance.

Parameters:bitmap (wx.Bitmap) – the bitmap for the selected (depressed) button appearance.