开发者

Ext.net: how to set a width in percent instead pixel?

i would like to set GridPanel width, to 100%. My gridpanel is in a table. I know i can only set gridpanel width in fixed pixel. So my question is: how to set width of panel, gr开发者_开发技巧idpanel etc. in percent in ext.net ? Is it possible ? I don't want to "neste" it into a viewport ... Thanks


To set the Width property declaratively to a unit type other than the default of Pixel, you must create a new unit type specific to the unit type you want. For example, to set a control's Width property to a percentage value of 100, you could do the following:

myWebControl.width = Unit.Percentage(100);


i dont think you can specify values in percentages.

however if you set the value to 'auto' i believe it will automatically fill the space:

Width and Height Fixed values measured in pixels (or, device-independent units that are approximately 1/96 inch). You can set these properties to Auto so that child elements will automatically resize depending on the sizing of the parent panel.

from microsoft

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜