Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to reset combobox to top...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00229944
Message ID:
00229949
Vues:
17
The same thing would happen when adding if the user chose a value for the combo and then tabbed through it again. If you want this functionality when adding then move the code to where you add. i.e. a command button cmdAddRecord with:

APPEND BLANK
THISFORM.cbo_names.ListIndex = 1

in the .Click Event

>I do the following to reset the combobox to the top:
>
>In GotFocus:
>THISFORM.cbo_names.ListIndex = 1
>
>The problem is as follows:
>When I am in edit mode and there is already something entered in the combobox and I tab through the box on my way to another form field, the combobox gets filled with the first choice in the dropdown list.
>
>That's fine if you are adding a new record, but in edit mode it doesn't keep the former entry. Is there a workaround for this?
>
>Thanks for the help.
>
>Steve
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform