Hello
I want to specify the units of my controls in cm. I have looked the
Unit class , it doesn support cm. However the UnitType enumeration has
cm in it.
I looked the UnitConverter class but Couldn find the way to specify my
units in cm.
Any Ideas? I am using .NET 2.0
Madhur
Göran Andersson - 07 Jul 2006 15:56 GMT
There is no Unit class, I suppose you mean the Unit structure.
What do you mean when you say that it doesn't support cm? The Unit
structure supports the Cm unit just fine.
I just created a Unit instance with the value 5 and the unit
UnitType.Cm. I applied it to the Width property of a form field:
fldSubject.Width = new Unit(5, UnitType.Cm);
Just as it should, it ended up in the style property of the html element:
<input name="ctl00$MainPlaceHolder$fldSubject" type="text"
id="ctl00_MainPlaceHolder_fldSubject" style="width:5cm;" />
> Hello
>
[quoted text clipped - 7 lines]
>
> Madhur