How do you create a Select List?

Hi,

What is the best way of creating a select list? Or any other way of selecting one item from a large list.

Thanks

Kevin [import]uid: 72726 topic_id: 14320 reply_id: 314320[/import]

Can you be a tad more specific, please? :slight_smile:

What sort of a list are you trying to build? Are you talking about Corona UI or are you wanting a list of possible characters in a game, etc? [import]uid: 52491 topic_id: 14320 reply_id: 52864[/import]

No worries,

I have a list of items in a database, and want the user to be able to select one of them if it was html it would pretty much be:

[html]

Item One

Item One

Item One

Item One


[/html]

I know that is a basic select list, but if thats all that can be done then that is fine. Will want to get the id of the item that is selected passed to the eventHandler as well.

Thanks

Kevin

[import]uid: 72726 topic_id: 14320 reply_id: 52865[/import]

Well in iOS, HTML tags are rendered in picker wheels.

The widget API now has a picker wheel to use.

See: http://developer.anscamobile.com/reference/index/widgetnewpickerwheel
But if you wanted to do it in some other way, you would need to code it up with your own boxes, text objects and such.
[import]uid: 19626 topic_id: 14320 reply_id: 52891[/import]

But doesn’t the scroll wheel only work on iphone?

I want a generic solution that I can push to android and iphone without any changes in code, how else would you handle the changes?

I need ways of doing radio buttons, checkboxes and select menus. Surely there is an easy way of doing this??? [import]uid: 72726 topic_id: 14320 reply_id: 53533[/import]

It looks like the widget library is iOS only as of now.

But Jon BeeBee has something in the community code library that uses the native.webPopup feature to render a native picker wheel using a little javascript.

http://developer.anscamobile.com/code/custom-ios-wheel-picker-looks-native

While only iOS is discussed on the page, this should work with Android since it will be using chrome to render the data, so it should look just like a native select on Android.
[import]uid: 19626 topic_id: 14320 reply_id: 53621[/import]

Hi,

thanks robmiracle, i’ll look in to this, pity the android widgets aren’t released yet though, is there any timeframe on it???

I am creating a non game app so I know corona isn’t perfect, but to be honest there’s not much it needs to make it easy enough to do pretty much anything.

Radio buttons / checkboxes and select menu’s are the big ones it needs really. [import]uid: 72726 topic_id: 14320 reply_id: 53702[/import]