Hi,
I have a simple Perl/Tkx script:
use strict;
use Tkx;
Tkx::package_require("tile");
Tkx::package_require("style");
my $mw = Tkx::widget->new(".");
my $text = "abc";
my $entry = $mw->new_ttk__entry(-width => 20, -textvariable => \$text);
$entry->configure(-font => "helvetica 14 bold");
$entry->g_grid(-column => 0, -row => 0, -sticky => 'w');
$entry->configure(-validate => 'all', -validatecommand => \&Entry);
Tkx::MainLoop();
sub Entry
{
print "Entry: '$text'\n";
return 1;
}
When I run the script, the GUI is displayed and I have "abc" in the entry
widget. I then click in the widget at the end of the text, and then type
'1', '2', '3'. I get the following output:
Entry: 'abc'
Entry: 'abc'
Entry: 'abc1'
Entry: 'abc12'
The first line prints as soon as I click in the entry widget, and the 2nd
line prints when I type '1', and so on. What do I need to do so that my
output is "abc1" after I type the '1', and "abc12" after I type the '2', and
so on?
Thanks,
David