I now see how starting the tutorial with examples using literal path names like this makes things really confusing as the Tk widgets are really Tcl commands themselves and there is no easy mapping in the Tkx:: namespace to functions that use "." their name. When you in Tcl would say:
.app.date.day configure -values {1 2 3 ... 28}
then the literal translation into Tkx would be:
Tkx::.app.date.day_configure(-values => [1..28]);
but this does not work since you can't use "." in identifiers in Perl. One way to fix this is to quote the function name and write:
&{"Tkx::.app.date.day_configure"}(-values => [1..28]);
which will work, but is just beyond ugly.
The only sane way to work with widgets in Tkx is to create Tkx::widget objects, making you code:
my $day = $date->new_ttk__combox( -values => \@days, -textvariable => \$d, ); Tkx::grid($day, ....); @days = (1 .. 28); $day->configure(-values => \@days);
I'll try to add some text to the Tkx docs to make this clearer.
In reply to Re: Tkx - configure ttk::combobox
by gisle
in thread Tkx - configure ttk::combobox
by ussuriysk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |