Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox InputMask
Message
De
29/03/2007 16:17:44
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01209790
Message ID:
01210054
Vues:
24
>>>
>>>Alignment Left is default so changing it to Right does not make sense. And you understand correctly that this is not "too important".
>>>
>>Sorry, Alignment is not available when Style=2, so you get it Right anyway. So make it wider, or change contents to Character.
>
>Ed,
>Thank you very much for your suggestions and help. I think I will have to live with just a bit wider combo box. Life is full of compromise <g>.

Actually, no matter what you put into a combo, internally it gets stored as a character. The default conversion is probably padding your numbers with too many spaces, so you may want to set your rowsource to none, and in the init of the combo have a
for i=1 to alen(this.srcArray)
   this.add(transform(this.srcArray[i], "999")
endfor
You'd also need to do some manual binding here, since your controlsource is probably numeric, and your row values are now forced into strings (i.e. given up the automatic conversion, so Fox doesn't know it needs to convert back into numbers), like this:
this.value=val(this.list(this.listindex))
Or you may go straight into the controlsource. This is just off the top of my head, don't even know right now whether this manual binding would go into .valid(), .lostfocus() or .interactivechange().

An easier thing would be if you didn't use an array as the rowsource, but a cursor with just a single n(3) field, with hundred records in it. Then the combo may convert it into c(3) strings, not in default width.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform