Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box default selected item
Message
De
08/08/2001 19:28:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00541586
Message ID:
00541627
Vues:
11
Sergey,
I've tried that. The following seems to work in the activate but I want to just use the Activate

If ThisForm.lFirstTime
For Each oControl In Thisform.Controls
If Upper( AllTrim( oControl.Class ) ) == "COMBOBOX"
oControl.Selected[1] = .T.
EndIf
EndFor
ThisForm.lFirstTime = .F.
EndIf

It turns out the Value propert works after all. I must have set other properties which caused that to fail.


>Dan,
>Assign DisplayValue of the combobox in the Init of the form because a combobox isn't insataniated yet in load.
>
>>Sergey,
>>It is a property of the form. In the load I assign the values. This does work but only for the first value.
>>
>>
>>>Dan,
>>>How do you define an array? Is it a property of form or combobox? If not maybe it's just goes out of scoop.
>>>
>>>>I have tried a number of different things, including setting the DisplayValue. I am not binding the listbox to an table. Nothing seems to work.
>>>>
>>>>>Put the name of the item you want to dispaly into DisplayValue or set ListIndex to the element number. What is the value of the BoundTo property?
>>>>>
>>>>>>It's been so long, I've forgotten how to do this. I thought that there was a property to set that would pre-select an item. I am using an array and setting the display value to 1 and this forces the first item in the array to be selected.
>>>>>>
>>>>>>But, no matter what value I put in the DisplayValue it always shows the first item.
>>>>>>
>>>>>>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform