PDA

View Full Version : adding custom tools to the title panel



tomapete
17 May 2012, 11:10 AM
Hi,
I know how to add custom tool in ExtJS 3.4 using x-tool-... styles, but this doesn't seem to work in ver 4.
Could anyone please help?
Thanks

Mike

sword-it
17 May 2012, 10:55 PM
Hi,

Make a css class with a name like:



.x-tool-(the type name here){ background-image: url(imageName.png) !important;}

And then it should just work by using your new type attribute as :-




tools:[
{
type:'your type name',
tooltip: 'Your tooltip',
handler: function(event, toolEl, panel){
// Your handler function
}
}
]

tomapete
18 May 2012, 4:41 AM
Yes, thanks. This worked. I didn't use important! and it did the trick.
Thanks again, much appreciated

Regards

Mike