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
Contributor
SiraP
Posts: 23
Registered: 09-04-2011
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.

Please use plain text.
Developer
arkadyz
Posts: 2,146
Registered: 07-08-2009
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!
Please use plain text.
Developer
tklanilkumar
Posts: 97
Registered: 02-22-2011
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( ).?

Please use plain text.
Contributor
SiraP
Posts: 23
Registered: 09-04-2011
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

Please use plain text.
Developer
arkadyz
Posts: 2,146
Registered: 07-08-2009
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!
Please use plain text.
Contributor
SiraP
Posts: 23
Registered: 09-04-2011
My Carrier: Developer

Re: setHorizontalScroll

Thank for your reply

 

i can make it now, thank you very much 

Please use plain text.
Developer
arkadyz
Posts: 2,146
Registered: 07-08-2009
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!
Please use plain text.