Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
440
WebSplitter: Setting width relative splitter and pane widths using Control API
posted

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.

Thanks
Nick



Parents
  • 24497
    posted

    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.

Reply Children