[GiDlist] Know if checkbutton is selected

An embedded and charset-unspecified text was scrubbed…
Name: not available
Url: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20051222/493e2b1e/attachment.txt
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20051222/493e2b1e/attachment.htm

You used the checkbutton with a linked variable: -variable ::tkpoint::x
then this global variable store the current value, use
$::tkpoint::x

If you assign other value (like set ::tkpoint::x 1), the checkbutton will also reflect this result

Enrique
----- Original Message -----
From: ascosta at portugalmail.pt
To: gidlist at gid.cimne.upc.es
Sent: Thursday, December 22, 2005 4:17 PM
Subject: [GiDlist] Know if checkbutton is selected


Hi!

I have defined a checkbutton like this:

set c1 [checkbutton $parent.c1 -text “X:” -variable tkpoint::x ]

proc ::tkpoint::setvarx { } {
global ProblemTypePriv
variable x
set x $value
return “”
}

How can i get the value 0 or 1 (checkbutton selected or deselected)?
If checkbutton is selected i introduce one value in a table; if is deselected i don’t introduce nothing.

It’s possible to obtain that values?

$c1 *** ?

Thank you.


-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20051222/dda8e843/attachment.htm