in reply to Perl Tk module; optional select to result presentation
Not quite sure what you are wanting to achieve, but it sounds like you want to populate label and text widgets from %IdxToNickNameSel and possibly update those widgets as checkbutton values change. If that is the case then probably the easiest way to do that is write a sub that configures the contents of the labels and test widgets from the hash. You then call that sub to populate the widgets to start with, then again whenever contents change.
To get the update to happen on content change you need to add a -command handler to each checkbutton:
my $cb = $frame_pids->Checkbutton( -text => sprintf("%-15s",$pid_nickname), -variable => \$IdxToNickNameSel{$k}, -font => ['courier', 10, 'bold'], -command => sub {Refresh($k)} );
This is untested code! The idea is whenever the Checkbutton changes Refresh is called with the appropriate key as a parameter.
|
---|