Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box opening mid list
Message
From
15/10/2010 14:47:17
 
 
To
15/10/2010 14:41:18
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01485471
Message ID:
01485641
Views:
34
>But do that only if the .displayvalue is empty; if it's not, maybe some location related to the value would be better ("equal to" is also a relation :). I think it's possible for a user who drops the combo and has the mouse in the dropdown area to inadvertently select a value they didn't want - and your forcing of the selection to top may lead to a similar effect. YMMV.

That's true, but if the bound data field is empty then DisplayValue is also empty by definition.

The actual code in the combo DropDown event is this, so it only works if there is no value present. It leaves everything alone if the field has a value:
IF NOT EMPTY(this.ControlSource)
	IF EMPTY(EVALUATE(this.ControlSource))
		KEYBOARD "{Home}" PLAIN CLEAR 
	ENDIF
ENDIF

DODEFAULT()
Ray Roper
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform