How to set Automatic resized panel?

Theera

Expert
Licensed User
Longtime User
Hi All,
I use panel object as background.Wherever I have installed my application.I need panel that be automatic resized with size of Tablet 7 inches or 10 inches.
Best Regards
Theera
 

peacemaker

Expert
Licensed User
Longtime User
Manually :)

pnl.Weigth = 100%x
pnl.Height = 100%y
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Think only Portait Orientation


Refer the first question is How resize the panel on device 7 " or 10" (standard scale). The second question is How reduce or addition scale each objects in the panel for resize fit 7" or 10 " (This question don't need you use Script Designer from B4A Version 1.9 and Think only Portait Orientation )

Best Regards
Theera
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
If you use script designer,I must recode program again whenever you have other size of device.
Best Regards
Theera
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
That is not correct.
All you need to do is add these two lines in the main script:
B4X:
Panel1.Width = 100%x
Panel1.Height = 100%y

If I input only upper 2 lines,it will show only full screen panel.But all of objects in the panel1 is not resize follow too ?
I still recode about all object for fit 7" and 10"
 
Last edited:
Upvote 0

Theera

Expert
Licensed User
Longtime User
If I input only upper 2 lines,it will show only full screen panel.But all of objects in the panel1 is not resize follow too ?
I still recode about all object for fit 7" and 10"

I've just test simple application which have Panel1 is size full screen on android device 7" and have Button1 in the panel1. And Create Script Designer for all device bellows:-
Panel1.Width= 100%x
Panel1.Height =100%y
After then I create new Emulator another size for test. I change only size of panel1,but size of button1 is not change.
 
Upvote 0
Top