I tried to modify some code I found on the list to do the key trapping, but
my text fields don't seem to fire KeyDown events, as near as I can tell.
I'm hoping someone can tell me what stupid mistake I'm making in this code:

$bc = $confwin->AddTextfield(
 -name=>"bc",
 -password=>0,
 -prompt => ["Barcode:",-50],
 -pos=>[100,25],
 -tabstop=>1,
 -size=>[150,20],
 -visible=>1);

sub bc_KeyDown()
{
print "IN KEYDOWN!\n";
}

I can launch the app, but when I type anything in the bc text field, I don't
get anything printed to the console as I'd expect it to be.


----- Original Message ----- From: "Scott Spearman" <[EMAIL PROTECTED]>
To: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Wednesday, April 05, 2006 8:47 AM
Subject: [perl-win32-gui-users] Enter key to move between text fields


I appologize in advance for my ignorance... I'm not a GUI programmer, have never been a GUI programmer, and will probably never BE a GUI programmer.

Somehow, this doesn't matter to managment.

I'm writing a program used for data-entry. The vast majority of data will be input using the number pad. What I'd like to do is be able to use the enter key to move from one text field to the next, ie it starts at the top field, I type a 1 <ENTER> and it moves to the second field, and so on, until you get to the end, where enter fires off a function that submits the form.

I don't have all that many text fields, so putting an individual key trap on each of the controls, that just moves focus to the next one, would be just fine, I'm just not sure of the best way to do this. Any help would be appreciated.

Thanks!


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/


Reply via email to