From: Robin Dunn Date: Fri, 8 Mar 2002 23:06:21 +0000 (+0000) Subject: Little tweaks and fixes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/91a64dfd31f2b144260556755a2d52ecbbb0a85f?ds=sidebyside Little tweaks and fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/wxEditableListBox.py b/wxPython/demo/wxEditableListBox.py index 27ebfe4e85..b8816cad1d 100644 --- a/wxPython/demo/wxEditableListBox.py +++ b/wxPython/demo/wxEditableListBox.py @@ -9,7 +9,9 @@ class TestPanel(wxPanel): self.log = log self.elb = wxEditableListBox(self, -1, "List of Stuff", - (50,50), (250, 250)) + (50,50), (250, 250), + ) + #style=wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE) self.elb.SetStrings(["This is a nifty ListBox widget", "that is editable by the user.", diff --git a/wxPython/wxPython/lib/colourselect.py b/wxPython/wxPython/lib/colourselect.py index 53e828389e..db9043d802 100644 --- a/wxPython/wxPython/lib/colourselect.py +++ b/wxPython/wxPython/lib/colourselect.py @@ -26,6 +26,22 @@ from wxPython.wx import * # - Rearranged arguments to more closely follow wx conventions # - Simplified some of the code +# Cliff Wells, 2002/02/07 +# - Added ColourSelect Event + +EVT_COMMAND_COLOURSELECT = wxNewId() + +class ColourSelectEvent(wxPyCommandEvent): + def __init__(self, id, value): + wxPyCommandEvent.__init__(self, id = id) + self.SetEventType(EVT_COMMAND_COLOURSELECT) + self.value = value + + def GetValue(self): + return self.value + +def EVT_COLOURSELECT(win, id, func): + win.Connect(id, -1, EVT_COMMAND_COLOURSELECT, func) class ColourSelect(wxButton): def __init__(self, parent, id, label = "", bcolour=(0, 0, 0), @@ -54,6 +70,7 @@ class ColourSelect(wxButton): self.SetColour(bcolour) def OnChange(self): + wxPostEvent(self, ColourSelectEvent(self.GetId(), self.GetValue())) if self.callback is not None: self.callback() @@ -70,3 +87,4 @@ class ColourSelect(wxButton): if changed: self.OnChange() # moved after dlg.Destroy, since who knows what the callback will do... + diff --git a/wxPython/wxPython/lib/filebrowsebutton.py b/wxPython/wxPython/lib/filebrowsebutton.py index 5bf576cd91..0ddc2818c6 100644 --- a/wxPython/wxPython/lib/filebrowsebutton.py +++ b/wxPython/wxPython/lib/filebrowsebutton.py @@ -111,8 +111,10 @@ class FileBrowseButton(wxPanel): self.Layout() if type( size ) == types.TupleType: size = apply( wxSize, size) - if size.width != -1 or size.height != -1: - self.SetSize(size) + self.SetDimensions(-1, -1, size.width, size.height, wxSIZE_USE_EXISTING) + +# if size.width != -1 or size.height != -1: +# self.SetSize(size) def SetBackgroundColour(self,color): wxPanel.SetBackgroundColour(self,color) diff --git a/wxPython/wxPython/lib/rcsizer.py b/wxPython/wxPython/lib/rcsizer.py index af164089ea..93029fdaa3 100644 --- a/wxPython/wxPython/lib/rcsizer.py +++ b/wxPython/wxPython/lib/rcsizer.py @@ -16,6 +16,8 @@ wxFlexGridSizer but item position is not implicit but explicitly specified by row and col, and row/col spanning is supported. Adapted from code by Niki Spahiev. + +If anyone is interested, it would be nice to have this ported to C++. """