在EXTJS中沒辦法在Button這個類別中直接指定按鈕上的icon圖示,需要透過CSS的方式來設定。
1.在標頭部分設定CSS的程式碼
<head>
<style type="text/css">
.btnRightCls {background-image: url([你的icon路徑]) !important;}
</style>
</head>
2.在Button內設定iconCls參數
var rightButton = new Ext.Button({
iconCls: 'btnRightCls'
});
0 意見:
張貼留言