Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
Saltzmeyer
Posts: 22
Registered: 09-02-2009
Accepted Solution

BasicEditField Cursor Position Scrolling Up vs Down

Hi everyone:   The application's screen has 5 BasicEditField 's

Before submitting the data, the user may want to edit one of the entries.

When scrolling  UP        with the trackball, the cursor appears  AFTER THE LAST char in the field.

When scrolling  DOWN with the trackball, the cursor appears  AT THE FIRST        char in the field.

 

This inconsistancy causes new users to make errors -- is there a way to have it behave the same in both directions?

Thanks.

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: BasicEditField Cursor Position Scrolling Up vs Down

You might try setting of a FocusChangeListener and explicitly setting the cursor position at '0' when the field get's focus.

 

See FocusChangeListener and BasicEditField.setCursorPosition()

 

Please use plain text.
Developer
Saltzmeyer
Posts: 22
Registered: 09-02-2009

Re: BasicEditField Cursor Position Scrolling Up vs Down

Thank you Rex:

I used             xxxxxxxxxxxxxxx.setCursorPosition(0)         xxxxxxxxxxxxxxx being the name of this particular BasicEditField   and 0 the offset

instead of      BasicEditField..setCursorPosition()          

                                                                                        Now it works the same going up or down

Please use plain text.