wx.NO_BORDER style sets the bezel width to 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,14 +66,19 @@ class GenButton(wx.PyControl):
|
|||||||
pos = wx.DefaultPosition, size = wx.DefaultSize,
|
pos = wx.DefaultPosition, size = wx.DefaultSize,
|
||||||
style = 0, validator = wx.DefaultValidator,
|
style = 0, validator = wx.DefaultValidator,
|
||||||
name = "genbutton"):
|
name = "genbutton"):
|
||||||
if style == 0:
|
cstyle = style
|
||||||
style = wx.NO_BORDER
|
if cstyle == 0:
|
||||||
wx.PyControl.__init__(self, parent, ID, pos, size, style, validator, name)
|
cstyle = wx.NO_BORDER
|
||||||
|
wx.PyControl.__init__(self, parent, ID, pos, size, cstyle, validator, name)
|
||||||
|
|
||||||
self.up = True
|
self.up = True
|
||||||
self.bezelWidth = 2
|
|
||||||
self.hasFocus = False
|
self.hasFocus = False
|
||||||
self.useFocusInd = True
|
if style & wx.NO_BORDER:
|
||||||
|
self.bezelWidth = 0
|
||||||
|
self.useFocusInd = False
|
||||||
|
else:
|
||||||
|
self.bezelWidth = 2
|
||||||
|
self.useFocusInd = True
|
||||||
|
|
||||||
self.SetLabel(label)
|
self.SetLabel(label)
|
||||||
self.InheritAttributes()
|
self.InheritAttributes()
|
||||||
|
Reference in New Issue
Block a user