Results 1 to 3 of 3
  1.    #1  
    I am using a TextField and I need a zero value to be displayed. The field also needs to support large numbers, so an IntegerPicker would not be appropriate.

    After updating the model a blank text field is displayed. Anyone have any luck with this?

    <div class="palm-row-wrapper textfield-group" x-mojo-focus-highlight="true">
    <div class="title">
    <div class="label">x 2</div>
    <div id="x2" x-mojo-element="TextField" align="left"></div>
    </div>
    </div>


    this.x2model =
    {
    value: '',
    };


    this.controller.setupWidget("x2",
    {
    autoFocus: false,
    preventResize: true,
    enterSubmits: false,
    disabled: false,
    modifierState: Mojo.Widget.numLock
    },
    this.x2model);

    //on event

    num_x2 = 0;

    this.x1model.value = Number(num_x2);
    this.controller.modelChanged(this.x2model);
  2. #2  
    I don't know the language you are using, but if you cannot get your program to display the zero character when the variable's value is 0, how about something along the lines of:

    if variable_xyz = 0 then display "0", else display variable_xyz
  3. #3  
    Not sure if you just copy and pasted your code but

    Quote Originally Posted by MillCity View Post
    num_x2 = 0;

    this.x1model.value = Number(num_x2);
    this.controller.modelChanged(this.x2model);
    could that be it?

Tags for this Thread

Posting Permissions