Hi,

I'm not cowboy :)

The  Tkx::pack(".s");... syntax cowboy using is very cumbersome , if you're going to do that, might as well just write it in tcl with the "secret"  Tkx::eval('tcl source code here'); , its a tiny bit less cumbersome than Tkx::i::call, but you gotta learn Tcl syntax

Yes Tkx::pack... is the first syntax explained in Tkx::Tutorial (a tutorial which must not be skipped), but don't choose that syntax :)

Also if you insist on Tkx don't skip http://www.tkdocs.com/tutorial/onepage.html

$Tkx::TRACE = 64; use Tkx; ... ## create button my $b = $mw->new_ttk__button( -text => 'Hello, world', -command => sub { $mw->g_destroy; }, ); $b->g_pack; ## retrieve existing button by name (button created using Tkx::eval()) ## my $b = Tkx::widget->new(".b"); ## Tkx::i::call(".b", "configure", "-background", "blue"); ## Tkx::eval(".b configure -background blue"); $b->configure( -background => "blue")

doc chain is usually http://docs.activestate.com/activeperl/5.22/lib/Tcl/tkkit.html ... http://docs.activestate.com/activetcl/8.5/tcl/TkCmd/ttk_button.htm .. http://docs.activestate.com/activetcl/8.5/tcl/TkCmd/options.htm#M-background, http://docs.activestate.com/activetcl/8.5/tcl/TkCmd/ttk_style.htm

My feelings on tkx Re: Is there a Tk to Tkx translator script? (Tk, Tcl::pTk)


In reply to Re^5: How to change colour of a Tkx button when pressed by Anonymous Monk
in thread How to change colour of a Tkx button when pressed by PerlCowboy

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.