【问题标题】:BlackBerry objectlistfield developmentBlackBerry objectlistfield 开发
【发布时间】:2011-09-19 09:26:47
【问题描述】:

如何在BlackBerry中获取ObjectListField的索引,以便在单击对象列表中的一项时,我们可以检索一项的位置?

【问题讨论】:

  • 使用 getSelectedIndex() 方法

标签: blackberry


【解决方案1】:

使用以下代码获取索引:

int index =  yourObjectListField.getSelectedIndex();

以及下面的代码来获取文本:

String selectedText += yourObjectListField.get(yourObjectListField, yourObjectListField.getSelectedIndex());

【讨论】:

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