in reply to Binding Events In Perl TK
Of course you can get fancy in your blacken sub, and test for the state of the radiobutton, and unblacken if it is blackened already. But I'm clueless as to why you want to do this? If you could be more specific, as to what your desired intent is, we can help more.my $rb1 = $mw->Radiobutton(-text => "Button One", -value => 'button1', -variable => \$rb, -command => [ \&blacken, '$entry1'])->pack +; my $rb2 = $mw->Radiobutton(-text => "Button Two", -value => 'button2', -variable => \$rb, -command => [ \&blacken, '$entry2'])->pack +; sub blacken { my $entry = shift; $entry->configure(-backround => 'black'); #maybe you want #$entry->configure(-state => 'disabled') }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Binding Events In Perl TK
by qumsieh (Scribe) on Aug 27, 2004 at 22:30 UTC |