Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I have a numeric column that is always right alignment
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00632477
Message ID:
00632729
Views:
16
Hi Caroline (My sister's name!)

Did you trying setting the InputMask on the textbox

Yes, I did!
The worst is, I've created a little program to test it (out of my project) and it works... There are something wrong with the form in my project and I didn't find it yet.
This program below, works 100%! So I don't know where I make a mistake! :)
LOCAL loForm
Set Safety Off
Create Table MyTable (Field1 N (4), Field2 N (6,2), Field3 N (12,2))
Set Safety On
Insert Into MyTable (Field1, Field2, Field3) Values (1234, 12.52, 162.35)
Insert Into MyTable (Field1, Field2, Field3) Values (2563,  2.24, 62.35)
Insert Into MyTable (Field1, Field2, Field3) Values (8542, 36.79, 912.41)
Insert Into MyTable (Field1, Field2, Field3) Values (9124, 58.22, 24.35)
Insert Into MyTable (Field1, Field2, Field3) Values (9674, 33.28, 152.49)
loForm = CREATEOBJECT("Form")
loForm.Width = 700
loForm.AddObject("Grade","Grid")
With loForm.Grade
	.Width = 650
	.Visible = .T.
	.RecordSource = ""
	Set Safety Off
	Select * From MyTable Into Table MyCursor
	Set Safety On
	.RecordSource = "MyCursor"
	.ColumnCount = 4
	With .Column1
		.ControlSource		= "Field1"
		.InputMask		= "9,999"
		.Width			= 100
		.Header1.caption	= "1"
	EndWith
	With .Column2
		.ControlSource		= "Field2"
		.InputMask		= "999.99"
		.Width			= 100
		.Header1.caption	= "2"
	EndWith
	With .Column3
		.ControlSource		= "Field3"
		.InputMask		= "999,999,999.99"
		.Width			= 100
		.Header1.caption	= "3"
	EndWith
	With .Column4
		.ControlSource		= "Round(Field2 * Field3,2)"
		.InputMask		= "999,999,999.99"
		.Width			= 100
		.Header1.caption	= "4"
	EndWith
EndWith
loForm.Show(1)
It works fine... But in my form not... It make me crazy! :)

[]s
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Previous
Reply
Map
View

Click here to load this message in the networking platform