【问题标题】:Extjs unpress buttonExtjs 按下按钮
【发布时间】:2014-01-27 17:13:09
【问题描述】:

我有一个这样的 ExtJS 按钮:

new Ext.SplitButton({
    text: 'Index',
    iconCls: 'index',
    scale: 'large',
    iconAlign: 'left',
    cls: 'header-item',
    handler: leftPanelNav, // handle a click on the button itself
    menu: new Ext.menu.Menu({
        items: [
            // these items will render as dropdown
            // menu items when the arrow is clicked:
            {text: 'Item 1'},
            {text: 'Item 2'}
        ]
    })
})

他的状态会被按下一次,我想知道当我想从脚本中解压时如何解压。

谢谢。

【问题讨论】:

  • 未按下的拆分按钮是什么样子的?
  • 看起来像他的初始状态。

标签: button extjs


【解决方案1】:

在按钮上调用toggle()

http://www.extjs.com/deploy/ext/docs/output/Ext.SplitButton.html(死链接)

http://dev.sencha.com/playpen/docs/output/Ext.SplitButton.html

如果它通过了一个状态,它 否则变为按下状态 当前状态已切换。

【讨论】:

  • 我还发现使用 toggle(state, true) 很有用。就我而言,我想切换状态但不触发事件操作
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-11-02
  • 2012-11-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多