2013-12-09 38 views
0

我想更改工具欄中按鈕的背景顏色。 我需要這個按鈕來顯示一個彙總值。更改工具欄中的backgorund顏色

我試着用

cls: 'button-matching-auto', 

和CSS文件

.x-btn-button .button-matching-auto { 
    background-color: #10E0E0; 
} 

無影響。

然後我試圖與

style: {color:'red'}, 

這是相同的:沒有影響

在Chrome的開發者工具,我可以看到,該顏色被應用, 但不可見。

怎麼了?

+1

你能分享你的html嗎?和一個小提琴如果可能的話 – DaniP

回答

1

「這是因爲按鈕有一個名爲CSS類 'X-按鈕' 與背景色設置爲默認 '#CCC' ......」http://www.sencha.com/forum/showthread.php?208417-Change-image-button

{ 
xtype: 'button', 
baseCls: 'null', 
cls: 'buttonRed 
} 

...如果您只需要默認的外觀和感覺的按鈕而不是一個灰色的......

我做這個改變的外觀和感覺,以得到默認的一個:

dockedItems: [{ 
     xtype: 'toolbar', 
     layout: { 
      pack: 'center' 
     }, 
     defaultButtonUI: 'default', // get default look and feel 
     dock: 'bottom', 
     items: [{ 
      xtype: 'button', 
      width: 200,   
      text: 'Download to Excel', 

     },{ 
      xtype: 'button', 
      width: 200,   
      text: 'Another action', 

     }] 
相關問題