[Tutor] update a ws.ListBox

Alan Gauld alan.gauld at btinternet.com
Wed Nov 28 21:04:20 CET 2007


I'm not sure this is exactly what you want but it does 
something like it:

 def OnListBox1(self, event):
    index = event.GetSelection()
    choice = self.listbox1_items[index]
    if choice == 'item1':
       ret = ['choice1', 'choice2']
    elif choice == 'item2':
       ret = ['choice3', 'choice4']
    else:
       ret = ['Ooops']
    self.listbox2.SetItems(ret)
    self.listbox2.SetSelection(index)

The help() command at the >>> prompt is your 
friend...es[ecially coupled with the IDLE/Pythonwin 
method completion feature

>>> import wx
>>> help(wx.ListBox.

Should display a list of long methods which you can browse and view

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071128/3c16bd01/attachment.htm 


More information about the Tutor mailing list