1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 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
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>GenBitmapButton</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.buttons.GenBitmapButton_inheritance.png" alt="Inheritance diagram of GenBitmapButton" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.buttons.GenBitmapButton.html" title="wx.lib.buttons.GenBitmapButton" alt="" coords="5,469,232,499"/> <area shape="rect" id="node2" href="wx.lib.buttons.GenButton.html" title="wx.lib.buttons.GenButton" alt="" coords="27,392,209,421"/> <area shape="rect" id="node3" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="11,5,112,35"/> <area shape="rect" id="node4" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="63,83,173,112"/> <area shape="rect" id="node6" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="58,160,179,189"/> <area shape="rect" id="node5" href="wx.Object.html" title="wx.Object" alt="" coords="136,5,217,35"/> <area shape="rect" id="node8" href="wx.Window.html" title="wx.Window" alt="" coords="74,237,163,267"/> <area shape="rect" id="node7" href="wx.Control.html" title="wx.Control" alt="" coords="75,315,163,344"/> </map>
</p>
|
|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`
|