Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AfterSelected - Combobox ?
Message
 
 
To
17/04/2001 16:06:12
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00496351
Message ID:
00496376
Views:
9
>What Event to use to ThisForm.Text1.SetFocus() after the combobox has been selected (by mouse or keyboard)? In other words, after picking the item from the combobox list, I want to take the cursor to the entry box (Text1).
>
>Thanks.

Your best be is in the LostFocus. If the text box is before the combo in your Tab order, then your users will never be able to tab through all the form controls. As soon as they hit Tab in the combobox, they will be sent backward to the text box. THis can be very annoying and frustrating to a user.

If I were you, I would only do this if the value of the combo box is changed from its value when the user entered the control. Use the GotFocus to set the current value, then check the value of the combo in the LostFocus.
Procedure GotFocus
if not pemstatus(This, 'cOldValue', 5)
   This.AddProperty('cOldValue', '')
endif
This.cOldValue = alltrim(upper(This.DisplayValue))

Procedure LostFocus
if alltrim(upper(This.DisplayValue)) <> This.cOldValue
   This.Parent.TextBox.SetFocus()
endif
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform