radiobutton
Closed / Invalid7f08437314ca213f6ec5309d446addff5b33ecdfCreated 8 years agoUpdated 8 years ago
Descriptionplain2018-09-14 16:51:15
frame .t
pack .t
set reptype 0
radiobutton .t.r1 -text "1" -variable reptyp -value 1
radiobutton .t.r2 -text "2" -variable reptyp -value 2
radiobutton .t.r3 -text "3" -variable reptyp -value 3
radiobutton .t.r4 -text "4" -variable reptyp -value 4
radiobutton .t.r5 -text "5" -variable reptyp -value 5
radiobutton .t.r6 -text "6" -variable reptyp -value 6
bind .t.r1 <Double-1> {Chk_Alone $reptyp}
bind .t.r2 <Double-1> {Chk_Alone $reptyp}
bind .t.r3 <Double-1> {Chk_Alone $reptyp}
bind .t.r4 <Double-1> {Chk_Alone $reptyp}
bind .t.r5 <Double-1> {Chk_Alone $reptyp}
bind .t.r6 <Double-1> {Chk_Alone $reptyp}
grid .t.r1
grid .t.r2
grid .t.r3
grid .t.r4
grid .t.r5
grid .t.r6
proc Chk_Alone {args} {
global reptyp
#tk_messageBox -message "unselected"
after idle [.t.r$args deselect ]
}
#is a short exemple deselect not work, work only if tk_message is not a comment
sebresplain2018-09-14 17:21:55
This is the TCL-lang repository, for Tk issues please reopen in https://core.tcl-lang.org/tk/ Additionally, it looks like you want to write instead of: - after idle [.t.r$args deselect] something like: + after idle [list .t.r$args deselect] (because otherwise the statement in brackets will be executed immediately, and then the result of the invocation supplied to `after idle` as command. Also note, that `after ...` expects an entering of the event-cycle to process event (so may needs an update process e. g. via update/vwait/etc)... Thus closed.
sebres Closed ticket [7f08437314].
[History diff]2018-09-14 17:22:11
Log in (anonymous is fine) to add a comment.