PDA

View Full Version : [CLOSED] Panel Collapse Tool



snow_cap
Jun 06, 2014, 6:06 PM
Hello,

In Ext.Net 1.x we can Add a Collapse Tool to a Panel and let it be resizable without showing a Small Splitter (Split=true, CollapseMode="Mini") (ScreenShot1.2), i can't see how to achieve the same behavior with Ext 2.x . (ScreenShot1.1)
please advise.

Thank you

Daniil
Jun 06, 2014, 9:39 PM
Hi @snow_cap,

Related to this Issue.
https://github.com/extnet/Ext.NET/issues/287

Instead of Split="true", please set

<SplitterConfig Collapsible="false" />
and add this override into the page's <head>:

<script>
Ext.resizer.Splitter.override({
beforeRender: function () {
var me = this,
target = me.getCollapseTarget();

Ext.resizer.Splitter.superclass.beforeRender.apply (me, arguments);

if (target.collapsed) {
me.addCls(me.collapsedClsInternal);
}
if (!me.canResize) {
me.addCls(me.baseCls + '-noresize');
}

Ext.applyIf(me.renderData, {
collapseDir: me.getCollapseDirection(),
collapsible: me.initialConfig.collapsible === false ? false : me.collapsible || target.collapsible
});

me.protoEl.unselectable();
}
});
</script>

snow_cap
Jun 07, 2014, 7:59 AM
Thank you, it's worked.