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.

Text field: AutoText edit

Use an AutoText edit field to automatically correct text that a BlackBerry device user types in the field. The text is corrected based on the AutoText definition list, which lists common typographic errors and corrections. The text is corrected when the user presses the Space key.

Class

AutoTextEditField

Supported since

BlackBerry Java SDK 4.0

More information

For more information about AutoText edit fields, see the UI Guidelines.

Example

This screen shows an AutoText edit field.

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.component.AutoTextEditField;

public class AutoTextEditFieldDemo extends UiApplication
{
    public static void main(String[] args) 
    {
        AutoTextEditFieldDemo theApp = new AutoTextEditFieldDemo();
        theApp.enterEventDispatcher();
    }
    
    public AutoTextEditFieldDemo()
    {
        pushScreen(new AutoTextEditFieldDemoScreen());
    }
}

class AutoTextEditFieldDemoScreen extends MainScreen
{
    public  AutoTextEditFieldDemoScreen()
    {
        setTitle("AutoText Edit Field Demo");
        
        AutoTextEditField myField = new AutoTextEditField("Description: ", "");
        
        add(myField);
    }
}