Simon
Simon

Reputation: 1463

extjs: fieldset-change collapse icon

how to change the expand/collapse icon of a fieldset component? by default it's a inverted triangle arrow, I want to set it as "+"/"-"? use "itemCls"?

thanks!

Upvotes: 1

Views: 4011

Answers (1)

Egy Mohammad Erdin
Egy Mohammad Erdin

Reputation: 3413

modify the css of the collapse button (in here background-position)

here my css :

#plus-min.x-panel-collapsed .x-tool-toggle{
    background-position: 0 -240px !important; /*the plus sign*/
}
#plus-min .x-tool-toggle{
    background-position: 0 -255px !important; /*the minus sign*/
}

and my fieldset :

new Ext.form.FormPanel({
    renderTo : document.body,
    title : "asdasd",
    items :[{
            xtype:'fieldset',
            title: 'Plus Minus',
            collapsible: true,
            id : "plus-min",
            html : "asd",
            height : 100
        }]
});

Upvotes: 4

Related Questions