3

次の例では、200pxの高さのコンテナの間にTitlePaneを作成しました。TitlePaneの高さを100%に設定しましたが、拡大していないようです。

関連コード:

var titlePane = new TitlePane({
    title: "TITLE",
    toggleable: false,
    style: "height: 100%; overflow-y: auto",
    content: "foo"
});
var outerPane = new ContentPane({
    content: titlePane,
    style: "height: 200px;"
}, dojo.byId("body2"));

完全な例:

http://jsfiddle.net/bzFPM/

何か案が?

4

2 に答える 2

1
于 2012-12-26T07:23:01.803 に答える
0

アコーディオンコンテナを使った仕事仲間を見つけました。タイトル付きのペインのみが含まれている場合は、ほぼ同じように見えます。

function example(ContentPane, Accordion, Button){

var titlePane = new Accordion({
       style: "height: 100%; overflow-y: auto"
     });

var innerPane = new ContentPane({title:'TITLE', content:'foo'})

titlePane.addChild(innerPane);

var outerPane= new ContentPane({
    content:titlePane,
    style: "height: 200px;"
}, dojo.byId("body2"));

outerPane.startup()
var button= new Button({
    label:"add line",
    onClick:function(ev){
        innerPane.set("content", innerPane.get("content")+"<br>foo")
    }    
}).placeAt(dojo.byId("body2"), "after");
}

require(["dijit/layout/ContentPane", "dijit/layout/AccordionContainer",
     "dijit/form/Button"], example );

http://jsfiddle.net/bzFPM/5/

于 2013-01-08T12:08:19.017 に答える