in reply to Tk::BrowseEntry return value

Enhance the creation of the BrowseEntry slightly, like this:
my $browseval; $mw->{a} = $mw->{main}->BrowseEntry(-label => "Select one:", -variable => \$browseval, )->pack;
Now, you don't need a sub to return the value -- as soon as the user selects something in the widget, that value is assigned to the scalar whose reference was passed to the "-variable" option.

Replies are listed 'Best First'.
Re: Tk::BrowseEntry return value
by FireBird34 (Pilgrim) on Apr 12, 2003 at 19:27 UTC
    Thanks alot for the help =) Saved me alot of trouble. Works perfectly now =)