开发者

Dropdownlist in Blackberry

开发者 https://www.devze.com 2022-12-30 07:53 出处:网络
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 usinggetTe

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

精彩评论

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