Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric (Character Driven) Output
Message
From
19/11/2003 16:18:23
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00851612
Message ID:
00851638
Views:
10
>>>I used to know this in another life... sigh....
>>>
>>>OK gurus... what am I doing wrong today (besides breathing)????
>>
>>You need a space after the @ clauses: "@R 9,999,999,999,999"
>
>I tried that, but to no avail.
>
>Maybe I'm still being misleading in my explanation... so here goes again!......
>
>I have a grid. I have a text (character) field displaying the file sizes bound in this grid to a cursor. It is a character field of 12.
>
>The numbers are integer-strings. I would like for them to have the commas displayed (which they don't have in their data).
>
>So what do I do with the Format/InputMask properties of the field.
>
>I am stuck at the moment, but I appreciate the help.

What I tried was ?"123456789" picture "@R 999,999,999" and that sure worked.

For a textbox in the grid, it's not that easy, but still easy enough. First, set the controlsource to "val(yournumericfield)" at the column level (not textbox). That will make your field read-only, but you can always stuff a different current control if you want. You may have to do it in the .init (of the textbox, or higher up), not sure of the exact way of setting this in PEM window.

Second, put R into textbox.format, and 999,999,999,999 into its .InputMask property. Give it a try.

Here's the form.init I just tried:
With This.grid1.Column1
	.ControlSource="val(c1)"
	.sparse=.f.
	With .text1
		.Format="R"
		.InputMask="999,999,999,999"
	Endwith
Endwith
The sparse=.f. makes it use the same inputmask in all rows, not just the current.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform