in reply to Re^4: How to change colour of a Tkx button when pressed
in thread How to change colour of a Tkx button when pressed

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)