igoryonya has asked for the wisdom of the Perl Monks concerning the following question:
It gives me an error:#http://habrahabr.ru/blogs/perl/65774/ use Tkx; my $mw = Tkx::widget->new('.'); #Main Window #buttons my @btns = ( $mw->new_ttk__button(-text=>'button 1'), $mw->new_ttk__button(-text=>'button 2'), $mw->new_ttk__button(-text=>'button 3') ); #Place elements (buttons) in table grid #column x row coordinates $btns[0]->g_grid(-row=>0, -column=>0); $btns[1]->g_grid(-row=>0, -column=>1); $btns[2]->g_grid(-row=>1, -column=>1); #Event Loop Tkx::MainLoop();
invalid command name "ttk::button" at "script.pl" line ##When I add after
the following:use Tkx;
It gives me an error that it cannot find the "ttk" package:Tkx::package_require('ttk');
can't find package ttk at "script.pl" line ##Either way, I tried to capitalize "Ttk". Same thing happens.
And it works that way, but I figure that ttk is the package that allows for themed widgets, but when I use regular button, as I did in the last code above, it is a standard blocky widget.use Tkx; my $mw = Tkx::widget->new('.'); #Main Window #buttons #used to be: #$mw->new_ttk__button(-text=>'button 1') #now: #$mw-> new_button(-text=>'button 1') my @btns = ( $mw->new_button(-text=>'button 1'), $mw->new_button(-text=>'button 2'), $mw->new_button(-text=>'button 3') ); #Place elements (buttons) in table grid #column x row coordinates $btns[0]->g_grid(-row=>0, -column=>0); $btns[1]->g_grid(-row=>0, -column=>1); $btns[2]->g_grid(-row=>1, -column=>1); #Event Loop Tkx::MainLoop();
Does anybody know how the person that made the example with ttk, managed it to work?
I have:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tkx ttk problem
by Anonymous Monk on Dec 23, 2009 at 20:09 UTC | |
by igoryonya (Pilgrim) on Dec 24, 2009 at 07:58 UTC | |
by Anonymous Monk on Dec 24, 2009 at 08:25 UTC | |
by igoryonya (Pilgrim) on Dec 24, 2009 at 08:17 UTC | |
|
Re: Tkx ttk problem
by Gangabass (Vicar) on Dec 24, 2009 at 01:32 UTC | |
by Anonymous Monk on Dec 24, 2009 at 02:18 UTC |