For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > March 2007 > Deleting tag from TableMatrix cell









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Deleting tag from TableMatrix cell
Joy

2007-03-14, 7:07 pm

Hi All,
I can add tag to a table matrix cell using this following code.

$tableMatrix->tagCell( 'sort_up', "0,$c" );
$tableMatrix->tagConfigure( 'sort_up', -image => $s_up_img , -showtext
=> 0 );

Where $c is the column no.
But is there any way to remove tag from a particular cell of table
matrix?
Please let me know if any.

Thanks and regards,
Joy

Ch Lamprecht

2007-03-14, 7:07 pm

Joy wrote:
> Hi All,
> I can add tag to a table matrix cell using this following code.
>
> $tableMatrix->tagCell( 'sort_up', "0,$c" );
> $tableMatrix->tagConfigure( 'sort_up', -image => $s_up_img , -showtext
> => 0 );
>
> Where $c is the column no.
> But is there any way to remove tag from a particular cell of table
> matrix?
> Please let me know if any.

Hi Joy,

simply call tagCell with an empty string instead of a tag:

Christoph


use strict;
use warnings;
use Tk;
require Tk::TableMatrix;

my $mw = MainWindow->new();
my $t = $mw->TableMatrix->pack;
$t->tagConfigure('bg_yellow',-background => 'yellow');
$t->bind('<1>',['tagCell','bg_yellow','@0,0']);
$t->bind('<3>',['tagCell','','@0,0']);
MainLoop();



--
use Tk;use Tk::GraphItems;$c=tkinit->Canvas->pack;push@i,Tk::GraphItems->
TextBox(text=>$_,canvas=>$c,x=>$x+=70,y=>100)for(Just=>another=>Perl=>Hacker);
Tk::GraphItems->Connector(source=>$i[$_],target=>$i[$_+1])for(0..2);
$c->repeat(30,sub{$_->move(0,4*cos($d+=3.16))for(@i)});MainLoop
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com