[Closed] Converting C# dotnet to MXS dotnet
Hi
Im trying to convert the following code from c# :
tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F))
So I have made something like this:
sizeType = dotNetClass “System.Windows.Forms.SizeType”
columnStyle = dotNetObject “System.Windows.Forms.ColumnStyle”
columnStyle.sizeType = sizeType.Absolute
tableLayoutPanel.ColumnStyles.Add columnStyle
This works fine but I dont know how to set value to the sizeType.Absolute
In c# its set to 35 of type float
columnStyle = dotNetObject "System.Windows.Forms.ColumnStyle" ((dotNetClass "System.Windows.Forms.SizeType").absolute) 35.0
but when I check it isn’t Aboslute but AutoSize instead
columnStyle.SizeType.value__ == columnStyle.SizeType.Absolute – returns False
If I’m not wrong, equality should be:
columnStyle.SizeType.value__ == columnStyle.SizeType.Absolute.value__ – returns True
Thus it’s seems OK.
Thanks it works, I think my mistake was sending 35 as argument to .SizeType and not to .ColumnStyle