dojo - how to obtain a resizable dijit dialog -
in dojo intend use dialog box resizable dragging mouse on rightmost corner edge. dialog such has no property resize it. try use floating pane , add dialog child. plan use resizable property of floating pane child i.e dialog. approach wrong ? d = new dialog({ title: "testing dialog", content: "hi" });
fp = new floatingpane({ title: "test", resizable: true, dockable: false, style: "position:absolute;top:0;left:0;width:100px;height:100px;visibility:hidden;", id: "fp" }, dojo.byid("fp")); fp.addchild(d); fp.startup();
it depends on aspect of dialog you're trying replicate floatingpane. if, instance want default action pane and/or dialog overlay, perhaps it's better idea extend dialog , add resize handler floating pane has.
if there more aspects of floating pane (e.g., moveable, resizeable, locked parent window), perhaps should extend floatingpane , add properties of dialog like.
either way though, depends on you're trying accomplish new dialog , features need. extending either suggestion. not, recommend accomplishing either placing dialog floating pane because can't see how accomplishes you're trying do. if explain use case more, can give more concrete example.
[edit]
you'll want @ this: http://dojotoolkit.org/reference-guide/1.10/quickstart/writingwidgets.html learn more how extend widgets.
looking @ floating pane code, you'll need add resizehandle extended dialog looks this:
<span dojoattachpoint="resizehandle" class="dojoxfloatingresizehandle"></span>
you'll need initialize doing this:
this._resizehandle = new resizehandle({ targetid: this.id, resizeaxis: this.resizeaxis },this.resizehandle);
resize handle can found @ dojox/layout/resizehandle
Comments
Post a Comment