Here it is a basic one. I want to apply my formatting only to the string "world"

#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::TableMatrix; my $ArrayWidget; my $mw = new MainWindow(); my $FontBold = $mw->Font( -weight => 'bold'); my ($rows,$cols) = (50, 4); foreach my $row (0..$rows){ $ArrayWidget->{"$row,0"} = "$row"; } foreach my $col (0..$cols){ $ArrayWidget->{"0,$col"} = "$col"; } my $table = $mw->Scrolled('TableMatrix', -state=>'disabled', -rows => $rows, -cols => $cols, -colwidth => 20, -height => 6, -titlerows => 1, -titlecols => 1, -variable => $ArrayWidget, -wrap=>1, -multiline=>1, -scrollbars => 'osoe', -relief => 'flat', -selecttitles => 0, -highlightthickness=>0 )->pack(); $table->tagConfigure ("bold", -bg => "#689bc0"); $ArrayWidget->{"2,2"} = "Hello world"; #Apply tag bold or different font to the string "world", i.e. not to t +he entire cell 2.2 MainLoop();

In the mean time I came to the conclusion that this feature is not supported and that I need to insert in any cell another Widget supporting formatting. The question is if the table becomes to "heavy"/unstable if it grows in size and is frequently changed.

In reply to Re^2: Tk TableMatrix format part of cell by Anonymous Monk
in thread Tk TableMatrix format part of cell by IB2017

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":