Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric (Character Driven) Output
Message
 
To
19/11/2003 22:24:18
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00851612
Message ID:
00851813
Views:
9
>>>>>>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.
>>
>>This works...sorta.... it doesn't apply to the cells until I click on one of the cells of the grid, and the other cells that are DISPLAYED do not change... BUT if I scroll up or down to show the hiddend cells, THEY are formatted properly. Sounds like a Refresh problem on my end. sigh....
>>
>>Thanks! I am much closer now!!
>
>One thing I found later - you still need to set the grid.recordsource="yourAlias"

Thanks for the info.... I will try it later today and see how it works.

Much appreciated!

Tommy
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform