Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I have the following code that I can't seem get to of work. I can get the items to display in the GUI and I can't get my selected variables back. Here's a snippet of code:</p?

my $CB = $mw->ComboBox( -textvariable=>\my $combobox, -values => "SF S +D LA All")->pack(-side=>'left', -anchor=>'n'); $CB->bind("<<ComboboxSelected>>", {scriptCombo() }); $CB->grid( -row => 8, -column => 1, -columnspan => 1 ); #$CB->cget( -values); $CB->cget(-command); $CB->configure; my $lbox = $mw->ListBox( -height => 5); $lbox->bind("<<ListboxSelect>>", sub {scriptCombo()}); $lbox->bind("<Double-1>", sub {scriptCombo()}); $mw->bind("<Return>", sub {scriptCombo()}); $lbox->grid( -row => 8, -column => 2, -columnspan => 1 );

Any help is greatly appreciated

Replies are listed 'Best First'.
Re: Can't seem to get combo box and list box or tick box to work
by choroba (Cardinal) on Apr 21, 2016 at 13:45 UTC
    What GUI library do you use? It seems Tk::ComboBox doesn't exist...

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      I'm using Tcl::Tk