AquaButton is another custom-drawn button class which approximatively mimics the behaviour of Aqua buttons on the Mac.
AquaButton is another custom-drawn button class which approximatively mimics the behaviour of Aqua buttons on the Mac. At the moment this class supports:
And a lot more. Check the demo for an almost complete review of the functionalities.
Sample usage:
import wx
import wx.lib.agw.aquabutton as AB
app = wx.App(0)
frame = wx.Frame(None, -1, "AquaButton Test")
mainPanel = wx.Panel(frame)
mainPanel.SetBackgroundColour(wx.WHITE)
# Initialize AquaButton 1 (with image)
bitmap = wx.Bitmap("my_button_bitmap.png", wx.BITMAP_TYPE_PNG)
btn1 = AB.AquaButton(mainPanel, -1, bitmap, "AquaButton")
# Initialize AquaButton 2 (no image)
btn2 = AB.AquaButton(mainPanel, -1, None, "Hello World!")
frame.Show()
app.MainLoop()
No particular window styles are available for this class.
This class processes the following events:
Event Name | Description |
---|---|
EVT_BUTTON | Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked. |
AquaButton control is distributed under the wxPython license.
Latest Revision: Andrea Gavana @ 22 Nov 2011, 22.00 GMT
Version 0.4
__ToggleMixin | A mixin that allows to transform AquaButton in the corresponding toggle button. |
AquaButton | This is the main class implementation of AquaButton. |
AquaButtonEvent | Event sent from the AquaButton buttons when the button is activated. |
AquaToggleButton | An AquaButton toggle button. |