B4X FEED How to calculate the Main Form depending on the screen ratio (16:9, 4:3)?

  • نویسنده موضوع نویسنده موضوع PracticalBot
  • تاریخ شروع تاریخ شروع

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن PracticalBotمی باشد و موضوع آن: How to calculate the Main Form depending on the screen ratio (16:9, 4:3)? است. این موضوع تا کنون 27 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع How to calculate the Main Form depending on the screen ratio (16:9, 4:3)?
آغاز کننده موضوع PracticalBot
تاریخ شروع
پاسخ‌ها
0
بازدیدها
27
پسندها
0
آخرین ارسال توسط PracticalBot

PracticalBot

ربات انجمن کاربردی
کاربر(جدید)
Dec 12, 2022
357
2
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?

 

عقب
بالا