.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.buttons .. highlight:: python .. _wx.lib.buttons.GenBitmapButton: ========================================================================================================================================== |phoenix_title| **wx.lib.buttons.GenBitmapButton** ========================================================================================================================================== A generic bitmap button. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class GenBitmapButton:
| |sub_classes| Known Subclasses ============================== :class:`wx.lib.buttons.GenBitmapTextButton`, :class:`wx.lib.buttons.GenBitmapToggleButton`, :class:`wx.lib.buttons.ThemedGenBitmapButton`, :class:`wx.lib.colourselect.ColourSelect` | |super_classes| Known Superclasses ================================== :class:`wx.lib.buttons.GenButton` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.buttons.GenBitmapButton.__init__` Default class constructor. :meth:`~wx.lib.buttons.GenBitmapButton.DrawLabel` :meth:`~wx.lib.buttons.GenBitmapButton.GetBitmapDisabled` Returns the bitmap for the button's disabled state, which may be invalid. :meth:`~wx.lib.buttons.GenBitmapButton.GetBitmapFocus` Returns the bitmap for the button's focused state, which may be invalid. :meth:`~wx.lib.buttons.GenBitmapButton.GetBitmapLabel` Returns the bitmap for the button's normal state. :meth:`~wx.lib.buttons.GenBitmapButton.GetBitmapSelected` Returns the bitmap for the button's pressed state, which may be invalid. :meth:`~wx.lib.buttons.GenBitmapButton.SetBitmapDisabled` Sets the bitmap for the disabled button appearance. :meth:`~wx.lib.buttons.GenBitmapButton.SetBitmapFocus` Sets the bitmap for the focused button appearance. :meth:`~wx.lib.buttons.GenBitmapButton.SetBitmapLabel` Set the bitmap to display normally. :meth:`~wx.lib.buttons.GenBitmapButton.SetBitmapSelected` Sets the bitmap for the selected (depressed) button appearance. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: GenBitmapButton(GenButton) A generic bitmap button. .. method:: __init__(self, parent, id=-1, bitmap=wx.NullBitmap, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0, validator = wx.DefaultValidator, name = "genbutton") Default class constructor. :param wx.Window `parent`: parent window. Must not be ``None``; :param integer `id`: window identifier. A value of -1 indicates a default value; :param wx.Bitmap `bitmap`: the button bitmap; :param `pos`: the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform; :type `pos`: tuple or :class:`wx.Point` :param `size`: the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform; :type `size`: tuple or :class:`wx.Size` :param integer `style`: the button style; :param wx.Validator `validator`: the validator associated to the button; :param string `name`: the button name. .. seealso:: :class:`wx.Button` for a list of valid window styles. .. method:: DrawLabel(self, dc, width, height, dx=0, dy=0) .. method:: GetBitmapDisabled(self) Returns the bitmap for the button's disabled state, which may be invalid. :rtype: :class:`wx.Bitmap` .. seealso:: :meth:`SetBitmapDisabled` .. method:: GetBitmapFocus(self) Returns the bitmap for the button's focused state, which may be invalid. :rtype: :class:`wx.Bitmap` .. seealso:: :meth:`SetBitmapFocus` .. method:: GetBitmapLabel(self) Returns the bitmap for the button's normal state. :rtype: :class:`wx.Bitmap` .. seealso:: :meth:`SetBitmapLabel` .. method:: GetBitmapSelected(self) Returns the bitmap for the button's pressed state, which may be invalid. :rtype: :class:`wx.Bitmap` .. seealso:: :meth:`SetBitmapSelected` .. method:: SetBitmapDisabled(self, bitmap) Sets the bitmap for the disabled button appearance. :param wx.Bitmap `bitmap`: the bitmap for the disabled button appearance. .. seealso:: :meth:`GetBitmapDisabled`, :meth:`SetBitmapLabel`, :meth:`SetBitmapSelected`, :meth:`SetBitmapFocus` .. method:: SetBitmapFocus(self, bitmap) Sets the bitmap for the focused button appearance. :param wx.Bitmap `bitmap`: the bitmap for the focused button appearance. .. seealso:: :meth:`GetBitmapFocus`, :meth:`SetBitmapLabel`, :meth:`SetBitmapSelected`, :meth:`SetBitmapDisabled` .. method:: 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. :param wx.Bitmap `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. .. method:: SetBitmapSelected(self, bitmap) Sets the bitmap for the selected (depressed) button appearance. :param wx.Bitmap `bitmap`: the bitmap for the selected (depressed) button appearance. .. seealso:: :meth:`GetBitmapSelected`, :meth:`SetBitmapLabel`, :meth:`SetBitmapDisabled`, :meth:`SetBitmapFocus`