Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox RowSource Commas
Message
 
À
19/01/2005 11:16:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00978585
Message ID:
00978588
Vues:
28
>Hi,
>
>I have a combobox set up like the following:
>
>BoundColumn=2
>ColumnCount=2
>RowSource=?
>RowSourceType=1 - Value
>
>I'm not sure how to set the RowSource property to get the combo box to display the way I want it to. Basically I want to "escape" a comma.
>
>Something like this (except this doesn't work)
>
>RowSource = "Full Name,N,(Last Name, First Name),S"
>
>So when you click on the combo box you'd see the two choices:
>
>Full Name
>Last Name, First Name
>
>Any ideas?
>
>Thanks,
>Chris


Use AddItem() or AddListItem() methid of the Combo to Add whatever You want
Other way is to set RowSourceType = 5 - Array
RowSource = "thisform.ComboArray"
In Init event of the Form:
DECLARE thisform.ComboArray[2,2]
thisform.ComboArray[1,1] = "First Name"
thisform.ComboArray[1,2] = "N"

thisform.ComboArray[2,1] = "LastName, First Name"
thisform.ComboArray[2,2] = "S"
thisform.Combo1.Requery()
Of course You must add a property ComboArray[2,2] to the Form
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform