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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 23
Registered: ‎09-04-2011
My Device: Torch 9800
My Carrier: Developer
Accepted Solution

setHorizontalScroll

Hi all,

 

i've tried to find the way to use setHorizontalScroll() method but it seems not to work in anyway i try.

 

when i call setHorizontalScroll(100,true);  my HorizontalFieldManager is still the same

and when i call getHorizontalScroll();   it returns 0

 

i'm not quite sure that " setHorizontalScroll(int position,boolean animate) is the method that will automatically slide HFM to position when animate is true

 

but if it is, i still don't know how to use it

 

it would be really nice if someone told me how to use it

Thank very much.

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: setHorizontalScroll

Check for any exceptions. Are you sure you are issuing it from EventThread?

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: setHorizontalScroll

It will work..

As per my concern it willn't give you the effect what you expecting if you override the touchEvent( )..

are you overriding the  touchEvent( ).?

*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Contributor
Posts: 23
Registered: ‎09-04-2011
My Device: Torch 9800
My Carrier: Developer

Re: setHorizontalScroll

Thank you for your reply

 

i did not override TouchEvent 

 

should i have to override any method to make setHorizontalScroll() working?

 

it's a bit basic question but ireally don't know about it

 

thank you

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: setHorizontalScroll


tklanilkumar wrote:

It will work..

As per my concern it willn't give you the effect what you expecting if you override the touchEvent( )..

are you overriding the  touchEvent( ).?


touchEvent has nothing to do with this. Again - can you check whether setHorizontalScroll throws any exceptions? This would be the most probable explanation why it doesn't do anything.

Besides - is your Manager wide enough (virtual width, that is) to need scrolling? Does it have HORIZONTAL_SCROLL style bit set?

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Contributor
Posts: 23
Registered: ‎09-04-2011
My Device: Torch 9800
My Carrier: Developer

Re: setHorizontalScroll

Thank for your reply

 

i can make it now, thank you very much 

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: setHorizontalScroll

Could you at least describe what was the problem? And mark the thread as solved?

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!