PDA

View Full Version : Icons on SegmentedButton Buttons



andreig
19 Oct 2010, 1:11 AM
Hello, I have a list of buttons on an SegmentedButton line. Does the iconCls actually work for this type of container ? For the code shown below I only get a "placeholder" type of empty space where the icon would go, there is no icon there, only the background image. Also, trying with an icon path does not work.

this.navigationButtons = new Ext.SegmentedButton({
allowMultiple: false,
items: [
{
text: 'Home',
pressed: true,
id: 'homeTabButton',
order: 1,
/*iconCls: 'home',*/
scope: this
},{

Hertz
23 May 2011, 3:01 PM
Old topic but i just came across this requirement and wanted to post the solution.

In order for the icons to show, you need to set iconMask to true as the docs say:


button = new Ext.Button({

id: 'myButton',
iconCls: 'arrow_down',
iconMask: true

});


In your code, it would be:



this.navigationButtons = new Ext.SegmentedButton({
allowMultiple: false,
items: [
{
text: 'Home',
pressed: true,
id: 'homeTabButton',
order: 1,
iconCls: 'home',
iconMask: true,
scope: this
},...