View Full Version : how to show icon on page and use as button

20 Dec 2010, 5:42 AM
I want to display icon on page and use it as button.
which property should i use to display just icon.

20 Dec 2010, 11:17 AM
See the preamble of the API docs for Ext.BoxComponent (http://dev.sencha.com/deploy/dev/docs/?class=Ext.BoxComponent). There's an example of creating a BoxComponent to wrap an image.

20 Dec 2010, 10:34 PM
Thanks Screamy for you help.
I am able to display image but its not clickable
Listeners peoperty is not working on this.
I want to make it clicable also

20 Dec 2010, 11:34 PM
xtype: 'box',
autoEl: {
tag: 'img',
src: MS.ImpactSisterApp.SisterWebAppBase + 'icons/Excel.bmp'
style: 'padding-right:15px',
listeners: {
render: function(c) {
target: c.el,
text: 'Export Complete Model File List to Excel'
'click': function () {
MS.ImpactSisterApp.SisterAppEventManager.fireEvent("generateReportInvestmentModelsStatusFinal", {
method: "generateReportInvestmentModelsStatusFinal",
reportingPeriodId: repPeriodCombo.selectedItem.ReportingPeriodId
scope: c

20 Dec 2010, 11:45 PM
Thanks Condor
I am getting error b.register is null or not an object

21 Dec 2010, 12:42 AM
Do i have to add some class to remove this error "b.register is null or not an object"

21 Dec 2010, 2:27 AM
Errors from ext-all.js are completely useless! Use ext-all-debug.js during development.

Can you post the error again, but now using ext-all-debug.js?

21 Dec 2010, 3:38 AM
Condor, Is there any effect of changing ext-all.js to ext-all-debug.js on whole application.
I am working on very huge application, I can not change js.
Is there any other solution

21 Dec 2010, 3:41 AM
They are same but ext-all.js is minified. Btw after getting error fixed you can return the ext-all.js again.