Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box Problem
Message
 
 
À
20/10/1999 17:09:23
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00279102
Message ID:
00279118
Vues:
10
>if you have a combo box with 3 columns and only the 1st column is visible to the user, how do you reference the other two columns?
>
>for example, if the combo box is filled as follows:
>row1: "1"(visible), "192", ".667"
>row2: "2"(visible), "120", ".882"
>
>and i want to use the value in the third column in a mathematical function based on what the user selects in the visible column:
>
>variable = 10 * thirdcolumnvalue
>
>what should i replace thirdcolumnvalue with to get the proper result?
>
>thanks
>JD

You have to set the ColumnCount and ColumnWidths properties. If you have 3 columns, set the ColumnCount to 3. If you do not want Column 3 to display to the user, the ColumnWidth for that column would be zero. For example, set your ColumnWidths to 30,60,0 for a column width of 30 for col 1, 60 for col 2 and 0 for col 3. If you want the value to be numeric, set the initial value of the Combo to 0 and remove the quotes from the numbers in your 3rd column. Your BoundColumn would be 3 and BoundTo would be True.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform