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.
In reply to Re: Binding an action to an item in a Listbox
by eoin
in thread Binding an action to an item in a Listbox
by eoin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |