How to add border outline to widget?

How can I add a border outline to a widget in wxpython? (Any widget, for example wx.Button)

+5
source share
2 answers

For the panel you can use

p = wx.Panel(....., style=wx.SUNKEN_BORDER)

there you can choose from constants:

wx.SIMPLE_BORDER
wx.RAISED_BORDER
wx.SUNKEN_BORDER
wx.NO_BORDER

If you want to create a border around wx.Button, I would use my own bitmap with wx.BitmapButton:

b = wx.BitmapButton(pane, -1, wx.Bitmap('buttons/my_beautiful_button.png'))

For any widget, I think you can always create wx.Panelwith some border and put the widget in the panel.

+8
source

, "" wxPython ( "standard", wx.Button, wx.CheckBox ..), 't .

- wx.lib, , , .

, wx.lib.buttons. - wx.lib.

+2

All Articles