I'm looking for ideas on how to create a scrollable group of list buttons for iOS. This is a common iOS ui theme I'd like to replicate. I read the tutorial on making the scrollable field, but no luck trying to do the same thing with list buttons.
Also as another question, is it possible to create a dynamic group of list buttons based on a query of a database. Essentially, I'd like to generate a list button for each item in table.
Creating a scrollable group of list buttons
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Creating a scrollable group of list buttons
Hi Kyle12345,
I have done a little stack for an other case
It should be useful for you (to build a group by script)
I put it in attachment here:
http://forums.runrev.com/phpBB2/viewtop ... =8&t=14296
Best regards
Jean-Marc
I have done a little stack for an other case
It should be useful for you (to build a group by script)
I put it in attachment here:
http://forums.runrev.com/phpBB2/viewtop ... =8&t=14296
Best regards
Jean-Marc
https://alternatic.ch
Re: Creating a scrollable group of list buttons
Thanks for your feedback, I'm sorry but I had trouble following exactly what you were working on. I did however come to a solution that is relatively easy if anyone else wants to create a similar effect.
Using MobGui, I placed a native scroller on the card. Then within the group, I add as many list buttons as I need and position them properly. I can't see the bottom list buttons, but they are still there...I reference them using the the application browser. I group them and then reposition them accordingly. Simple, easy, effective.
My next thought for the second part of my question is to possibly put a large quantity of list buttons, pull the data I'm looking for, set the information onto needed list buttons, then delete the excess buttons? It is certainly not an elegant way to do it...but I'd imagine it would work. I just need to find out how to delete ui elements in the script. Maybe I can find that in your code from above?
Using MobGui, I placed a native scroller on the card. Then within the group, I add as many list buttons as I need and position them properly. I can't see the bottom list buttons, but they are still there...I reference them using the the application browser. I group them and then reposition them accordingly. Simple, easy, effective.
My next thought for the second part of my question is to possibly put a large quantity of list buttons, pull the data I'm looking for, set the information onto needed list buttons, then delete the excess buttons? It is certainly not an elegant way to do it...but I'd imagine it would work. I just need to find out how to delete ui elements in the script. Maybe I can find that in your code from above?
Re: Creating a scrollable group of list buttons
Hi Kyle12345,
Best regards
Jean-Marc
An example of a way to build a group of controls automaticaly by scriptI had trouble following exactly what you were working on
Yes. The stack does thatdelete the excess buttons
It seem the height and width of a group have a limit. I met mistake when a group is larger than 31000,31000a large quantity of list buttons
Best regards
Jean-Marc
https://alternatic.ch
Re: Creating a scrollable group of list buttons
I guess it depends on the source of your data, but it should be simpler to step through your data and create a button for each relevant entry. That way you don't need to delete unwanted items (wasting time creating them then deleting them).
I would create a Group, then create Buttons within the group (probably going through some sort of Repeat loop). Then finally crea te a Scroller around the Group. (And don't forget the ScrollerDidScroll handler, as I often seem to do).
Hope that helps.
Adrian
I would create a Group, then create Buttons within the group (probably going through some sort of Repeat loop). Then finally crea te a Scroller around the Group. (And don't forget the ScrollerDidScroll handler, as I often seem to do).
Hope that helps.
Adrian