Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
New Developer
Posts: 26
Registered: ‎11-20-2008
My Device: Not Specified

Override Focus Resetting When Clicking a Field

Hello,

 

I have some custom Fields that paint blocks of text in a scrolling VerticalFieldManager. These fields are focusable since they expand/contract in size when they recieve a navigationClick event. When a given field is expanded, the user may need to scroll down in order to read the entire contents. All of  this works fine, except that when you touch the custom field in order to scroll down the screen, the internal method moveFocusToFieldWithInput is called which resets the screen position to the TOP of the currently focused field. Is there a way to change this behavior? The user needs to be able to scroll down the VerticalFieldManager and touch fields in the process without the focus being reset to the top of the field. I have look at trying to override all focus related fields, including moveFocus on the VFM and the screen, but none seem to alter this behavior.

 

Thanks. 

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Override Focus Resetting When Clicking a Field

maybe setVerticalScroll can help. are the fields in the same manager as the text? could help to put them into different ones.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 24
Registered: ‎07-30-2008
My Device: Not Specified

Re: Override Focus Resetting When Clicking a Field

 jeffm,  do you resolve this issue?

 

, setVerticalScroll does not help is this case, because this method is not used for resetting the scroll value.

 

New Developer
Posts: 26
Registered: ‎11-20-2008
My Device: Not Specified

Re: Override Focus Resetting When Clicking a Field

No, I never found a solution to this. The workaround was to refactor the code to use a focusable ActiveRichTextField which magically does not seem to have this problem.

New Contributor
Posts: 2
Registered: ‎08-13-2010
My Device: Not Specified

Re: Override Focus Resetting When Clicking a Field

I think i have the same problem. do you resolve this issue?

 

I post my problem here:

 

Problem on Custom List when the focus is obtained