X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..f63e3ebbe3272b9690aa2530e0c3048d3f37c7c7:/wxPython/demo/wxChoice.py diff --git a/wxPython/demo/wxChoice.py b/wxPython/demo/wxChoice.py index 55ddbb5ebf..9cd83ce3b2 100644 --- a/wxPython/demo/wxChoice.py +++ b/wxPython/demo/wxChoice.py @@ -15,12 +15,14 @@ class TestChoice(wxPanel): wxPoint(15, 10)) wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 20)) - wxChoice(self, 40, wxPoint(80, 50), wxSize(95, 20), #wxDefaultSize, - sampleList) + self.ch = wxChoice(self, 40, (80, 50), choices = sampleList) EVT_CHOICE(self, 40, self.EvtChoice) + def EvtChoice(self, event): self.log.WriteText('EvtChoice: %s\n' % event.GetString()) + self.ch.Append("A new item") + #--------------------------------------------------------------------------- @@ -43,34 +45,4 @@ def runTest(frame, nb, log): overview = """\ A choice item is used to select one of a list of strings. Unlike a listbox, only the selection is visible until the user pulls down the menu of choices. - -wxChoice() -------------------- - -Default constructor. - -wxChoice(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, int n, const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "choice") - -Constructor, creating and showing a choice. - -Parameters -------------------- - -parent = Parent window. Must not be NULL. - -id = Window identifier. A value of -1 indicates a default value. - -pos = Window position. - -size = Window size. If the default size (-1, -1) is specified then the choice is sized appropriately. - -n = Number of strings with which to initialise the choice control. - -choices = An array of strings with which to initialise the choice control. - -style = Window style. See wxChoice. - -validator = Window validator. - -name = Window name. """