GrandFather has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to use an equivelent to Window's combo box which combines an edit control and a drop-down list box. At present I'm using an Optionmenu, but it jars somewhat in a Windows environment and doesn't offer a combined edit control. I'd like to switch code similar to the sample code to use a combo box type control that had a rather more Windows look and feel.
use strict; use warnings; use Tk; my $main = MainWindow->new (-title => "Optionmenu demo"); my $id = 'Some different one'; my $IDLabel = $main->Label (-text => 'ID name: ', -anchor => 'w'); my $IDText = $main->Optionmenu ( -height => 1, -width => 40, -variable => \$id, ); $IDLabel->form (-left => '%0', -right => $IDText, -top => '%0'); $IDText->form (-right => '%100', -top => '%0'); $IDText->configure (-options => ['This one', 'That one', 'The other on +e']); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk equivelent of Window's combo box
by zentara (Cardinal) on Jun 10, 2006 at 11:00 UTC | |
|
Re: Tk equivelent of Window's combo box
by vkon (Curate) on Jun 10, 2006 at 12:16 UTC |