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
Contributor
Posts: 40
Registered: ‎08-17-2010
My Device: Not Specified

How can spin the ListField on button clicked

Hello all,

           i have created a custom listfield which is in verticalfieldmanager and  i have a button. when the button is clicked the listfield has to rotate similar to a slot machine which we can find in casino's. How can i do this any suggestions.

 

Regads,

Goutham

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How can spin the ListField on button clicked

I would have looked at a SpinBox rather than a ListField if that was what I wanted. 

 

To make the ListField spin you could use .setSelectedIndex and have a Thread that keeps changing this.  Alternatively you can keep changing the scroll position on the Manager.  But personally if I have to do this, I would write a special Field that just does this, and I would have a Thread that I start when the button is clicked that updated paint in some way. 

 

What are you trying to achieve? 

Contributor
Posts: 40
Registered: ‎08-17-2010
My Device: Not Specified

Re: How can spin the ListField on button clicked

Thanks for the response peter,

            i want to make a field in that i want to place list of items(for ex: VenueName) when the user the user clicks the button the list has to spin and has to focus on item randomly.

 

FYI this thing what i m tring to do is refference from "urbanspoon" application.