As requested, a repeat of my ListBox problem... ~Denny
···
---------- Forwarded message ----------
Hi all...
Thanks for the help with the OGL line stuff, which I was
obviously approaching from totally the wrong angle... it
works now
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)
and only the first one.
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