Information générale
Catégorie:
Codage, syntaxe et commandes
>>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.
Thanks.Thats the way I go.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement