Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: TK spread sheet color row

by aviw (Acolyte)
on Jul 09, 2017 at 15:23 UTC ( [id://1194618]=note: print w/replies, xml ) Need Help??


in reply to Re^4: TK spread sheet color row
in thread TK spread sheet color row

Not Sovled yet, when updated the row:

 t->tagRow('OddCol',$prev_selected) if (defined $prev_selected && $prev_selected != -1); # ADDED

TO:

 t->tagRow(undef,$prev_selected) if (defined $prev_selected && $prev_selected != -1); # ADDED

Now can select same row again.BUT when select row 5 post selecting row 1 I get all rows 2,3,4,5 Why?\ Isn't there normal way to do this? Do I miss something?

Replies are listed 'Best First'.
Re^6: TK spread sheet color row
by zentara (Archbishop) on Jul 09, 2017 at 15:24 UTC

      Solved solution for anyone needs:

      $table = $middle_f->Scrolled(..., -browsecommand => \&select_change, - +selcmd=> sub { return if ($is_new_row != 1); $is_new_row = 0; $table->tagRow('impair_row' ,$selected_row_number) if ($se +lected_row_number != -1); $table->tagRow(undef ,$prev_selected_row_number) if (defin +ed $prev_selected_row_number && $prev_selected_row_number != -1 && $ +prev_selected_row_number != $selected_row_number); }); #marker tag for selected row $table->tagConfigure( 'impair_row', -bg => 'gray90', -fg => 'black', -relief => 'sunken', -state => 'disabled' ); sub select_change { my ($old_cell, $new_cell) = @_; $new_cell =~/(\d+),/; $selected_row_number = $1; $old_cell =~/(\d+),/; $prev_selected_row_number = $1; $is_new_row = 1; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-04-24 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found