I have seen how you can relative widths for the splitter and panes using the ASP markup, e.g ...
<div id="splitterDIV" style="width: 100%; height: 200px;"> <ig:WebSplitter runat="server" ID="WebSplitter1" Height="100%"> <Panes> <ig:SplitterPane Size="50%"> </ig:SplitterPane> <ig:SplitterPane Size="50%"> </ig:SplitterPane> </Panes> </ig:WebSplitter></div>
However, in my application I am dynamically creating nested splitters in the CreateChildControls event. I want to set the width of the root splitter to 100%, and the pane size to say 60% and 40%. The splitter width and height properties, and the pane size property only seem to allow me to set fixed pixel sizes and the ResizeWithBrowser property seems to have no effect.ThanksNick
Hi Viktor,
The problem is in VB (or C#) the splitter width property, and pane size property only accept a numeric value. If I pass 100, it takes this as 100 pxiels, not 100%, and there is no property that allows me to say treat my values as relative not specific.
ThanksNick
Hi Nick,
There should be no difference in behavior of splitter if you set properties in aspx or in aspx.cs dynamically. It is not clear what exactly does not work for you. If exactly same layout works in aspx and fails in aspx.cs, then please provide a sample for that.
You should keep in mind, that if you work with heights (horizontal splitter bar), then in order to use % values, your application should ensure that absolutely all parent html elements of splitter also have height, because under XHTML default heights of containers are collapsed. If it is the case, then you may consider adding style="height:100%" to all containers of splitter including <form>, <body> and <html> objects.