View Full Version : Image buttons / Custom built buttons

Jul 14, 2008, 1:59 PM
Hi there,

I am wondering if anyone has implemented a custom built button. I have been playing around with a number of methods, from extending the existing Ext.Button class in the toolkit, to creating my own from scratch. Neither have been what I am looking for.

Essentially, I am looking for a Ext.Button type object with the additional ability to render itself as a custom image instead of the usual button; while keeping the existing functionality as the Ext.Button control. This would include ability to have icons on the button, have different images (or use of a sprite) display for different states - i.e. normal, hover, click.

If this has not been implemented; then I would be interested in what the best practice methodology is for extending the toolkit and how best would one override the rendering of the control without losing core functionality.


Jul 15, 2008, 8:43 AM
Hi Conor,

Could you post (or link to) a sample image(?) demonstrating the type of button you would like to build?

Jul 15, 2008, 11:01 AM
I was thinking of any image really, such as the ones attached to this reply. In quite a few scinarios the designers provide me with images which are to be used as buttons. I am working real hard to find all different possibilities and usages for Coolite controls and this is being a key one at the moment.

Apart from the ones attached withhave no icons, we may get a standrd button which will have icons in them depending on their usage. Pretty much like the current button object allows, but in this instace the background would be totally different. Can always change the css directly; but would not want to do that I may only want to have a specific change for a once off.

Any help in pointing me in the right direction will help immensely.