2009-09-17 3 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

토글 (상태, 참)을 사용하여 유용하다는 사실을 발견했습니다. 제 경우에는 상태를 전환하고 싶지만 이벤트 액션을 트리거하지 않았습니다. –