This is driving me crazy. I have a text field that I have absolutely no interest in ever entering an actual tab character into. I want Tab to shift the focus to the next widget, but I cannot get this to work. I have the following code:
my $t1 = $mw->Text(
-background=>"navy",
-foreground=>"white",
-height=>35,
-width=>80,
-wrap=>"word",
-selectbackground=>"blueviolet"
);
my $e2 = $mw->Entry(
-background=>"navy",
-foreground=>"white",
-width=>80,
-textvariable=>\$description,
-selectbackground=>"blueviolet"
);
$t1->bind("<Tab>", sub { $e2->focus });
Now I have replaced Tab with Ctrl-q, and then when I Ctrl-q I get a control character printed, and the desired focus shift. But when I go back to Tab, I get a tab, and no focus shift. What do I have to do to rebind Tab to my wishes? If it's not possible to rebind Tab, how do I bind a character without the character printing in my Text field?
--
Believe nothing, no matter where you read it, or who said it - even if I have said it - unless it agrees with your own reason and your own common sense.
(Buddha)