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()]);
}
});
精彩评论