Hi,
···
On 3 April 2012 01:34, VC wrote:
I downloaded wxpython 2.9.3
I wrote this quick test:
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, id, title ,pos, size): wx.Frame.__init__(self, parent, id, title, pos, size) self.Panel = wx.Panel(self, -1) self.Panel.SetBackgroundColour('grey') choicesList = ['one','two','three'] self.RadioBox = wx.RadioBox(self.Panel, -1, 'chose a number', choices = choicesList,
majorDimension = 3,
style = wx.RA_SPECIFY_ROWS)
class MyApp(wx.App):
def OnInit(self): self.Frame = MyFrame(None, -1, 'RadioBox test',
wx.DefaultPosition,
wx.DefaultSize) self.Frame.Show() return True
app = MyApp()
app.MainLoop()
It worked. The options showed correctly.
In my other program that i am writing that it is 500 lines long, i
have a similar implementation of the radiobox code and it does not
work.
That same code however displays a correct radiobox in wxpython 2.8.
Then it’s a bug in your code . I would suggest one thing though: do not use capitalized attribute names (i.e., self.Panel, self.RadioBox etc…) as you may hit some funny stuff when your attributes conflict with wxPython windows properties (as they have capitalized names). See, for example, the list of properties wx.Window has starting from this:
http://xoomer.virgilio.it/infinity77/Phoenix/Window.html#Window.AcceleratorTable
So, just for the sake of it, use lower case starting names, i.e., self.panel (or self._panel or self.interestingPanel).
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”