2009-09-17 8 views
6

私はこのようなExtJSのボタンがあります。ExtJSのunpressボタン

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'} 
     ] 
    }) 
}) 

彼の状態を一度に押されるだろうが、私は私がスクリプトからしたいとき、私はそれをunpressできる方法を知りたいです。

ありがとうございます。ボタン上の

+0

非分割のボタンはどのように見えますか? – Lukman

+0

彼の初期状態のようです。 –

答えて

12

コールtoggle()

http://www.extjs.com/deploy/ext/docs/output/Ext.SplitButton.html(デッドリンク)

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

それが渡された状態では、それ が押された状態になるとそうでない 現在の状態がありますトグルされた。

+0

ありがとうございます。 –

+0

私はトグル(状態、真)を使うことも有用であることが判明しました。私の場合、私は状態を切り替えたいが、イベントアクションをトリガーしない –

関連する問題