0

I have panel wiht toolbar with buttons. Panel resizable when it small buttons hide in menu. In menu it show icon and value of overflowText. But on click button i need change overflowText.

expandClick: function (btn) {
    var me = this;

    btn.blur();
    btn.overflowText = btn.overflowText === "expand" ? "reduce" : "expand";

    view.fireEvent('expandGraph', view);
}

in browser's console on breckpoint i see right value but there is no change in interface. Why?!

Lokser
  • 17
  • 10

2 Answers2

0
btn.setConfig( name, [value] ); 

try to use this function to set specific initial configs dinamically. Sometimes the button din't refresh his state if you modify directly the variable

LellisMoon
  • 4,810
  • 2
  • 12
  • 24
  • if (btn.overflowText === 'expand') { btn.setConfig('overflowText','reduce'); } else { btn.setConfig('overflowText', 'expand'); } - this dont work too(( – Lokser Feb 03 '16 at 14:09
  • try @Sergey solution after value changing, btn.doLayout() – LellisMoon Feb 03 '16 at 14:14
0

Try to refresh component layout with doLayout() method after you change overflowText property.

Sergey Novikov
  • 4,096
  • 7
  • 33
  • 59