Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo refuses to have a displayvalue - bug?
Message
 
 
To
23/07/2004 11:52:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00783781
Message ID:
00929421
Views:
26
>>It's deja vu all over again. I am 99% sure this bug still exists in VFP9 beta. I ran into this bug yesterday while developing a VFP8 app, and it literally gave me a headache. My caveat though is the combo is in a container, bound to a numeric field in a cursor. I found this thread this morning. < sigh >
>
>Don't you just love this type of problem? The one that measures with "you got one faucet in a 200 room hotel which leaks once a month... find and fix". At least this one leaks whenever you touch it, but it's one combo in 200 which behaves like this, and who would ever be able to remember which set of properties triggers the behavior.
>
>Nasty little beast of a bug.

I have gotten burned by this.
If the ControlSource is numeric, I needed code like below.
But I'm still not sure where it should go.
It's worked in EITHER the form.gotFocus(), comboBox.GotFocus(), or in a pageFrame.page.Refresh()!
*!* If ControlSource is numeric, DisplayValue often became blank.
*!*	  To fix, put this in form.GotFocus().  
*!*         - Or you may need to put in THIS.LostFocus():
LOCAL liIndex
WITH THISFORM.cboProblem
   FOR m.liIndex = 1 TO .ListCount

     IF VAL( .List[m.liIndex] ) = substitute_controlSource_here ;
        AND .ListIndex <> m.liIndex
	  * Reset this prop.
	  .ListIndex = m.liIndex
	  EXIT
     ENDIF

  ENDFOR

ENDWITH	 
- Andy Rice
San Diego, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform