B4J Code Snippet B4J Spinner - Simple

This is a simple spinner for B4j (though it would easily port to B4a) based on a canvas object. I 'looks' more like the spinners used in B4A than the combobox offering in B4J

The Spinner continuously rotates around the string array data provided and outputs the center value as an 'answer' on each mouse click. The background image size needs to be scaled to match the cvs size you use.

I'm sure this can be improved on......
 

Attachments

  • Spinner-B4J.zip
    2.3 KB · Views: 289

rodmcm

Active Member
Licensed User
Updated as a class as well as incorporated some additional learnings
 

Attachments

  • B4JSpinner as Class.zip
    6.8 KB · Views: 287

rodmcm

Active Member
Licensed User
Two samples using attached images in zip BlackSpinner.JPG GreySpinner.JPG
 
Top