Reputation: 41
I am designing a GUI using wxPython with flat buttons.
How can I make a thin border around the button, like button2 in the picture:
https://i.sstatic.net/sYo0D.png
The button that I have now looks like this:
https://i.sstatic.net/hz3r8.png
The code:
import wx.lib.buttons as buttons
[...]
self.a = buttons.GenButton(self, 00, "0", (140, 380), size=(100, 100),style=wx.BORDER_NONE)
self.a.SetBackgroundColour((215, 215, 215))
Thanks for help.
Upvotes: 0
Views: 744
Reputation: 2096
With GenButton this should work:
buttons.GenButton(pane, wx.ID_ANY, "1", wx.DefaultPosition, size=(100, 100),
style=wx.BORDER_SIMPLE)
or:
buttons.ThemedGenButton(pane, wx.ID_ANY, 'Themed - Drawn with native renderer')
Upvotes: 1