2016년 12월 27일 화요일

screen layout with multiple textboxes


HI attached is a screenshot from the Bridge Solver app. I am trying to imitate the screen layout. what would be the best way?  The screen should accommodate any card distribution which is not known when the screen is initially laid out  . I would like to use textboxes but they cannot be shifted around or created  by the blocks. A textbox is  required to change text background to show that a card has been played. I resorted to

image sprites because over 200 textboxes would be needed to cover all possible distributions. Suit symbols also need to be shown. Thanks for any advice  David

bsolver.jpg 표시 중
--
how many textboxes should be visible in the screen at the same time? this is the number of textboxes you need 
define these textboxes and reuse them to display different values
btw. you only need a textbox, if the user needs to edit its value, else to only display something a label would be the better component to use



A textbox is  required to change text background to show that a card has been played
that probably sounds, like a button could be used instead? there is no click event for textboxes or labels...

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of AppInventor, then try something and follow the
Top 5 Tips: How to learn App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

-- 
Hi I need only 52 textboxes or buttons, the problem is that when designing the screen I do not know the card distribution so I don't know where to locate these textboxes. A player could have  all 13 cards of a suit
 so each player would need an allotment of 52 boxes 13 for each suit and for 4 players that would add up to 204 boxes. The problem is that buttons and boxes cannot be shifted around by the program like sprites  Of course only 52 boxes will be used but 204 boxes would have to be prepared to cater for any card distribution

-- 
???
let's take this example...

I can see 4 images and 4 labels
label1 has the values K Q 9 7 3 
label2 has the values 10 6 3 2
etc.

-- 
Hi   , once the card distribution is placed it is required to animate the play sequence and this is done by changing the background of each individual card as it is played. To do that each card needs a   separate label

-- 
The more granular you get, the more code you will need.
How about flashing the label at a larger font size for a second to catch the player's eye?
Or flashing the background color for a second, then resetting it?

-- 

댓글 없음:

댓글 쓰기