B4J Question How to fit the Internal Designer window to my PC screen

Avon

Member
Licensed User
Longtime User
The choice of window dimensions in the internal designer/visual designer/Abstract Designer does not include the dimensions for my development PC, how can I specify these? And can I change them at run time, so that when the app is running on different PCs it always uses all of the screen width?

Thanks...
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
In the internal designer in the lateral menu use Variants you can create an specific windows size.

Yet, if you use the property anchors for each node, there is no need to create many windows sizes, only one to fit them all.
 
Upvote 0

Avon

Member
Licensed User
Longtime User
Thanks for that speedy reply!

The variants do not include one suitable for the development PC, unfortunately.

I will read up on property anchors, thanks for your advice!
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
I do not understand the word "suitable"

Because the new variants button let´s you add any windows size:

upload_2017-4-27_12-35-7.png
 
Upvote 0

Avon

Member
Licensed User
Longtime User
OK.... I found that specifying a value of BOTH for the horizontal and vertical anchors fills the screen as specified by the variant. But how do I detect the screen size at runtime and resize the view to it?
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
as follows:

1.- Always have only one variant.
2.- Use script-General to modify the variant accordingly.
3.- to know the size of the screen.
B4X:
'and its "Y" values
    fx.PrimaryScreen.MinX
    fx.PrimaryScreen.MaxX
4.- to know the size of the form
B4X:
'Left
'Top
'Width
mainform.windowHeight
 
Upvote 0
Top