Dear monks
I need a user to select from multiple dropdown menus always different values. In the example below I have 2 dropdoen menus (Tk::JComboBox) with language abbreviations. If the user picks "en" in the first dropdown, the same value should be not clickable in the second one (or the other way round)? Any Idea?
#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::JComboBox; my $mw = MainWindow->new; my $lang1; my $lang2; my $drop1 = $mw->JComboBox( -textvariable => \$lang1, -choices => [qw(en fr de it sp)], -entrybackground => 'white', -background=> 'white', -disabledbackground=>'grey', -autofind => { -enable => 1 }, )->pack(); my $drop2 = $mw->JComboBox( -textvariable => \$lang2, -choices => [qw(en fr de it sp)], -entrybackground => 'white', -background=> 'white', -disabledbackground=>'grey', -autofind => { -enable => 1 }, )->pack(); MainLoop;
In reply to Multiple Tk::JComboBox with unique values selectable by welleozean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |