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
|
.. 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
.. module:: wx.lib.buttons
.. currentmodule:: wx.lib.buttons
.. highlight:: python
.. _wx.lib.buttons:
==========================================================================================================================================
|phoenix_title| **wx.lib.buttons**
==========================================================================================================================================
This module implements various forms of generic buttons, meaning that
they are not built on native controls but are self-drawn.
Description
===========
This module implements various forms of generic buttons, meaning that
they are not built on native controls but are self-drawn.
They act like normal buttons but you are able to better control how they look,
bevel width, colours, etc...
Usage
=====
Sample usage::
import wx
import wx.lib.buttons as buttons
class MyFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(400, 300))
panel = wx.Panel(self)
# Build a bitmap button and a normal one
bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, wx.ART_OTHER, (16, 16))
btn1 = buttons.ThemedGenBitmapButton(panel, -1, bmp, pos=(50, 50))
btn2 = buttons.GenButton(panel, -1, "Hello World!", pos=(50, 100))
app = wx.App()
frame = MyFrame(None, 'wx.lib.buttons Test')
frame.Show()
app.MainLoop()
|class_summary| Classes Summary
===============================
================================================================================ ================================================================================
:ref:`~wx.lib.buttons.__ThemedMixin` Uses the native renderer to draw the bezel, also handle mouse-overs.
:ref:`~wx.lib.buttons.__ToggleMixin` A mixin that allows to transform :class:`GenButton` in the corresponding
:ref:`~wx.lib.buttons.GenBitmapButton` A generic bitmap button.
:ref:`~wx.lib.buttons.GenBitmapTextButton` A generic bitmapped button with text label.
:ref:`~wx.lib.buttons.GenBitmapTextToggleButton` A generic toggle bitmap button with text label.
:ref:`~wx.lib.buttons.GenBitmapToggleButton` A generic toggle bitmap button.
:ref:`~wx.lib.buttons.GenButton` A generic button, and base class for the other generic buttons.
:ref:`~wx.lib.buttons.GenButtonEvent` Event sent from the generic buttons when the button is activated.
:ref:`~wx.lib.buttons.GenToggleButton` A generic toggle button.
:ref:`~wx.lib.buttons.ThemedGenBitmapButton` A themed generic bitmap button.
:ref:`~wx.lib.buttons.ThemedGenBitmapTextButton` A themed generic bitmapped button with text label.
:ref:`~wx.lib.buttons.ThemedGenBitmapTextToggleButton` A themed generic toggle bitmap button with text label.
:ref:`~wx.lib.buttons.ThemedGenBitmapToggleButton` A themed generic toggle bitmap button.
:ref:`~wx.lib.buttons.ThemedGenButton` A themed generic button.
:ref:`~wx.lib.buttons.ThemedGenToggleButton` A themed generic toggle button.
================================================================================ ================================================================================
|
.. toctree::
:maxdepth: 1
:hidden:
wx.lib.buttons.__ThemedMixin
wx.lib.buttons.__ToggleMixin
wx.lib.buttons.GenBitmapButton
wx.lib.buttons.GenBitmapTextButton
wx.lib.buttons.GenBitmapTextToggleButton
wx.lib.buttons.GenBitmapToggleButton
wx.lib.buttons.GenButton
wx.lib.buttons.GenButtonEvent
wx.lib.buttons.GenToggleButton
wx.lib.buttons.ThemedGenBitmapButton
wx.lib.buttons.ThemedGenBitmapTextButton
wx.lib.buttons.ThemedGenBitmapTextToggleButton
wx.lib.buttons.ThemedGenBitmapToggleButton
wx.lib.buttons.ThemedGenButton
wx.lib.buttons.ThemedGenToggleButton
|