Hi,
is it possible to resize the the splitter panes so that the size of each is 50%. Or - with other word - the splitter bar is right in the middle.
This will be great!.
Thx
Uwe
Hello Uwe,
I am glad that you have been able to resolve your issue.
If you have any additional questions do not hesitate to contact us.
Hi Vaysa,
it works great. I think it is already marked as answer.
Cheers Uwe
Hi Uwe,
I was wondering have you been able to resolve your issue?
If you are still in need of assistance please feel free to contact us, we would be glad to help.
I am not sure why you have problems with load in codes which I gave before. They do not use jquery ready or any other fancy stuff, but simple <body onload="onLoad()">. That should always work.
Anyway considering your last notes, you have splitter located inside of resizable dialog. In this case window.onresize will not work, because window is not a resizable-container of splitter. For any unknown container or any external size changes of container, you may use static timer/interval, though, that implementation requires good understanding of javascript. In case of WebDialogWindow-container, implementation should be easy, because dialog raises few resizing events. You may use "Resized", which is raised when resizing was finished, or you may use "Resizing". Note: in case of complex layout of splitter the usage "Resizing" to perform layout, might overwhelm calculations in javascript.
Below are codes for you. Please copy/paste them in any of your samples and test if they work as you expect. After that you may apply similar resize events for your application.
<script type="text/javascript">function WebDialogWindow1_Resized(sender, eventArgs) { var splitter = $find("<%=WebSplitter1.ClientID%>"); var pane = splitter.get_panes()[0]; pane.set_size(splitter.get_element().offsetWidth / 2);}</script><ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Width="300px" Height="300px"> <ContentPane> <Template> <ig:WebSplitter ID="WebSplitter1" runat="server" Width="99%" Height="99%"> <Panes> <ig:SplitterPane runat="server"></ig:SplitterPane> <ig:SplitterPane runat="server"></ig:SplitterPane> </Panes> </ig:WebSplitter> </Template> </ContentPane> <ClientEvents Resized="WebDialogWindow1_Resized" /> <Resizer Enabled="True"></Resizer></ig:WebDialogWindow>
Hi, sorry for reply a litle late!
No i still struggle with that in my scenario. I try to explain:
I have a MasterPage (build from some of Microsofts templates). This contains (of course) the body tag, the scriptManager etc (nothing special at all). The "working-Page" comes with a with a WebGrid and opens (via selected Row) a WebDialog. This contains the Splitter ...
Now I would like to have the 50%/50 Ratio even when the wdw is resized (or maximized).
So only the wdw-Size changes, not the whole thing.
Btw. with the suggested solution i got a "JavaScript Runtime error - load is undefined". Did i miss some "$(document).ready(function ()" ?