Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Beginners combo box question
Message
 
À
05/05/2000 18:19:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00366803
Message ID:
00366850
Vues:
11
>>>How do I put values into a combo box?
>>>Is it a bad idea to hard code values in a combo box?
>>>
>>>tia
>>>
>>>Josh
>>

>>
>>I didn't think a beginner's question would be coming from Dan. *bg*
>>
>>There are quite a few ways to populate a combo. Just look at all the choices you have under RowSourceType! There are valid cases where you'd want to hardcode a small number of choice for a combo. To do that either select "Values" as the RowSourceType, then list the choices in the RowSource, or you can select "None" for the RowSourceType and add items to the combo in code with the AddItem or AddListItem methods.
>
>Thank you very much.
>
>Another question.
>
>If in the InteractiveChange event of the combo, I want to change the record source of the grid. Should I call the grids refresh and in the refresh build my cursor based on the value of the combo box?
>
>Josh

Josh,
Depending on how "responsive" you want the combo to be, you might consider putting your grid-change code in the combo's Valid() rather than InteractiveChange(). In InteractiveChange(), when the user opens the combo and then scrolls through selections before choosing one - the InteractiveChange()event fires every time the highlight bar is repositioned over a different list item. The Valid() doesn't fire until the combo is closed and user attempts to exit the control. If there's any performance hit in your code, your users will really notice it in InteractiveChange().
"Problems cannot be solved at the same level of awareness that created them." - Albert Einstein

Bruce Allen
NTX Data
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform