📜 ⬆️ ⬇️

TabWindow plugin window minimized / expandable in TabPanel

Ext.Helper.TabWindow


I spread the extension (as long as karma allows, thanks to the plus-blown) Ext.Window -> Ext.Helper.TabWindow , which itself can be minimized to TabPanel and, accordingly, turn back to the window.


UPD . In short, those who are familiar with the TabPanel component (the panel that implements multi-tabs, like any modern browser, for example), know that the Panel component is the TabPanel tab, which in turn Window extends the Panel. I was faced with the task of fixing on TabPanel - Window instances, for this purpose the Window component was expanded.

I’ll say right away that I don’t claim a prize for a clear style code, I have knowledge of extjs, but not the same as I would like, so the extension works above all, and the code ... Well, I tried, honestly.
')


For this effect, we had to expand both Ext.Window and Ext.TabPanel, so in the archive below you will also find the class Ext.ExtendTabPanel

At first I tried to format it as a plug-in, but there were some limitations, so I spat and rewrote it under the extension.

There is a lot of code, so I don’t even know whether to put it here or not ... I’m probably not going to ...

Ext.namespace('Ext.Helper'); Ext.Helper.TabWindow = Ext.extend(Ext.Window, { tabpanel : null, //  extendtabpanel   ,    -  , bindable : false, //true,      autobinding : false, //   ,  true,     tabpanel  isTab : function() {}, // true -   TabPanel,  false bind : function() {}, //   unbind : function() {}, // }); Ext.reg('tabwindow', Ext.Helper.TabWindow); 


Example:

 new Ext.Helper.TabWindow({ tabpanel : tabpanel, width : 400, height : 300, title : 'bind window ' , maximizable : true, bindable : true }).show(); 


UPD: The archive is a fully working example, so who needs it and so will understand, thank you for your attention!

PS If suddenly the archive is not where it is needed, write, restore it ...

Source: https://habr.com/ru/post/107084/


All Articles