Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CComboBoxl Question(s)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00421347
Message ID:
00421389
Vues:
17
> 1) How do I set up a default for a CComboBoxl control?

Bind your ControlSource to This.nSelectedValue. By default the combo's nSelectedValue should be 1, which means your default value shown is whatever is at the top of the list. So you can either order your rowsource and force your desired default value to the top or change nSelectedValue on the properties sheet at desing to specify which value (2,3,4,5,... etc) you want as your default.

> 2) Related question. In my CComboxl (Similar to the CStateComboboxl) control I placed a label to the right of the drop down inside the container to hold the long name of the the code (for example, Virginia for code VA). Using the Combox InteractiveChange Event I can place the code long name in the label when the code changes. However, when the page displays initially the long name is blank or may contain the long name from the previous code.

Is this on a pageframe? If so I would handle it in the page Activate/Deactivate events. On Activate check for the label caption to be blank, if so set it. On deactivate make the label caption blank so that you know the next time in it will get handled correctly.

HTH
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform