I have a Table Arrangement 3 col, x 2 rows with check boxes in col 1, labels in col 2, and buttons and invisible labels. Although in designer it all works as expected , in the emulator and running on a phone, it does not. I want two buttons to show in col 3 and when I make the buttons invisible and the labels to show up in col 3. The problem is the buttons never show. Also making components invisible shift components from their assigned grid. If I make the top left checkbox invisible, the top row of visible components shift 1 cell to the left.
fault1.aia (3.3 KB)Yes, there is a bug in the table arrangement that causes this.
Either:
- Don't use the table arrangement, use other arrangements and labels for layout
or - Ensure all table arrangements are set to pixel or percentage sizing
Background:
What is the easiest way to get change the table to vertical layouts. I currently have a 5 col by 12 rows of component to shift over. If I delete the table, does it get rid of the components in it?
Deleting the table arrangement WILL delete all the components inside it, so don't do that!
Try 1 x Horizontal arrangement, then put 5 x vertical arrangements inside it
If your components (buttons/labels etc) are sized appropriately, they may naturally form the "rows"
So how do I shift my components from the table to the horizonatl /vertical layouts?
The only way is to drag and drop using the designer. You will have to do some fiddling about, hiding things (untick visible), and set screen1 scrollable. Also make the designer fit the window (monitor size).
Did you try changing the sizing ? Might be easier....
Yes I tried changing the sizing. Everything was specified as percentages. Did not help.
Hi Bill_H
Some tips on building a GUI:
https://www.professorcad.co.uk/appinventortips#TipsGui
Thanks for the tips. I worked out most of them already. Just to add another tip, use vertical arrangement with 2% width as a button spacer instead of a label.
I found an easier way to fix my table was to add a column on the right which would be off the screen but when I make components invisible, the components that were off the screen shift into view. Also adding a vertical arrangemnent to a cell and then putting the component in the vertical arrangement, stops components shifting left when the component is invisible. Another great trick I came up with is to add extra rows in the table arrangement and use them as spacers for buttons. Add horizontal arrangement layout of 2% to add spaces for buttons that are vertical.
Hi Bill
That's not as good as a Label because it's a more 'expensive' component - Labels are simple and therefore 'cheap' - as a GUI becomes more complex, the simpler the components the better. Also, the use of a Table Component so extensively is not recommended given that we know it is flawed. Using Horizontal Arrangements with Labels as Spacers is the safest approach. A Spacer component might be introduced in the future, offspring like Thunkable has them already - good project for a student.
Hi Chris, thanks for the guidance. Is there a screen refresh or events refresh? Is there a way to update say a button text in a procedure that will show while still in the procedure?
Screen refresh? Should never need one?
You can change the text of a button in real time.