Dojo 是否更改borderContainer中contentPane的拆分器位置?

Dojo 是否更改borderContainer中contentPane的拆分器位置?,dojo,contentpane,border-container,Dojo,Contentpane,Border Container,我有2个在a里面使用。非常类似于以下内容: 您好,我是领导窗格这里有很多东西。 嗨,我是中锋 我想使用JavaScript以编程方式更改拆分器的位置。在一种情况下,我想把它移到一边,这样只有一个contentPane可见。如何更改拆分器位置 已尝试: var datasetArea=document.getElementById(“studiesDatasetArea”); datasetArea.style.height=newHeight+“px”; 这不起作用,而且: dojo.wi

我有2个在a里面使用。非常类似于以下内容:


您好,我是领导窗格

这里有很多东西。 嗨,我是中锋
我想使用JavaScript以编程方式更改拆分器的位置。在一种情况下,我想把它移到一边,这样只有一个contentPane可见。如何更改拆分器位置

已尝试:

var datasetArea=document.getElementById(“studiesDatasetArea”); datasetArea.style.height=newHeight+“px”; 这不起作用,而且:

dojo.widget.byId('studiesDatasetArea').resizeTo(400,newHeight);

这将更改边界容器的大小,而不仅仅是移动拆分器的位置。我不想更改外部边界容器的大小。

我在这里找到了一些有用的代码,可以回答我的问题:

片段:

require(["dijit/registry"],
    function(registry)
{
    var myBC = registry.byId("studiesBorderContainer"); // actual JS object

    var topPane = registry.byId("studiesTableArea");
    dojo.style(topPane.domNode, "height", (800-newHeight)+"px");
    myBC.resize();
});
_layoutChildren: function(/*String?*/ changedChildId, /*Number?*/ changedChildSize){
// summary:
//      This is the main routine for setting size/position of each child.
// description:
//      With no arguments, measures the height of top/bottom panes, the width
//      of left/right panes, and then sizes all panes accordingly.
//
//      With changedRegion specified (as "left", "top", "bottom", or "right"),
//      it changes that region's width/height to changedRegionSize and
//      then resizes other regions that were affected.
// changedChildId:
//      Id of the child which should be resized because splitter was dragged.
// changedChildSize:
//      The new width/height (in pixels) to make specified child

//example:
var bc = digit.byId(‘borderContainerId’);
var newSize = 150;
var childContentPaneId = ‘myPaneId’;
dojo.hitch(bc, bc._layoutChildren(‘childContentPaneId’,newSize));