2017년 6월 7일 수요일

using Listpicker to create categories?


I'm very new to creating apps, and all my searching has come up blank so I'm asking here.  Is it possible to use a list of numbers, in listpicker to create categories so that I don't have to predefine a set number of text boxes and then have some empty.  Let me explain - I am trying to create an inventory app and I'm using listpicker to ask how many categories the user will have.  Then after that number is chosen to have text boxes where the user can input their category names.  So, instead of creating 15 categories and having 11 empty if the user only needs 4, is this something that can be created dyamically?

So, I certainly don't mind doing the research and learning myself, but I don't even know what this would be called.  So if someone can just point me in the right direction, I'll go birddog it.

--
just use a textbox to enter a new category and a button to add that category into the category list, then in the listpicker display the list with all the categories
of couse you have to store the category list in TInyDB

first do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
Sorry, App Inventor can not create objects dynamically.

What users do in your situation is create  enough text boxes that will ever be needed, then within the list picker,   hide or show only the number of text boxes that are needed  using set Textbox1.Visible to true or false.     A neat feature of the TextBox that you can use a hint, rather than have a label next to each text box explaining what each text box is for  so use the built in hint feature of the Textbox.    If you clear all text in the TextBox, the hint appears.     You can write a routine clearing all your text boxes using the advanced component if you want to always start data entry with a clean slate.

--
Excellent!  Thanks so much.

--

댓글 없음:

댓글 쓰기