[Patches] [ python-Patches-1774370 ] Add Tkinter.Checkbutton get() and set(value)

SourceForge.net noreply at sourceforge.net
Thu Aug 16 00:38:35 CEST 2007


Patches item #1774370, was opened at 2007-08-14 23:38
Message generated for change (Settings changed) made by grahamh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1774370&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tkinter
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Graham Horler (grahamh)
Assigned to: Martin v. Löwis (loewis)
>Summary: Add Tkinter.Checkbutton get() and set(value)

Initial Comment:
Add get() and set(value) methods to the Checkbutton class, providing access to the default variable created by Tk.

See man checkbutton(3tk).

The get() and set(value) method names are analogous to those in the Variable class.

When using get() and set(), you do not have to create a XyzVar instance to pass to a Checkbutton's 'variable' attribute.

This is much simpler and more intuitive, and also avoids leaking the default variable.

If you do override the 'variable' attribute, the get() and set(value) also give access to your new variable.

Setting 'onvalue' and 'offvalue' also work as expected.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1774370&group_id=5470


More information about the Patches mailing list