Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox Numeric Controlsource
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00593923
Message ID:
00594282
Vues:
38
<
this seems to work for when the controlsource is a table, but not a property or memory variable.

It seems to be using the listindex as the value.>>

Hi Freddie,

In my limited experience you want to stay well away from binding a property or a variable as a control source. What I do is this:

Unbind the combo and set boundto to .F.

In the lostfocus event write.

thisform.property = this.ListItem(this.ListItemId, ColumnNumber)

you'll need to put VAL or CTOD around the right hand side of this depending on what data type you want in the property (combo's are strictly strings).

I'm afraid you'll have to set the display value when you create a new record or when you move to another. Either that or stick to directly binding the field.

Yeh...it sucks! I know. I'm afraid I've grown to severely dislike the VFP combo box in the same way that VB's grids suck.

If anyone has a better way of doing this I want to know about it first coz I've just spent two months screeming at my colleagues like John MacEnroe.

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

Click here to load this message in the networking platform