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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you get control while still in GET editing region.

Status
Not open for further replies.

1421

Technical User
Feb 24, 2004
69
HI!
When I am using the 'GET' editing control (@ 1,1 get xyz pict '9999'), after I exit i am using the 'valid' feature to process the inputed data. Is there a way, to access this data & perform a process, while I am still in the editing control?

Thank You
 
Unless you're using FoxPro 2.x or earlier, there's no reason to use @GET. When you use VFP's forms and controls instead, you have a lot more opportunities to run code. For example, in a textbox (the replacement for the type of @GET you showed), you can have code run both every time the user types a keystroke and every time the data in the textbox changes, as well as when the user is finished.

Tamar
 
You should follow suggestions as above.

but you could do this. the v_udf() must return true (.t.) to continue to the next get statement.

*
* -------------------------------------------------------
*
i_var = 123.45
i_var2 = 'Test'

@ 1,1 say 'Valid Clause' get i_var pict '9999.99' valid v_udf(i_var)

@ 2,1 say 'Just for Testing ' get i_var2

read

@ 20,1 say i_var
@ 21,1 say i_var2

return

Function v_udf
para p_var

@ 23,1 say p_var

return .t.
*
* --------------------------------------------------
*

try it


Nasib Kalsi
 
I have lots of problems reading correctly.
I thought, he may be using valid on the same @ SAY GET line and not calling the function.

Thanks Mike.


Nasib Kalsi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top