A
Alexander Farber
Hi,
I have a long scrolled list with a "Save"-button on the bottom.
Each row of the list contains an Optionmenu and an "Info"-button:
my $option = $frame->Optionmenu(-options =>
[
[ "not selected", undef ],
map({ [$module->{vhash}->{$_}, $_] }
@{$module->{vlist}})
],
-variable => \$module->{selected})
->grid(-row => $row,
-column => 2,
-sticky => 'nsew');
$option->setOption($module->{vhash}->{$selected}, $selected)
if $selected;
$frame->Button(-text => 'More info...',
-command => [ \&ShowInfoWindow, $top, $name ],
)->grid(-row => $row,
-column => 3);
I'd need to pass the currently selected option in
the $option above to the button's callback ShowInfoMenu().
So that a user would select an option in the Optionmenu,
click the "More info..." button, read the information
for exactly that selected option and then maybe change
his mind and select some other option before finally clicking
the "Save" button.
So is there a way to get that through the $option please?
Regards
Alex
I have a long scrolled list with a "Save"-button on the bottom.
Each row of the list contains an Optionmenu and an "Info"-button:
my $option = $frame->Optionmenu(-options =>
[
[ "not selected", undef ],
map({ [$module->{vhash}->{$_}, $_] }
@{$module->{vlist}})
],
-variable => \$module->{selected})
->grid(-row => $row,
-column => 2,
-sticky => 'nsew');
$option->setOption($module->{vhash}->{$selected}, $selected)
if $selected;
$frame->Button(-text => 'More info...',
-command => [ \&ShowInfoWindow, $top, $name ],
)->grid(-row => $row,
-column => 3);
I'd need to pass the currently selected option in
the $option above to the button's callback ShowInfoMenu().
So that a user would select an option in the Optionmenu,
click the "More info..." button, read the information
for exactly that selected option and then maybe change
his mind and select some other option before finally clicking
the "Save" button.
So is there a way to get that through the $option please?
Regards
Alex