[wxPython] Newbie wxRadioBox

I’m trying to recreate some of what is present in the notebook example from

the wxWindows distribution. However, I’m clearly doing something wrong when

setting-up wxRadioBox. Any suggestions would be appreciated.

···

choices = [‘one’, ‘two’]

panel = wxPanel(frame, -1)
n = wxNotebook(panel, -1, wxPoint(10,10), wxSize(410, 300))
form1 = wxPanel(n, -1)
b = wxRadioBox(form1, -1, “Label 1”, wxPoint(10,10), wxSize(370, 100), 2, choices, 2, wxRA_SPECIFY_ROWS)


Thanks.

KNS

Sorry for the junk appended to my last message.

KNS

choices = ['one', 'two']

panel = wxPanel(frame, -1)
n = wxNotebook(panel, -1, wxPoint(10,10), wxSize(410, 300))
form1 = wxPanel(n, -1)
b = wxRadioBox(form1, -1, "Label 1", wxPoint(10,10), wxSize(370,
100), 2, choices, 2, wxRA_SPECIFY_ROWS)

In Python you don't have to tell it how long your list is because it already
knows, so the propper parameter list is:

b = wxRadioBox(form1, -1, "Label 1", (10,10), (370, 100), choices, 2,
wxRA_SPECIFY_ROWS)

Also notice that wxPoints and wxSize are automatically converted from
tuples.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!