ScottA opened this issue on Feb 25, 2001 ยท 39 posts
jcarp posted Sat, 24 March 2001 at 4:14 PM
bushi, You are, of course, very wise in avoiding Pmw in this context, for all the reasons you mention. You can, though, look to Pmw for hints on packaging Tk widgets. I suspect you're pretty much home on check buttons, but I'll give a simple example a shot (and I can learn how Tk buttons really work at the same time). Who knows, maybe even today. The basic idea's going to be: allocate a button for each item on the list and give yourself some way to associate the button with the list item. Something like:
buttonlist = []
for item in arbitrarylist:
abutton = Checkbutton(...)
buttonlist.append(abutton)
#now the buttons on buttonlist correspond to the items
#on arbitrarylist. item arbitrarylist[i] is for button buttonlist[i].
#To display:
for button in buttonlist:
button.pack(...) #or grid() or place()
Anyway, I'll come back with something that actually works. As a class, even. Soon. Soon, I tell you. Of course, if I'm like totally not getting what you need to see, let me know at your earliest convenience.