Android Question B4XTable with panels

Enthousiastic

Active Member
Licensed User
In Designer i have a B4Xtable and two panels bellow pnlToolBox and pnlToolBox2 . In Activity_Create i wrote the following code for panels but i don't know how to declare the B4Xtable width and height according above panels . Any idea please , B4Xtable it's a new issue for me . Many thanks ....


B4X:
pnlToolBox.Top = 100%y - (pnlToolBox.Height+pnlToolBox2.Height)
    pnlToolBox2.Top = 100%y - pnlToolBox2.Height
    
    pnlToolBox.Width=Activity.Width
 

Enthousiastic

Active Member
Licensed User
I made the anchors in books.bal but no result . In main.bal and bookmenu.bal buttons are not centered . I tried with anchors and the buttons dimensions destroyed and covered each other.
 

Attachments

klaus

Expert
Licensed User
In The book.bal file:
Set the anchors of:
pnlToolbox2 and pnlToolbox1 horizontal to
upload_2019-2-19_17-49-19.png
and vertical to
upload_2019-2-19_17-51-15.png
.
B4XTable1 horizontal to
upload_2019-2-19_17-49-24.png
and vertical to
upload_2019-2-19_17-49-50.png
.
The you need to adjust the button positions to center them in the Designer Scripts.
Or better, put the Buttons onto an intermediate Panel and center this one to 50%x in the Designer Scripts.
 

Enthousiastic

Active Member
Licensed User
Sorry for the delay Klaus , i had to reduce the size of projext and write it in english most of it as possible and also to be able for uploading .
In "Main Menu " , only the "BOOKS MENU" works , i haven't added the other activities yet for other buttons.
When i press "BOOKS MENU " it guides me to " DATA BOOKS MENU " where only the "BOOKS GRID " button works for
the same above reasons. When i press the "BOOKS GRID " button it guide me to a table ( Books List Grid ) where
is the problem i mentioned i don't see the panels pnlToolbox and pnlToolbox2 with the buttons ( is the books.bal )
and you told me to make it with anchors. Also in main.bal and booksmenu.bal the buttons are not centered.
I will follow your instructions 1000 THANKS THANKS A LOT . Ιn the meantime look at Books.zip , if you have some more advices to add.I always appreciate ALL that you do and the others members also.
 

Attachments

klaus

Expert
Licensed User
Attached you find a mofified version with my vision of doing it.
I use only two layout variants one for portrait and one for landscape, and use autoscale, anchors and DesignerScript.
You had too many layout variants.
It is perhaps not optimized to your feeling,but my goal is to show you the principle.
The ladscape layout for books should be modified.
 

Attachments

Enthousiastic

Active Member
Licensed User
I am very obliged to you and the forum members , you opened a window to go on. By the way taking as example the "B4XTable With Navigation Buttons " ,
I use the CurrentPage to go to the previous and next page . Is there a way to go to last and first page?
 
Top