Skip to first unread message

Uzair Aftab

unread,
Jun 11, 2017, 10:00:10 AM6/11/17
to MIT App Inventor Forum
Hi,

I'm making an app, that takes a form input on one screen and stores that form persitently via TinyDB.

I want to be able to generate Text Boxes and Labels based on the form input. Moreover, I want to create a Table Arrangement based on the form input.

For instance, the form that I fill and then save, has the following information:

Number of Rooms: 5

Now, on the next screen, I want to generate 5 Labels, since the number of Rooms I mentioned in the form is 5.

Help?

SteveJG

unread,
Jun 11, 2017, 11:34:20 AM6/11/17
to MIT App Inventor Forum
App Inventor does not have the capability to dynamically generate any objects, that includes Labels and TextBoxes.
You cannot 'generate' 5 labels.  The labels you use have to be created in the Designer.

If you want to use 5 labels, you have to create 5 labels on the Designer.  To work around this limitation, 
you can hide some of the labels and only show them when needed.    Label1.visible to  false   to hide, set to true to display.

Alternatively you can use a List of 5 things, then use a ListView  to display them (when displayed in a ListViewer, they 'look'
 a little like 5 labels placed one above another.

Regards,
Steve


Reply all
Reply to author
Forward
0 new messages