Welcome Guest Search | Active Topics | Sign In | Register

AutoFillwindow and next splitters Options
ixthnar
Posted: Sunday, December 21, 2008 1:31:34 PM
Rank: Advanced Member
Groups: Member

Joined: 11/15/2008
Posts: 44
I am using nested splitters (outer horizontal, inner is a vertical split within the top panel). None of the possible combinations for using AutoFillwindow do not behave in a desirable fashion. (Using IE 6).

AutoFillwindow outer true and inner false -> Browser loops until it is out of memory.
AutoFillwindow outer true or false and inner true -> Behaves in a predictable way but not very useful. (The inner pane dominates.)

Any tips or tricks to make this work well? That is, the splitters fill the browser without scroll bars.

Thanks,
Chris


eo_support
Posted: Sunday, December 21, 2008 5:48:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

AutoFillWindow set to true on the outter one and false on the inner one should work. The key is to manually resize the inner one with code. You would do that by handling the outer splitter (say Splitter1)'s ClientSideOnResized event and then adjust the size of the inner splitter (say Splitter2)'s size. It will be something like this:

Code: HTML/ASPX
<eo:Splitter id="Splitter1"
    ClientSideOnResized="ResizeSplitter2" ....>
.....
</eo:Splitter>


Code: JavaScript
function ResizeSplitter2()
{
    //Get the size of the top pane
    var splitter1 = eo_GetObject("Splitter1");
    var topPane = splitter1.getLeftPane();
    var w = topPane.getWidth();
    var h = topPane.getHeight();
    
    //Resize Splitter2 accordingly. Note
    //the size we set here does not include
    //borders. So the size needs to be
    //(w - 2, h - 2) instead of (w, h)
    var splitter2 = eo_GetObject("Splitter2");
    splitter2.setSize(w - 2, h - 2);
}


Hope this helps.

Thanks!
ixthnar
Posted: Sunday, December 21, 2008 5:57:12 PM
Rank: Advanced Member
Groups: Member

Joined: 11/15/2008
Posts: 44
Perfect!! Thanks so much.

Chris


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.