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
New Contributor
Posts: 5
Registered: ‎08-04-2011
My Device: 8520
My Carrier: airtel

how to do a page scroll inside a activetichTextfield?

hello guys,

plz help me...i want to do page like scrolling inside a activerichtextfield....my field contains large data...i want to add functionality that can help the user in scrolling pagewise...when user scrolls the page, cursor should be on the top left corner of the new page.....any idea abt it guys...plz help asap.........

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: how to do a page scroll inside a activetichTextfield?

Try the method "setCursorPosition"

 

New Contributor
Posts: 5
Registered: ‎08-04-2011
My Device: 8520
My Carrier: airtel

Re: how to do a page scroll inside a activetichTextfield?

hey rex thanks for the reply....is ther anyway u can set the cursor position on top left on each page???
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to do a page scroll inside a activetichTextfield?

I am not aware of a way of doing this.

 

I have a different suggestion to RexDoug's, and that more closely replicates what the user would do/see.

You can calculate the number of lines that would display, not sure exactly how to do this, but you could start by dividing the the Screen height by the font height.  Now you know how many lines are displayed on the page.  Then you can figure out some way of taking the trackball down that many lines, I think you might get away with calling navigationMovement with the value of n (number of lines) in the dy.  Then the cursor will move straight down and the scroll should go with it. 

 

I think parts of this can be refined, so give this a go and see if it works, then we can work on figuring out exactly how many lines to do down. 

New Contributor
Posts: 5
Registered: ‎08-04-2011
My Device: 8520
My Carrier: airtel

Re: how to do a page scroll inside a activetichTextfield?

hey peter thanks for the reply....i will try it out....