From fb113b165eb2091d115b10e57b8cbadb6c77252b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 3 Mar 2005 01:51:53 +0000 Subject: [PATCH] Add SetDefault() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/lib/buttons.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wxPython/wx/lib/buttons.py b/wxPython/wx/lib/buttons.py index acc7ee46a4..9d1d798148 100644 --- a/wxPython/wx/lib/buttons.py +++ b/wxPython/wx/lib/buttons.py @@ -202,7 +202,9 @@ class GenButton(wx.PyControl): wx.PyControl.SetForegroundColour(self, colour) self.InitColours() - + def SetDefault(self): + self.GetParent().SetDefaultItem(self) + def _GetLabelSize(self): """ used internally """ w, h = self.GetTextExtent(self.GetLabel())