Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Varying font settings within a cell in Tk::TableMatrix?

by elef (Friar)
on May 31, 2013 at 18:30 UTC ( #1036289=perlquestion: print w/ replies, xml ) Need Help??
elef has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, the title says it all. Is it possible to display text in TableMatrix so that, say, the fifth word is in a pink font or has a yellow background? I remember seeing sample code for doing this in some other Tk widget (probably label or something basic like that) but I can't remember where I saw it and I have no idea if the same approach would work in TableMatrix.
(Background: I plan to use TableMatrix to display the results of a text lookup and I would like to highlight the matched word/expression.)

Comment on Varying font settings within a cell in Tk::TableMatrix?
Re: Varying font settings within a cell in Tk::TableMatrix?
by elef (Friar) on Jun 02, 2013 at 07:23 UTC
    No comment from anyone?
    One solution I thought of is to put Label widgets in every cell, which TableMatrix supports out of the box. Then if I can find the code for putting mixed fonts in labels, I'm all set. It would probably be simpler and more efficient to do this within TableMatrix, of course.

      No comment from anyone?

      <Nelson Muntz>Ha-ha!</Nelson Muntz>

      It would probably be simpler and more efficient to do this withing TableMatrix, of course.

      The docs don't show that its possible, although it might be :) its not

      So stick a Tk::Text into a cell and there you go, $table->get('row,col') then tagAdd/tagConfigure ... in theory

      Or patch/extend Tk-TableMatrix-1.23\pTk\tkTableTag.c and ... c-fudge :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-12-20 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (97 votes), past polls