Results 1 to 4 of 4
  1. TBH
    TBH is offline
    TBH's Avatar
    Posts
    47 Posts
       #1  
    Hello everybody,

    I need a small hint - how can I read the number from an Integer Picker? Lets say, I have a scene with a button, an integer picker and a label. On pushing the button I would like to have the label showing the number that the Integer Picker has.
    I couldn't find anything on how to read the Integer Picker's value.

    Code:
    this.controller.get("label2").update(<what goes here for IntPick-Value??>);
    Thanks a lot,
    Tobi
  2. #2  
    You assign the picker a model and then read the value from that model. As the picker value is changed the model is updated..

    Code:
    this.controller.setupWidget("picker", {label: "Pick:", min: 2, max: 10}, this.pickerModel);
    
    // .. some code
    
    var value = this.pickerModel.value;
  3. TBH
    TBH is offline
    TBH's Avatar
    Posts
    47 Posts
       #4  
    Perfect, thanks a lot!

Posting Permissions