1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    10
    Vote Rating
    0
    Answers
    1
    RSSoll is on a distinguished road

      0  

    Default Answered: numberfield ReadOnly

    Setting readonly to true for numberfield in form will hide buttons for changing values, but it can still be changed by clicking on text-input and using keyboard to manually provide new value (this input field on form should also have readonly set).

  2. Hi Rssoll,

    readOnly config work fine for me, which framework are you used ?
    here is working sample example - http://jsfiddle.net/maneeshgo/YXtTy/

  3. #2
    Sencha User sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,334
    Vote Rating
    87
    Answers
    124
    sword-it is just really nice sword-it is just really nice sword-it is just really nice sword-it is just really nice

      0  

    Default

    Hi Rssoll,

    readOnly config work fine for me, which framework are you used ?
    here is working sample example - http://jsfiddle.net/maneeshgo/YXtTy/
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User
    Join Date
    Feb 2013
    Posts
    10
    Vote Rating
    0
    Answers
    1
    RSSoll is on a distinguished road

      0  

    Default

    Thanks for the answer!
    I can't really reproduce this error with jsfiddle, but it looks more similar to this:
    http://jsfiddle.net/4T7QW/5/

    I run some other tests and I know that if I put config 'testReadOnly' default value to true it works fine. If I pass value during construcion:
    Ext.widget('MyView', {testReadOnly: true});

    then all fields are readonly except numberField that can be changed with keyboard.

  5. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,344
    Vote Rating
    490
    Answers
    712
    scottmartin has a spectacular aura about scottmartin has a spectacular aura about scottmartin has a spectacular aura about

      0  

    Default

    You are setting a property .. try calling a method .. setReadOnly()

    Scott.

  6. #5
    Sencha User
    Join Date
    Feb 2013
    Posts
    10
    Vote Rating
    0
    Answers
    1
    RSSoll is on a distinguished road

      0  

    Default

    Okay, my fault, sorry guys. I had during construction config set to 'true' instead of true. The type got mixed up and my only excuse is that it worked for few fields and caused me quite a confusion (super effective ). I don't know if it is a bug or not, but thanks for help

    Reproduced effect:
    http://jsfiddle.net/YXtTy/1/

Thread Participants: 2

Tags for this Thread