Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox Entry
Message
From
12/11/2008 17:19:12
 
 
To
12/11/2008 17:06:28
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01361431
Message ID:
01361505
Views:
12
>>>Ok, got that working, but still having trouble on entry of the time value. If we type "1:" it just doesn't take the ":" because the InputMask is numeric 9. I would like the cursor to jump to the character after the ":" in the entry. Any ideas?
>>
>>In keypress you can have something like
>>If nKeyCode>0 and chr(nKeyCode)=':' and this.selstart<4
>>   this.selstart=4
>>Endif
>
>That's exactly what I did and it works great, except (isn't there always one?)...
>
>If I enter this:
>
>9:15 PM
>
>The result is this:
>
>9 : 1 5M
>
>I think what is happening is that the InputMask still feels that the 3rd key press (9,colon,1) - although it is starting after the colon - is a space. Or something like that. I haven't quite figured it out yet.

I assume that your combobox is character? If so, you can change the value also
If nKeyCode>0 and chr(nKeyCode)=':' and this.selstart<4
   this.value=transform(chrtran(this.value),':',''),'@R 99:99') && + ' AM' or ' PM', you must add logic for this also!
   this.selstart=4
Endif
Previous
Reply
Map
View

Click here to load this message in the networking platform