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:In reply to Tkx ttk problem by igoryonya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |