That doesn't make any sense, but maybe the context of where
you are using those lines would change my opinion.
You say you want to react to the USER selecting .radB, but here
you force selection yourself with [".radB" select], so it seems
you understand it backwards. What you want instead is to perform
the action using the -command option on the radiobuttons. You
probably should NOT create and destroy the entry box repeatedly,
but enable and disable it:
entry .txt -textvariable val -state normal -width 8
radiobutton .radA -variable select -value A -text "A" -width 5 -command txtena
radiobutton .radB -variable select -value B -text "B" -width 5 -command txtena
proc txtena { } {
.txt configure -state [expr { $::select eq "B" ? "normal" : "disabled" }]
}
--
Donald Arseneau
as...@triumf.ca