Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5 - Unselect Combo selection
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00795134
Message ID:
00795848
Vues:
99
Thanks for understanding. First things first, I have seem <g> and <bg> what is <s>, smile or a sigh <g>.

< lol >!!!! If it were a sigh, I would not be very understanding, would I ;-)

But in such situations I had always seen cbo which are more like collapsed listboxes, the text displaying there is always readonly. You can type in it and the values do change but depends on the speed of the users typing, if he slows the cbo start search from the next character he types which can be frustrating to slow typers.

This is only the case when the style of the combo is 2-Drop Down List and it is very easy to compensate for. All you need to do is add a property to the drop down list called nOldDblClick and put code like this in the GotFocus():
This.nOldDblClick = _dblClick
_dblClick = 1.5
and code like this in the LostFocus()
_dblClick = This.nOldDblClick
The interval that VFP waits becfore it resets the incremental search string is controlled by the setting of _dblclick in VFP 6 (They changed this to _IncSeek in VFP 7.0). The reson that you want to reset it when you exit the combo is that it also controls the time interval between mouse clicks that determine a dblClick().

This combo of mine allows the user to type into the cbo as if it is a textbox, highlights the characters following the chars typed by the user, matching to the closest possible record in the lookup. Backspace and the selection goes back to earlier matches.

Yes, I have my own auto-complete combo box class. It works just like that. My point is that you do not need to write any code to update the combo's ControlSource with the foreign key value in the combo's RowSource. All you need to do is to set the Combo's BoundColumn to the column number of the RowSource that contains the foreign key and set BoundTo to true (since it is an integer).

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform