in reply to Binding an action to an item in a Listbox
I also tried this.$name = $bf->Entry(-textvariable => \$filename); my $button = $bf->Button( -command => \&load, -text => 'Open'); $tf->pack(-side => 'top'); $bf->pack(-side => 'bottom'); $ListBox->pack(qw/-side left -fill both -expand 1/); $name->pack(-anchor => 's'); $button->pack(-anchor => 'se'); } sub load{ my ($index) = $ListBox->curselection(); $filename = $ListBox->get($index); $mw->configure(-title => 'TextEd - ' . $filename); [ $open => 'destroy']; $InputText->Load( $filename ); (my $script = $0) =~ s,.*(\/|\\),,; }
I'm kina running ow on ideas..$name = $bf->Entry(-textvariable => \$filename); my $button = $bf->Button( -command => \&load, -command =>[ $open => 'destroy'], -text => 'Open'); $tf->pack(-side => 'top'); $bf->pack(-side => 'bottom'); $ListBox->pack(qw/-side left -fill both -expand 1/); $name->pack(-anchor => 's'); $button->pack(-anchor => 'se'); } sub load{ my ($index) = $ListBox->curselection(); $filename = $ListBox->get($index); $mw->configure(-title => 'TextEd - ' . $filename); $InputText->Load( $filename ); (my $script = $0) =~ s,.*(\/|\\),,; }
If everything seems to be going well, you obviously don't know what the hell is going on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Binding an action to an item in a Listbox
by tall_man (Parson) on Apr 18, 2003 at 15:19 UTC |