PDA

View Full Version : image tab panel



benimben61
28 Jan 2011, 6:18 AM
wanna create a tabpanel but tabs have no title just 48x48 iamge how can i modify grid tabs can anyone help?

dduffy
28 Jan 2011, 8:25 AM
A Tabpanels do have titles see example



var tabs = new Ext.TabPanel({
renderTo: Ext.getBody(),
activeTab: 0,
items: [{
title: 'Tab 1',
html: 'A simple tab'
},{
title: 'Tab 2',
html: 'Another one'
}]
});

valititi
28 Jan 2011, 8:39 AM
you can also put html in the title as :
title:"<img src=yourimage.gif>"
but is ugly code...
try with
iconCls:'yourCustomImage'
that you define in one of your css files...
may this help ?

dduffy
28 Jan 2011, 8:47 AM
dont embed HTML into the Title just for an image us the iconCls attribute your class will then look like
.icon-title {background-image: url("/coreimages/tabTitle.png") !important;}

benimben61
28 Jan 2011, 11:53 PM
thanx for reply i know that one but i wanna create a tab no title and a big image for example a tab's icon max height 24x24 i wanna add an icon 64x64 how can i do this ?? thanx for repliesto everyone

valititi
29 Jan 2011, 9:26 AM
this don't work with iconCls ? Your image is too big ?
then change the style of the item. you can change the default with your own. See in doc. There are only few 3-4 options related to style :-) I am sure you'll find it :-)