I wrote a gui using Tk and changed button colours successfully. I upgraded my ActiveState perl and found that Tk no longer builds correctly so I changed to Tkx. Now I can't configure a button's background colour despite finding various examples showing me that I should do as follows:
use Tkx; my $mw = Tkx::widget->new("."); my $calc = $mw->new_ttk__button(-text=>"Calculate", -command=>sub {cal +culate();}); $calc->g_grid(-column=>1,-row=>3,-columnspan=>2,-sticky=>"ew"); $calc->g_bind("<Enter>", sub {$calc->configure(-background=>'red');}); Tkx::MainLoop();
I get the following error which is fairly self-explanatory except that I understood, from what doc (mainly Tk, NOT Tkx) that it should work.
unknown option "-background" at /TestCode/configtest.pl line 5. unknown option "-background" while executing ".b configure -background red" invoked from within "::perl::CODE(0x4af0d4)" (command bound to event)
Am I attempting the impossible or do I need some other module to discover these attributes?

In reply to Limitations with Tkx configure options? by murrayn

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.