I have a problem with the screen ratio in B4J. Primarily it is about the format adjustment between a 16:9 and a 4:3 display.
The screen sizes can be determined without any problems:
1920 x 1280 on a 4:3 display.
1366 x 728 on a 16:9 display
My development environment is the PC with the 16:9 display.
The problem:
I define the size of the app in the sub Appstart in the main. There I define top, left, width and height. The rest of the scaling is done by anchors and the designer script and works very well.
Due to the different ratio, the app will of course be distorted on a 4:3 display. An element displayed square on the 16:9 display then becomes an upright rectangle on the 4:3 display. I have not yet found a way to define the ratio determined at the start of the app in any way in the main form according to the display size. I can get the screen dimensions, assign values, but dynamic calculations to adjust are not possible in this sub.
Does anyone have a solution to this problem?
The screen sizes can be determined without any problems:
1920 x 1280 on a 4:3 display.
1366 x 728 on a 16:9 display
My development environment is the PC with the 16:9 display.
The problem:
I define the size of the app in the sub Appstart in the main. There I define top, left, width and height. The rest of the scaling is done by anchors and the designer script and works very well.
Due to the different ratio, the app will of course be distorted on a 4:3 display. An element displayed square on the 16:9 display then becomes an upright rectangle on the 4:3 display. I have not yet found a way to define the ratio determined at the start of the app in any way in the main form according to the display size. I can get the screen dimensions, assign values, but dynamic calculations to adjust are not possible in this sub.
Does anyone have a solution to this problem?