Results 1 to 3 of 3

Thread: Mouse on Hold to increment & Decrements the number like xtype:NumberFiled

  1. #1

    Default Mouse on Hold to increment & Decrements the number like xtype:NumberFiled

    Hi All,

    I have my text field with segmented buttons with + and - for numbers increment and decrements like below image
    Temp.JPG
    Logic to increment & Decrements


    items: [{
    text: '+',
    handler: function() {
    var temValue =parseInt( Ext.getCmp('mytempId').getValue());
    if(isNaN(temValue)){
    Ext.getCmp('mytempId').setValue(0);
    }else{
    Ext.getCmp('mytempId').setValue(temValue+1);
    }
    }
    },{
    text: '-',
    handler: function() {
    var temValue =parseInt( Ext.getCmp('mytempId').getValue());
    if(isNaN(temValue)){
    Ext.getCmp('mytempId').setValue(0);
    }else{
    Ext.getCmp('mytempId').setValue(temValue-1);
    }
    }
    }]


    Problem is I can Increment value only on click but I need on mouse hold to increase the value.
    Can some help to solve this Issue.

    Thanks In advance

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Which specific version of Ext JS are you using?

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    914
    Answers
    105

    Default

    Button has repeat config which has to be set to true for click event to be fired repeatedly.

Similar Threads

  1. Issue with numberfield (xtype:'numberfiled')
    By rajesh.madaswamy in forum Sencha Touch 2.x: Discussion
    Replies: 3
    Last Post: 1 Jun 2013, 9:09 AM
  2. Replies: 5
    Last Post: 5 Mar 2012, 2:18 AM
  3. Replies: 0
    Last Post: 28 Jul 2010, 8:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •