icone in button extjs
Thursday, February 11th, 2010In this tutorial, I just want to give examples of how to use the icon on the button on extjs. I think this is a very simple example, and I’m sure has a lot to know about this. But there is nothing wrong if I write this tutorial, maybe there is not yet known. below is a sample script to create icon on button.
==script in javascript file==
buttons: [{
text:'Submit',
iconCls:'icon-close'
},{
text: 'Close',
iconCls:'icon-close',
handler: function(){
win.hide();
}
}]
“”"iconCls:’icon-close’,” is main of this tutorial. icon-close is name of class icon, and will load in html file,
this is a script html file
<STYLE type=”text/css”>
.icon-close
{
background-image:url(database_go.png) !important;
}
</STYLE>

