B4X FEED Screen designer units?

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

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: Screen designer units? است. این موضوع تا کنون 22 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Screen designer units?
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
22
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
I think I understand pixels, scale and dip, but the screen designer seems to have its own units.
Example:
In the designer I have a panel "Panel1", who's top is set at 540
In code, if I log Panel1.top, I get 1769.
My device's scale, from logging 100dip/100 is 3.0
But 1769/540 = 3.28

What I'm trying to do is hide some elements and move up the others below it.
So let's say I have Panel2, Panel3, and Panel4. When the user hits a button, Panel3 is not valid, so I make it invisible, and I want to move Panel 4 up to where Panel 3 was.
But simply using Panel4.Top = Panel3.Top does not work correctly, and not even if I divide by the device scale.

What's the correct way to do this?
Thanks.

برای دیدن تصاویر باید ثبت نام کنید


 

عقب
بالا