Faster way to place numbers into label .text?

22 views
Skip to first unread message

Lieven Van Parys

unread,
Dec 19, 2016, 9:16:06 AM12/19/16
to MIT App Inventor Forum
Is there a better way to put 40 numbers (or more) into text of 40 (or more) labels. I already use  a list.
Thanks
Lieven
lotoflabels.JPG

SteveJG

unread,
Dec 19, 2016, 9:40:54 AM12/19/16
to mitappinv...@googlegroups.com
What you might do depends on why you need 40 labels Lieven.   Perhaps Taifun's dynamic table will work for you   http://puravidaapps.com/table.php  

If not, you might use the Control block  for each item in list     in conjunction with the  AnyComponent>AnyLabel Advanced Blocks.  How?  This is possible, you are going to need to learn how to use the advanced blocks ...  Try something and show us what worked.   Some hints are:


and for the advanced blocks



Merry Christmas, Wesołych Świąt,  Feliz Navidad, God Jul, Joyeux Noel, Καλά Χριστούγεννα, Happy Christmas, Veseloho Rizdva, Prettige Kerstdagen, Frohe Weihnachten!, 성탄 축하 , Buon Natale,  聖誕快樂 ,  圣诞快乐,  Sretan Božić, C рождеством!,  عيد ميلاد مجيد,
Steve



Lieven Van Parys

unread,
Dec 19, 2016, 11:47:19 AM12/19/16
to MIT App Inventor Forum
Thank you Steve for your information.
I tried to work something out with advanced blocks.
I already can put a fix value into the text, but not the numbers of the 'Topscoreslijst'.
Hint?
Thanks a lot!
Lieven





lotoflabels_2.JPG

Taifun

unread,
Dec 19, 2016, 12:08:54 PM12/19/16
to MIT App Inventor Forum
create additionally a local variable, you can call it index and increment its value inside the for each loop, then use that variable together with the select list item block to select the 1st, 2nd, 3rd item, etc from that list

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.        

Abraham Getzler

unread,
Dec 19, 2016, 12:13:54 PM12/19/16
to MIT App Inventor Forum
What's wrong with using a ListView for the list, instead of all those Labels?
ABG

Lieven Van Parys

unread,
Dec 19, 2016, 12:49:22 PM12/19/16
to MIT App Inventor Forum
Thank you all!
Lieven
lotoflabels_3.JPG
Reply all
Reply to author
Forward
0 new messages