Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Programmatically select row in Tk Tablematrix

by Anonymous Monk
on Nov 15, 2021 at 20:51 UTC ( [id://11138851]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
short question: is there a way to programmatically select a row in a Tk Tablematrix? The following:

$Table->activate('2,2');

does not produce any selection, either cell nor row. And how how to highlight multiple rows? The documentation gives me no suggestions.

Replies are listed 'Best First'.
Re: Programmatically select row in Tk Tablematrix
by choroba (Cardinal) on Nov 15, 2021 at 21:14 UTC
    activate only activates a single cell. Try selectionSet instead:
    $Table->selectionSet('1,1', '4,5');
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-24 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found