g_speran has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Tk; my $lst_properties; my $chk_options; my $chkoptions; my $MainWindow; &maingui; sub maingui { $MainWindow = MainWindow->new(-title=>'Listbox'); $chk_options = $MainWindow -> Checkbutton ( -anchor=>'nw', -justify=>'left',-relief=>'flat', -indicatoron=>1,-text=>'Additional Criteria', -variable=>\$chkoptions, -state=>'normal', -command=>\&Additional_Criteria ) -> grid(-row=>1,-column=>0,-pady=>5); $lst_properties= $MainWindow -> Scrolled ( 'Listbox', -selectmode=>'single', -relief=>'sunken', -scrollbars=>'osoe',-width=>50,-state=>'disabled'); $lst_properties -> insert('end',"People","Animals","Aliens","Meat" +, "Fruit","Vegies","Dairy","Pultry", ); $lst_properties -> grid(-row=>5,-column=>1,-pady=>3); MainLoop; } sub Additional_Criteria { #code her to test if check box is selected or not if ($chkoptions) { print "Enable\n"; #Code here to ENABLE ListBox } else { print "Disable\n"; #Code here to DISABLE ListBox } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk::ListBox questions
by zentara (Cardinal) on Mar 17, 2008 at 13:51 UTC | |
by g_speran (Scribe) on Mar 17, 2008 at 14:39 UTC | |
by zentara (Cardinal) on Mar 17, 2008 at 14:57 UTC | |
|
Re: Tk::ListBox questions
by moritz (Cardinal) on Mar 17, 2008 at 12:31 UTC | |
by g_speran (Scribe) on Mar 17, 2008 at 13:32 UTC | |
|
Re: Tk::ListBox questions
by moritz (Cardinal) on Mar 17, 2008 at 13:53 UTC | |
by g_speran (Scribe) on Mar 17, 2008 at 14:35 UTC | |
|
Re: Tk::ListBox questions
by zentara (Cardinal) on Mar 17, 2008 at 13:44 UTC |