Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble w/ inputmask & cursor controlsource
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00158627
Message ID:
00158686
Views:
15
>Hi,
>
>Can anyone tell me how to set a format/inputmask for a textbox(in a grid) that has it's controlsource set as a cursor.
>Here's what happens:
>
>If I set this.grid.txtBox.controlsource='mycursor.myfield' and set the field type to N(7,3), the displayed number will show as 99999.999.
>The problem I have is I want the display to show 999999 if .000 are the trailing numbers. But it displays as 99999.000.
>If I enter for example 10.5 I want 10.5 but I get 10.500. I need up to 3 decimal places for this value but I don't want them displayed if it's zeros.
>
>The format property T (removes leading and trailing blanks) is sortof the property I'm looking for but that doesn't work here.
>Is there a way to have the inputmask and format properties adjust a control whose controlsource is a cursor's field? I can't seem to get it to work.

You can change the Inputmask at run-time, you know, after testing for some conditions...Gotfocus, IAC, Lostfocus, etc, are all good places to do this.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform