Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox Questions
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Combobox Questions
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01267056
Message ID:
01267056
Views:
76
I have two questions about Comboboxes, one of which I asked a few weeks ago, and still haven't been able to solve. These questions involve a parent Combobox class that I created, which is used all over; so, I can't tailor it to an individual situation.

1) I want the Comboboxes to Enable/disable based on the number of items in the ListCount: 0 or 1 - disable; 2 or more - Enable. Where can I put code that will fire when the number of items in the Combobox (or in the RowSource) changes? (ListCount_Access didn't fire and ListCount_Assign is illegal. I've tried a bunch of other things, too.)

2) I sometimes want the DisplayValue to be different than the Value. For example, if the RecordSource's data contains a pipe ("|"), I want to remove it in the DisplayValue, but not in the source data. I tried putting
This.DisplayValue = STRTRAN(This.Value, "|")
into various methods or putting =STRTRAN(This.Value, "|") into the DisplayValue property, but nothing changed the values in the pulldown list. Any ideas?

Jerry
Next
Reply
Map
View

Click here to load this message in the networking platform