【问题标题】:Get text from the pickerWidget in Titanium Alloy从钛合金中的pickerWidget获取文本
【发布时间】:2014-12-23 07:08:29
【问题描述】:

我正在尝试使用一个名为danielhanold.pickerWidget 的小部件!通过单击标签,选择器应该弹出并将所选值设置为标签上的文本....我是钛和 javascript 的新手,所以任何人都可以告诉我如何获取所选值的文本...

function selectcity (e) {
   Alloy.createWidget('danielhanold.pickerWidget', {
   id: 'mySingleColumn',
     outerView: $.win,
     hideNavBar: false,
     type: 'single-column',
     selectedValues: [20],
     pickerValues: [{10: 'Auburn', 20: 'Bald', 30: 'Black', 40: 'Blond', 50: 'Brown'}],
     onDone: function(e) {
       // Do something
     },
   });
}

【问题讨论】:

    标签: titanium titanium-alloy titanium-widgets


    【解决方案1】:

    问题已解决...

    onDone : function(e) {
        $.label.text = e.data[0].value;
    },
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多