我在一个使用contentPanes的BorderContainer中有两个Dojo工具包。如下所示:
<div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'sidebar', gutters:true, liveSplitters:true" id="borderContainerB" style="height: 200px">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:true, region:'top'" style="width: 100px;">Hi, I'm leading pane<br><br>Lots of stuff goes here.</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:true, region:'center'">Hi, I'm center pane</div>
</div>我想使用JavaScript以编程方式更改拆分器的位置。在一种情况下,我想把它一直移到一边,这样只有一个contentPane是可见的。我该怎么做才能改变拆分器的位置?
已试过:
var datasetArea = document.getElementById("studiesDatasetArea");
datasetArea.style.height = newHeight + "px";这是不起作用的,而且:
dojo.widget.byId('studiesDatasetArea').resizeTo(400, newHeight);它改变了边框的大小,而不是仅仅移动拆分器的位置。我不想改变外边集装箱的尺寸。
https://stackoverflow.com/questions/18069697
复制相似问题