动态改变分离器的高度 [英] vary the height of the splitter dynamically

查看:103
本文介绍了动态改变分离器的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中实现了kendoUI拆分器。我想动态地改变分割器的高度,我定义了分割器,如

< div id = < span class =code-keyword> splitter style = 身高:500px;宽度:100% >
< div id = leftPane > < / div >
< div id = rightPane > < / div >
< / div >



$(#splitter)。kendoSplitter({
panes:[
{collapsible:true,size:50%},
{collapsible:true,size: 50%}],
方向:水平,

});

我不想在窗格中显示滚动条,所以我想增加分割器的高度以删除滚动条,你能告诉我如何实现它吗?

解决方案

(#splitter)。kendoSplitter({
panes:[
{collapsible:true,size:50 %},
{collapsible:true,size:50%}],
orientation:horizo​​ntal,

});

我不想在窗格中显示滚动条,所以我想增加分割器的高度以删除滚动条,你能告诉我如何实现它吗?


高度?不要这样做。垂直滚动条有什么问题?



宽度和高度差别很大。您可以随时控制宽度,因为HTML将以设置的宽度流动,但您几乎无法控制高度。如果可滚动内容自然不可预测,其实际高度取决于您可能无法控制的因素数量。



-SA

i have implemented kendoUI splitter in my application. I want to vary the height of the splitter dynamically, I defined splitter like

<div id="splitter" style="height:500px;width:100%">
     <div id="leftPane"></div>
     <div id="rightPane"></div>
</div>



 $("#splitter").kendoSplitter({
                        panes: [
                                    { collapsible: true, size: "50%" },
                                    { collapsible: true, size: "50%" }],
                        orientation: "horizontal",

                    });

I dont want to display the scroll bar in the panes,So I want to increase the height of the spliter inorder to remove the scroll bar,can u tell me how to implement this?

解决方案

("#splitter").kendoSplitter({ panes: [ { collapsible: true, size: "50%" }, { collapsible: true, size: "50%" }], orientation: "horizontal", }); I dont want to display the scroll bar in the panes,So I want to increase the height of the spliter inorder to remove the scroll bar,can u tell me how to implement this?


Height? Don''t do it. What''s wrong with a vertical scroll bar?

Width and height are very different. You can always control width, as the HTML will flow withing the set width, but you hardly can control height. The actual height if the scrollable content is naturally unpredictable, its size depends on number of factors you might not be able to control.

—SA


这篇关于动态改变分离器的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆