Home > Archive > PerlTk > March 2005 > Activating another keys binding
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Activating another keys binding
|
|
| Troy.A Johnson 2005-03-01, 8:58 pm |
| Greetings Perl/Tk-ers,
Is there a good way to activate the bindings of
on button ("Return") from another ("KP_Enter")?
Is there some magic in the binding of '<Return>'?
With a few widgets (Entry, Text, Optionmenu) we
have been getting behavior from '<Return>' that
we cannot seem to replicate in '<KP_Enter>'.
I hope this isn't another "Captain Obvious" sort
of question, and I will be thankful for any help
you can provide. Thanks,
Troy Johnson
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
| |
| zentara 2005-03-02, 4:02 pm |
| On Tue, 1 Mar 2005 22:29:48 +0000 (UTC), "Troy.A Johnson"
<troy.johnson@health.state.mn.us> wrote:
>Greetings Perl/Tk-ers,
>
>Is there a good way to activate the bindings of
>on button ("Return") from another ("KP_Enter")?
>
>Is there some magic in the binding of '<Return>'?
>With a few widgets (Entry, Text, Optionmenu) we
>have been getting behavior from '<Return>' that
>we cannot seem to replicate in '<KP_Enter>'.
>
>I hope this isn't another "Captain Obvious" sort
>of question, and I will be thankful for any help
>you can provide. Thanks,
>
>Troy Johnson
Usually you just setup the binding to call the same
callback that is called by <Return>.
Can you post a simple little example that demonstrates
the problem, which you are trying to solve?
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
| |
| Ala Qumsieh 2005-03-02, 8:58 pm |
| Troy.A Johnson wrote:
> Greetings Perl/Tk-ers,
>
> Is there a good way to activate the bindings of
> on button ("Return") from another ("KP_Enter")?
>
> Is there some magic in the binding of '<Return>'?
> With a few widgets (Entry, Text, Optionmenu) we
> have been getting behavior from '<Return>' that
> we cannot seem to replicate in '<KP_Enter>'.
Without a sample script, I can't really understand what you're asking
for. If you want to trigger a <Return> event from within another one,
you can try this:
$widget->eventGenerate('<Return>');
within your <KP_Enter> callback. Perhaps it'll do the trick.
--Ala
|
|
|
|
|