Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inputmask for numerics in grid column
Message
De
22/12/2004 09:03:56
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
21/12/2004 19:55:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
00971208
Message ID:
00971375
Vues:
29
>Something easy I'm missing here ...
>
>I have a numeric column in a grid. I'd like the values to display using a value for inputmask of '9,999,999'.
>
>However, the user can modify the data in this column, and the inputmask really screws things up when the user tries using the keyboard.
>
>So, I'll looking for the way to set the inputmask so that it applies for each row, unless the user is editing the value, in which case I want to discard the inputmask. Somehow, this seems related to "sparse" (which is .F. is my example)?

Sparse should be .t. if you want a specific control of yours to be in each row, otherwise it's active in current row only.

There's some snag in VFP's textbox if the inputmask contains commas. My trick was to just remove those commas in .gotfocus and restore them in the .lostfocus of the textbox. I have a .savemask property, so
* gotfocus
this.savemask=this.inputmask
this.inputmask=chrtran(this.inputmask, ",", "")

* lostfocus
this.inputmask=this.savemask

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