Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Master File Lookup
Message
From
12/07/2001 07:35:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/07/2001 03:39:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00528517
Message ID:
00529608
Views:
9
>Now, I am facing 2 problems.
>How can I write an intelligent ON KEY LABEL command in my main form, which will pass the proper parameter from any textbox to this form?
>How can I update the textbox in the calling form with the value selected from the lookup form?

The Container with the lookup field, which you place on each form, should be designed as a class. This allows you to make certain changes only once.

Instead of ON KEY, intercept KeyPress. For instance, the framework I use intercepts the F9 key.
#DEFINE KEY_F9 -8

*Relevant parts of KeyPress() Event:
LPARAMETERS nKeyCode, nShiftAltCtrl

DODEFAULT(nkeycode,nshiftaltctrl)

IF nkeycode = key_f9 AND nshiftaltctrl = 0
	* Call PickForm here
	NODEFAULT
ENDIF
For the key codes, see HELP INKEY().

As to the second question, you call a modal form like this:
do form SelectFromList with <value> to <returnvalue>
is the parameter you pass; is a value to which the value is returned.

The form returns a value in its .Unload() Event. Pressumably, this value has to be stored in a property first.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform