tags:

views:

7

answers:

0

You create a WebControl with a specified width. In it, there are 3 parts. The left part must be left-justified and has its own width. The right part must be right-justified and has its own width. The final middle part must take up the remaining width and must get its width from the other 3 widths. Since the widths must be specified by the WebControls.Unit, it can have many different types. The Value method just returns the value in the structure. In the example below, leftWidth.Vaue is 100. This does me no good. I need to be able to convert a unit of type Pixel to the equivalent value of type Point. Can this be done?

Unit totalWidth = Unit.Pixel(500); Unit leftWidth = Unit.Point(100); Unit rightWidth = Unit.Percentage(20.0); Unit centerWidth = Unit.Pixel(????);