Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box default selected item
Message
De
09/08/2001 15:56:57
 
 
À
09/08/2001 15:45:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00541586
Message ID:
00541979
Vues:
10
Actually, what we really wanted was to avoid writing any code. We simply wanted to set a property. It turns out using Value as our RowSourceType and simpy setting the Value property to the number (index) of the value you want to show first is all we really had to do.

>Dan,
>
>I may be missing something, here, but if all you want to do is highlight a particular item in the list, then after you create the array and requery() to update the list, set ListItemID to the number of the item you want to select.
>
>
>WITH thisform.myCombobox
>     * Add the array rowsource
>     .AddProperty( "aRowSource[ 2 ]" )
>
>     .RowSource = "this.aRowSource"
>     .RowSourceType = 5
>
>     * Populate the array
>     .aRowSource[ 1 ] = "Yes"
>     .aRowSource[ 2 ] = "No"
>
>     * Populate the list from the array.
>     .Requery()
>
>     .ListItemID = 2 --> "No" is highlighted and selected.
>
>ENDWITH
>
>Regards,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform