Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Perl Tk module; optional select to result presentation

by GrandFather (Saint)
on Jan 22, 2025 at 08:37 UTC ( [id://11163805]=note: print w/replies, xml ) Need Help??


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.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11163805]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2026-01-14 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.