Glenn, I know that accelerator tables are broken and that you've put a
lot of work into figuring out why. I could never get them to work at all;
will this work now or just when the long-awaited fix is released? If it
will work now, would you please post a snippet of code so I can see what
I'm doing wrong?
Thanks,
Glenn Munroe
>Hi, the overall effect can also be achieved via accelerator keys...=20
>define Enter as an accelerator key.
>On approximately 11/26/2003 4:07 PM, came the following characters from
>the keyboard of Steve Pick:
>> Hi,
>>=20
>> I've just submitted an addition for Win32::GUI v0.0.665 which adds the
>> keycode and extra info as arguments to the onKeyDown handler. This allo=
>ws
>> you to do this, to create a single-line text entry field which detects =
>a
>> press of the Enter key.
>>=20
>> my $textfield =3D new Win32::GUI::Textfield ($win,
>> -name =3D> "textfield1",
>> -left =3D> 0,
>> -top =3D> 0,
>> -width =3D> 100,
>> -height =3D> 20
>> -multiline =3D> 1,
>> -autohscroll =3D> 1,
>> -autovscroll =3D> 0,
>> -onKeyDown =3D> \&keydown,
>> );
>>=20
>> sub keydown {
>> my ($additional_data,$keycode) =3D @_;
>> if($keycode =3D=3D 13) {
>> print "Enter has been pressed.\n";
>> }
>> }
>>=20
>> Hopefully this will be included in the next CVS update, and will allow =
>you
>> to get Enter presses without using that nasty "default button" method.
>>=20
>> Steve