> > If I try something like:
> >    $g_widgets{EntryTheme} = Tkx::ttk__style_configure("Red.TEntry",
> > -background => "red");
> > I get:
> >    invalid command name "ttk::style" at ...
> > I took the ttk__style_configure() from the tutorial at 
> > http://www.tkdocs.com/tutorial
> 
> That works for me.  Are you still using the older Tkx?  Do 
> you have the 'tile' package in use in that case?  I would 
> recommend using the latest ActivePerl though to keep it most 
> consistent with docs and examples that will mostly be Tk 8.5 based.
> 
> Jeff
> 
I'm using Perl 5.8.8, with Tk 8.4.15.  Is there support for specifying
and using a different style in 8.4.15?

The following script causes an error: "ttk::style" at
D:\dss\perl\tk\tkx\entry4.pl line 19."


use strict;
use Tkx;
Tkx::package_require("tile");
Tkx::package_require("style");

my $mw = Tkx::widget->new(".");

my $text1 = "hello world";
my $text2 = "2nd entry widget";

my $entry1 = $mw->new_ttk__entry(-width => 20, -textvariable =>
\$text1);
$entry1->configure(-font => "helvetica 14 bold");
$entry1->g_grid(-column => 0, -row => 0, -sticky => 'w');

my $entry2 = $mw->new_ttk__entry(-width => 20, -textvariable =>
\$text2);
$entry2->configure(-font => "helvetica 14 bold");
$entry2->g_grid(-column => 0, -row => 1, -sticky => 'w');

Tkx::ttk__style_configure("Red.TEntry", -background => "red");
$entry2->configure(-style => "Red.TEntry");

Tkx::MainLoop();


The scripts I write are used by many others in locations around the
world.  Everyone is expected to use the same version of tools (hundreds
of engineers).  This version of Perl was decided on before I started
here and I don't think they will want to force everyone to upgrade their
versions of Perl just so I can make some entry widgets have a red
background.  Right now instead of displaying an entry with the
background changed, I change the foreground.  It does not have the
effect I would like, but if I can't change the background of the themed
entry, then either I need to use the un-themed version or give up on
changing the background.

-- dss

Reply via email to