Would you like to tell us how we are doing?

You bet No thanks

Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.

Choice field: text-based drop-down list

Use a text-based drop-down list for text-based options that BlackBerry device users can select from a list. Users can select only one option at a time.



Supported since

BlackBerry Java SDK 5.0

More information

For more information about text-based drop-down lists, see the UI Guidelines.


This screen shows a text-based drop-down list.

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;

public class TextDropdownListDemo extends UiApplication 
    public static void main(String[] args) 
        TextDropdownListDemo theApp = new TextDropdownListDemo(); 
    public TextDropdownListDemo() 
        pushScreen(new TextDropdownListDemoScreen()); 
class TextDropdownListDemoScreen extends MainScreen 
    public TextDropdownListDemoScreen() 
        setTitle("Drop-down List Demo"); 
        String choices[] = 
        int iSetTo = 2;
        add(new ObjectChoiceField("Day of the week",choices,iSetTo));