Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inputmask in textbox
Message
De
12/11/1998 12:55:09
 
 
À
12/11/1998 05:27:03
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00156881
Message ID:
00157025
Vues:
48
>Hello all,
>
>I want to have a prefix "KA" in a character textbox to let user finish remaing part like "KA000001" etc...Where "KA" should be readonly.
>So I set the inputmask to this textbox as "KAXXXXXX",Unfortunately,"A" was a reserved word for VFP inputmask for alphabetic characters only.So the textbox always show "K000001","A" was invisible.
>
>Any idea about this ? Thanks for any comment in advance.

If "KA" is a constant, why is it in the field in the first place? Why not place two textboxes on the form, one readonly with the value "KA" in it, and right next to it, the other text box where the user enters the meaningful value. You could still store the KA in the table by not binding the textboxes and putting code in the refresh and valid methods:

text2.refresh
THIS.Value = RIGHT(mytable.kafield, 6)

text2.valid
REPLACE mytable.kafield WITH "KA" + THIS.Value

This would 'virtually' bind the text box to the field.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform