开发者

Dropdownlist in Blackberry

I need to develop the blackberry application using jave (eclips), can you plea开发者_高级运维se help me what are the events for dropdown and how to read the value of dropdown list , i tried using getText() method but its given error, can u please give small example on dropdown list in blackberry


final String[] data = {"A", "B","C","D"};
        ObjectChoiceField ocf = new ObjectChoiceField("Set your status", data);
        ocf.setChangeListener(new FieldChangeListener(){
            public void fieldChanged(Field field, int context) {
                if(context != PROGRAMMATIC)
                Dialog.alert(data[ocf.getSelectedIndex()]);

            }

        });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜