PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Trapping Keystrokes, AGAIN
Trapping Keystrokes, AGAIN
Started by Rich Scheuermann, Sep., 05 2005 8:18 PM - 1 reply
Posted on September, 05 2005 - 8:18 PM
First, thanks for the replies.
Now, to be more specific, I want to set up a date entry to accept alpha characters so I can implement Quicken-Like entries. Ie, 't' = Today, '+' = next dat, '-' = previous day, etc.
How to do this?
Thanks
Posted on September, 05 2005 - 10:30 PM
G'day Rich
The problem you will have is that a date field will only accept numbers
The edit control code options for "When modified" will not work because the control date mask will not accept a letter and the "On entry" only works when you first enter the field.
You will have to implement Raimund's suggestion and use an event.
Use the additional options in the control,select the KeyDown option and use something like this
IF _EVE.wparam = 116 OR _EVE.wparam = 84 THEN // equals t or T
MySelf = DateSys()
END
You can create a global proc to test all the letters you wish to trap in date fields
Regards
Al