Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keeping the Combo1 same as Text1
Message
 
To
01/02/2001 15:45:37
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00471444
Message ID:
00471632
Views:
17
>I have several comboboxes in the grid (and all text/combo are labeled as Text1/Combo1). I have ClickEvent in the Text1 that brings the Combo1 in action. The problem is that the data of the Combo1 overlaps the "actual" data of the Text1 and those two data differs, which will confuse the users. I want to fix that by doing something like the following:
>
>*(just a make up variable name - mrp - for move record pointer)
>mrp = This.Parent.Text1 && (which would be auth.authtype)
>SELECT authtype
>LOCATE FOR mrp
>SELECT auth
>
>But it doesn't work (that way). Where do I put this? Why not in Combo1's Init (won't work)? Do I have to go by RECNO() or something? Let me put the following so you can see what's happening:
>
>Column3's CurrentControl: auth.authtype
>Text1's ControlSource: auth.authtype
>Combo1's ControlSource: authtype.authtype
>
>Text1's ClickEvent:
>IF ThisForm.Grid1.ReadOnly = .F.
> This.Parent.CurrentControl = "Combo1"
>ENDIF
>
>Combo1's LostFocus:
>This.Parent.CurrentControl = "Text1"
>
>Save's Click:
>snip
>=TableUpdate(.T.)


I think the problem here is that you are in the textbox when you set the currentcontroll to the combo. So the activecontroll is still the textbox.
You can try to set the fous outside of the grid, then change the currentcontrol and then set the focus to the combo, but i don't know if that works. Also look out, where setting focus of the grid may result in changing workareas
Previous
Reply
Map
View

Click here to load this message in the networking platform