This question is locked. New answers and comments are not allowed.
Hello,
Is there a way to have two Editor controls resized automatically inside two panels of a vertical Splitter?
I tried lot of things and I don't have yet a working solution
The best thing I got so far is this:
On spliter I connect client events
.ClientEvents(events => events.OnResize("onUpdateEditorsHeight").OnExpand("onUpdateEditorsHeight").OnCollapse("onUpdateEditorsHeight"))
function onUpdateEditorsHeight(e) {
$("table,#Description").height( $("#Splitter").children().first()[0].style.height ); // first() would return the first panel element
$("table,#Body").height( $("#Splitter").children().last()[0].style.height ); // last() will return the second panel element
}
There are two problems with this approach.
1. Even if I set the height of the Editor's outer table correctly with the height of the parent panel , for some reasons the Editor will be (look) higher than the panel, part of it will be outside panel and the panel show scroll bars - this part will be constant to ~ 65px. If I substract this part from panel height I still have the next problem.
2. Seems that the spliter panel (the one in the middle that is dragged) does not capture the mouse, somehow when I drag the spliter over the editors it get stuck - sometime works if I drag it with very small steps only, slowly.
Any help is appreciated!
Thanks,
Vasile
Is there a way to have two Editor controls resized automatically inside two panels of a vertical Splitter?
I tried lot of things and I don't have yet a working solution
The best thing I got so far is this:
On spliter I connect client events
.ClientEvents(events => events.OnResize("onUpdateEditorsHeight").OnExpand("onUpdateEditorsHeight").OnCollapse("onUpdateEditorsHeight"))
function onUpdateEditorsHeight(e) {
$("table,#Description").height( $("#Splitter").children().first()[0].style.height ); // first() would return the first panel element
$("table,#Body").height( $("#Splitter").children().last()[0].style.height ); // last() will return the second panel element
}
There are two problems with this approach.
1. Even if I set the height of the Editor's outer table correctly with the height of the parent panel , for some reasons the Editor will be (look) higher than the panel, part of it will be outside panel and the panel show scroll bars - this part will be constant to ~ 65px. If I substract this part from panel height I still have the next problem.
2. Seems that the spliter panel (the one in the middle that is dragged) does not capture the mouse, somehow when I drag the spliter over the editors it get stuck - sometime works if I drag it with very small steps only, slowly.
Any help is appreciated!
Thanks,
Vasile
