Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. button.fireEvent('click', button);
  2.  
  3. 1)Create the event code in a function and call the function from both sides: btn.on("clic", ...) and from the code you want to simulate the click.
  4.  
  5. 2)Use: btnView.btnEl.dom.click();
  6.  
  7. Ext.create('Ext.Button', {
  8. text: 'Click me',
  9. renderTo: Ext.getBody(),
  10. handler: function() {
  11. alert('You clicked the button!');
  12. }
  13. });
  14.  
  15. Ext.create('Ext.Button', {
  16. text: 'Click me',
  17. renderTo: Ext.getBody(),
  18. handler: someOnClickFunction
  19. });
  20.  
  21. someOnClickFunction = function( aButton, aEvent, aeOpts)
  22. {
  23. // Do something here
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement