Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Touch Screen keypad

Status
Not open for further replies.

keithchansc

Programmer
Jan 16, 2004
13
0
0
HK
I have read Thread184-678850 about Touch Screen Application, and designed a form containing numeric key buttons to act as an on-screen numeric keypad.

However when I activate such keypad inside a textbox, VFP will trigger the current textbox's valid event, how can I avoid that ?

Keith Chan
 

Keith,

I'm not sure how you impliment a touch screen "inside a text box". Isn't your touch screen just a set of command buttons? How do you place them in a text box?

But, in any case, what code do you have in the Valid event? If you don't want it to fire, why is it there?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

May be I havn't explain detail enough - I plan to let user click the on-screen keypad when they are inputing any numeric value, eg. the invoice QTY.

At that moment, the focus is on the QTY textbox, and when user click on the keypad, focus seems need to leave the QTY textbox and goes to the on-screen keypad (because it is another VFP form), so the QTY's valid event will be fired, but is not expected at that moment.

May be I make a wrong approach? If I use a normal VFP form to impletment the on-screen keypad, I need to cater the object FOCUS issue.

Keith
 

Keith,

Your explanation is perfectly clear.

But can I just clarify: Focus is in the textbox. The user "clicks" on a keypad button, which causes focus to leave the textbox, therefore the valid event fires.

I don't see the problem with that. Are you worried about the valid event firing when the textbox is empty? If so, just test for that, and take no action:

Code:
* textbox's valid
IF EMPTY(THIS.Value)
  RETURN .T.
ELSE
  * normal validation here
ENDIF

If I still have misunderstood, my apologies.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top