This module implements various forms of generic buttons, meaning that they are not built on native controls but are self-drawn.
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…
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()
Uses the native renderer to draw the bezel, also handle mouse-overs. |
|
A mixin that allows to transform |
|
A generic bitmap button. |
|
A generic bitmapped button with text label. |
|
A generic toggle bitmap button with text label. |
|
A generic toggle bitmap button. |
|
A generic button, and base class for the other generic buttons. |
|
Event sent from the generic buttons when the button is activated. |
|
A generic toggle button. |
|
A themed generic bitmap button. |
|
A themed generic bitmapped button with text label. |
|
A themed generic toggle bitmap button with text label. |
|
A themed generic toggle bitmap button. |
|
A themed generic button. |
|
A themed generic toggle button. |