Entry
How can I set the list items of a combobox based on the selected item from another combobox?
Oct 1st, 2009 04:19
jsieoa gide, Scott Mandarich, Martin Franklin, Eric Meyer,
from Tkinter import *
import Pmw
root=Tk()
## this is the listening combobox....
cb = Pmw.ComboBox(root, labelpos="w", label_text="I am listening to
the other combobox")
def callback(thing):
print "called"
cb.setlist(thing) ## thing is a sequence
cb.setentry(thing[0]) ## the first item in the sequence
## this is the calling combobox.....
cb1 = Pmw.ComboBox(root, selectioncommand=callback,
labelpos="w", label_text="Select one of my options")
list1=["aaaa", "bbbb", "cccc"]
cb1.setlist(list1)
## pack the comboboxes
cb1.pack()
cb.pack()
## enter the tk mainloop
root.mainloop()
------------------------------------------------------------------------
http://bozicnipokloni.blogspot.com/
http://karacsonyiajandekok1.blogspot.com/
http://kerstcadeaus.blogspot.com/
http://presentesdenatal1.blogspot.com/
http://kysymyksenvastaukset.blogspot.com/
http://festivalfestiviteiten.blogspot.com/
http://svaretblog.blogspot.com/
http://festivalbl.blogspot.com/
http://regalidinatale1.blogspot.com/
http://weihnachtsgeschenke1.blogspot.com/
http://cadeauxdenoel1.blogspot.com/
http://christmasgifts215.blogspot.com/
http://festivaloslavy.blogspot.com/
http://fragebeantwortet.blogspot.com/
http://festivblogi.blogspot.com/
http://cadouridecraciun1.blogspot.com/
http://julegaver1.blogspot.com/
http://christmasgifts211.blogspot.com/
------------------------------------------------------------------------
http://www.golfgolfcourses.com/guides.php