Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox Questions
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01267056
Message ID:
01267057
Views:
25
>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.)
>

1. I would think it may be handled externally to the combobox, at the same place where you assign/change its RowSource. Would this work for you or you want it to be handled by the class itself? Perhaps you can put this class in the container then which may react on some changes.

I am not sure how to handle this internally.

>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

The strtran, I think, should be strtran(this.value, "I","") But perhaps it works only for certain RowSourceType. You may try to use array.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform