Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
First letter of textbox forced to uppercase
Message
 
To
09/06/2001 13:23:51
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00517385
Message ID:
00517438
Views:
16
>There is a condition in the txtField class Init():
>
>
>IF TYPE(This.ControlSource)='C'
>   This.InputMask='!'+REPLICATE('X',LEN(EVALUATE(This.ControlSource))-1)
>ENDIF
>
>
>What would be the best approach to update this condition to take care of not executing this code if I have overwrited the value of the InputMask?

You could add a flag to the class to AutoSet the Input Mask.

Add a custom property: AutoSetInputMask
set it's value to .t.

Class Init:
IF TYPE(This.ControlSource)='C' and this.AutoSetInputMask
   This.InputMask='!'+REPLICATE('X',LEN(EVALUATE(This.ControlSource))-1)
ENDIF
Now just set AutoSetInputMask to false and you can make the InputMask whatever you want.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Reply
Map
View

Click here to load this message in the networking platform