Results 1 to 5 of 5

Thread: numberfield ReadOnly

  1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
      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,335
    Answers
    124
    Vote Rating
    91
      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
    Answers
    1
    Vote Rating
    0
      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,389
    Answers
    716
    Vote Rating
    497
      0  

    Default

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

    Scott.

  6. #5
    Sencha User
    Join Date
    Feb 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
      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/

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
  •