PDA

View Full Version : ExtJS 3.2.0, hide tabpanel's header



TheHorse
21 Apr 2011, 4:37 AM
PLs tell me how i can hide header of tabpanel "..." if my tabpanel have only one tab?

I can't use Ext.Panel becose I use fairly sophisticated methods for generating extjs code on the server, and there is a large number of design errors that do not allow me to generate the usual Ext.Panel for this case.
http://i.imgur.com/n0FHR.png

Screamy
21 Apr 2011, 4:53 AM
Try this:


yourTabPanel.hideTabStripItem(0);

Note that you'll still see the blue bar where tabs are normally rendered.

TheHorse
21 Apr 2011, 4:58 AM
thx. it's good, but i have to hide all strip(.

friend
21 Apr 2011, 5:09 AM
Try this CSS override:



<style type="text/css">
.x-tab-strip-wrap {
height: 0px;
}
</style>

TheHorse
21 Apr 2011, 6:46 AM
snx. i will try

TheHorse
21 Apr 2011, 7:25 AM
tnx all, Solution:
i add to

.strip-hidden .x-tab-strip-wrap
{
display: none;
}

.strip-show .x-tab-strip-wrap {
display: block;
}

and on server side (delphi, something like ExtPascal)



if (frmContainer.Tab.Items.Count = 1) then
frmContainer.Tab.Cls := 'strip-hidden'
else
frmContainer.Tab.Cls := 'strip-show';

So, it's work for me (chrome, firefox).

i add to rules becose i have windows in windows, so if child windows have many tabs - it will be hidden by css rule of parent window. so i have to rules and it works.