The prosaic description you've presented is insufficient for us to provide any concrete help; what we really need is a SSCCE.

There are many ways colours may be initially specified. See Tk::options for items listed under STANDARD OPTIONS at the start of TableMatrix, and the remainder of that documentation for other options. There are also a variety of ways you may query and change colours: search for names that are, or include, cget and configure in both of those documents. Your post does not contain information about how you've used any of these.

We also have no idea about your cell data: hard-coded text; text derived from some expression; embedded windows; or something else. This may be relevant to your problem but it's impossible to say at this point.

Please keep your SSCCE short and to the point. A table consisting of a 3x3 matrix is probably sufficient. Your issue revolves around colours; we don't need to see options such as -bd, -relief, -ipady, -anchor, and so on. Your SSCCE needs to be runnable code that reproduces your problem; it must include the strict and warnings pragmata.

It is often the case that writing an SSCCE that focusses on a specific problem will actually highlight the issue and present a solution. However, if that's not the case, the information requested should be sufficient for someone here to help you.

— Ken


In reply to Re: Tk TableMatrix programmatically select row (color) by kcott
in thread Tk TableMatrix programmatically select row (color) by Anonymous Monk

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.