Checkboxes and Tortured Logic
Martin Franklin
martin.franklin at westerngeco.com
Tue Mar 19 06:20:11 EST 2002
Marc wrote:
> I know there's got to be a better way to do this than the way that I
> found. But the only way I've been able to succesfully retrieve a value
> from a checkbox (using the scant documentation I've been able to find)
>From the docs....
(pydoc Tkinter.Checkbutton)
class Checkbutton(Widget)
| Checkbutton widget which is either in on- or off-state.
|
| _Misc__winfo_getint = __winfo_getint(self, x) from Tkinter.Misc
|
| _Misc__winfo_parseitem = __winfo_parseitem(self, t) from Tkinter.Misc
|
| __getitem__ = cget(self, key) from Tkinter.Misc
|
| __init__(self, master=None, cnf={}, **kw)
| Construct a checkbutton widget with the parent MASTER.
|
| Valid resource names: activebackground, activeforeground, anchor,
| background, bd, bg, bitmap, borderwidth, command, cursor,
| disabledforeground, fg, font, foreground, height,
| highlightbackground, highlightcolor, highlightthickness, image,
| indicatoron, justify, offvalue, onvalue, padx, pady, relief,
| selectcolor, selectimage, state, takefocus, text, textvariable,
| underline, variable, width, wraplength.
.....
So I guess you need the onvalue and offvalue parameters set...
More information about the Python-list
mailing list