[wxPython] setting ListBox selections

Hi all...

Thanks for the help with the OGL line stuff, which I was
obviously approaching from totally the wrong angle... it
works now :slight_smile:

Today's problem is this: I can't seem to preset which items
are selected on a wxListBox

--- snippet ---

self.param_list.Deselect (0)
for i in l:
聽聽self.param_list.SetSelection (i-1)
聽聽p = data['model']['parameters']
聽聽s = p [i].keys()[0]
聽聽self.param_list.SetStringSelection (s)
聽聽print i, s # TEST

路路路

---

--- output ---

1 Parameter one
2 Parameter two

---

So why doesn't the ListBox select the appropriate items?

It has eight items in it, the first two being the same
as the strings seen in the output... but whether I try
and set the selected items by number, string, or both,
it always selects the first one (despite the deselect).

Regards,
Denny

----------------------------------------------------------
Denny De La Haye \ www-edc.eng.cam.ac.uk/~djd33
Engineering Design Centre, \ www-edc.eng.cam.ac.uk
Department of Engineering, \ www.eng.cam.ac.uk
University of Cambridge, UK \ www.cam.ac.uk
----------------------------------------------------------
"The more you read, the less everyone else knows"

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users