Counter and ComboBox : ComboBox « Tkinker « Python Tutorial






Counter and ComboBox
from Tkinter import Button, END, Label, W

from Pmw import initialise, ComboBox, Counter

top = initialise()

ct = Counter(top, labelpos=W, label_text='Number:',
    datatype='integer', entryfield_value=2,increment=2, entryfield_validate={'validator':'integer', 'min': 2, 'max': 12})
ct.pack()

cb = ComboBox(top, labelpos=W, label_text='Type:')

for animal in ('A', 'B', 'C', 'D'):
     cb.insert(0, animal)
cb.pack()

qb = Button(top, text='QUIT',command=top.quit, bg='red', fg='white')
qb.pack()

top.mainloop()








18.8.ComboBox
18.8.1.Counter and ComboBoxCounter and ComboBox