Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox DropDown listbox behavior problem
Message
De
22/05/2008 11:25:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01319022
Message ID:
01319027
Vues:
14
>I'm having a problem with a Combobox dropdown listbox and finding this difficult to debug. The behavior while running under the debugger is fine. But outside the debugger it is not working as I expect.
>
>I populate the the listbox with 2 columns. The first column contains the text choices, and the 2nd column contains a ChoiceID for that choice. I have set BoundColumn to 2,BoundTo to .T., and ControlSource to a field in a table where the ChoiceID is stored.

What is the datatype of the controlsource field? -
combo.BoundTo=.T. is only useful for numeric/integer types,
when yours is char(), it might explain the behavior you described.

>
>I am using InteractiveChange for the dropdown listbox to handle the user's selection.
>
>For debugging, I set a breakpoint in the InteractiveChange change event for the combobox. Under the debugger, when I get to InteractiveChange, the selection for the listbox is the one that the user has just made, which I expect. However, when I run outside the debugger, when my InteractiveChange code gets control, the selection is not the one the user has just made, but the previous value, the selection before the user made his choice.
>
>Is there some other event that I should be handling instead of InteractiveChange?

When combo.Style=2, you can use combo.Valid().
What does your current code in InteractiveChange() do?



hth
-Stefan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform