Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox Capers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00044699
Message ID:
00044927
Vues:
31
>>>>>>If you are using a combobox that is bound to a field and you type something in the combobox, where does that value appear? When I look at the value property it is always "" unless I select an item from the list. I need to be able to either choose an item from the list or type in my own item (isn't that the definition of a combo-box?)
>>>>>
>>>>>Combo.DisplayValue
>>>>
>>>>I'm having the same problem!! And when my combobox loses focus, it's blank! Why?
>>>>
>>>>Elyse
>>>
>>>Because, you have to care about row soucre programmatically:
>>>*** Combo.Lostfocus event
>>>IF This.valueThis.DisplayValue
>>>*** add displayvalue to row source (or directly to field) here
>>>Endif
>>
>>Elyse & Michael: To expand on Edward's answer (correct as usual, Ed) VALUE is related to the table/cursor/array that is the recordsource of the combo. DISPLAYVALUE, however, has to do with what's showing on the screen. This is easier to see with a two-column combo where the bound column is 2.
>>
>>Personally, I've adopted the idea that's been tossed around recently for NOT having a combo bound if the user can enter data.
>>
>>Barbara
>
>Yes, I got understanding how combo works when struggled with my first multi-column combo. About the same time, I decided not to use ControlSource at all (I believe Barbara meant this saying 'NOT having a combo bound').
Once you've added your typed value to the rowsource, then you see it in the combo's list, right? That's not always a good thing. Can you consistently have a typed-in value stay in the box, after it loses focus, and not have that new value show up in the drop-down part when you click on it again?

Not having solved that problem, I superimposed a textbox on a dropdown list and goofed it around until it worked.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform