Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5 - Unselect Combo selection
Message
De
06/06/2003 07:53:44
 
 
À
05/06/2003 20:26:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00795134
Message ID:
00797129
Vues:
105
Hi Alan.

The textbox is the currentcontrol, and in the gotfocus, I push the value to the cbo, and switch the currentcontrol to the cbo. In the lostfocus of the cbo, I push the value back to the textbox and switch the currentcontrol back. The grid stays looking neat, and I get the best of both worlds.

But why are you working so hard at it < s > ? This is all that you need to do if the combo is of style 2-Drop Down List.

Set up the grid column like this:
Bound = .F.
ControlSource = ( IIF ( SEEK( MyRecordSource.MyForeignKey, 'MyLookupTable', 'MyLookupTag' ), MyLookupTable.Description, '' ) )
Set up the combo with any RowSourceType except for 2-Alias or 6-Fields (using one of these RowSources will make the combo go blank when it has focus) like this:
ControlSource = MyRecordSource.MyForeignKey
BoundTo = .T.
RowSourceType = 3
RowSource = SELECT Description, PKField FROM MyLookupTable ORDER BY Description INTO CURSOR csrLookup NOFILTER
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform