Results 1 to 4 of 4
  1.    #1  

    I'm trying to make a textfield show a disclaimer and want to make it readonly. I've setup the textfield as follows below but can't figure out how to make it "read-only":

    var attributes = {
    textFieldName: 'Disclaimer',
    focus: false,
    blur : true,
    textReplacement: false,
    hintText: 'null',
    modelProperty: 'original',
    multiline: true,
    limitResize: true};
    this.model = {
    'original' : ''
    this.controller.setupWidget('multilineTextField', attributes, this.model);
  2. jblebrun's Avatar
    43 Posts
    Global Posts
    45 Global Posts
    If you are just trying to display static text, why do you want a TextField widget at all? Just display the text in a div.

    But as an answer to your question, you can disable almost any widget (include TextField) by setting the disabled property of the widget model to false.

    This is quite clearly stated in many different places in the webOS documentation. You may want to try reading carefully through the tutorials and guides, and try looking for answer in the documentation before posting. Some of the documentation is lacking, but I think in this case, the answer was there for you.
  3.    #3  
    Thanks. THis worked below.

    this.model = {
    'original' : '',
    disabled: true
  4. #4  
    If you're just displaying static text, just place the text in between div tags. It's a lot easier for the Pre to display text in a div that it is to instantiate a whole new textbox object.
    Developer of:

    Discuss my apps in my developer forum

Posting Permissions