]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/lib/buttons.py
Changed order of #ifdefs to get native version on OS/2, even if
[wxWidgets.git] / utils / wxPython / lib / buttons.py
index 6c90aceda6350b8bbfe262ae956f7a359683552d..9c4a79110a833d60cf8133e1c9a09b218cc80166 100644 (file)
@@ -52,13 +52,14 @@ class wxGenButtonEvent(wxPyCommandEvent):
 
 #----------------------------------------------------------------------
 
-class wxGenButton(wxWindow):
+class wxGenButton(wxControl):
     def __init__(self, parent, ID, label,
                  pos = wxDefaultPosition, size = wxDefaultSize,
                  style = 0, validator = wxDefaultValidator,
                  name = "genbutton"):
-        wxWindow.__init__(self, parent, ID, pos, size, style, name)
-        self.SetValidator(validator)
+        if style == 0:
+            style = wxNO_BORDER
+        wxControl.__init__(self, parent, ID, pos, size, style, validator, name)
 
         self.up = true
         self.bezelWidth = 2
@@ -141,7 +142,8 @@ class wxGenButton(wxWindow):
         highlightClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNHIGHLIGHT)
         self.shadowPen    = wxPen(shadowClr, 1, wxSOLID)
         self.highlightPen = wxPen(highlightClr, 1, wxSOLID)
-        self.focusIndPen  = wxPen(textClr, 1, wxUSER_DASH)
+        ##self.focusIndPen  = wxPen(textClr, 1, wxUSER_DASH)
+        self.focusIndPen = wxPen(textClr, 1, wxDOT)
 
 
     def SetBackgroundColour(self, colour):
@@ -208,7 +210,7 @@ class wxGenButton(wxWindow):
         bw = self.bezelWidth
         dc.SetLogicalFunction(wxINVERT)
         self.focusIndPen.SetColour(self.GetForegroundColour())
-        self.focusIndPen.SetDashes([1,2,1,2])  # This isn't quite working the way I expected...
+        ##self.focusIndPen.SetDashes([1,2,1,2])  # This isn't quite working the way I expected...
         dc.SetPen(self.focusIndPen)
         dc.SetBrush(wxTRANSPARENT_BRUSH)
         dc.DrawRectangle(bw+2,bw+2, w-bw*2-4, h-bw*2-4)