E Ethan Uzarowski New Member Dec 28, 2014 #1 Hello. My name is Ethan and I am new to B4A. I am loving it so far except for one major detail. I was creating a game where the width and "left" (distance from left of screen) of an object are crucial in the designer of b4a and of the code. However, I find that in the designer, if i input a value under width of, for example a panel, it is a different value than the code spits out. I decided to test this using a new b4a project. I put a panel on the screen with the width as 131, and then i had this sub: Code: Copy Sub Button1_Click label1.text = panel1.width end sub and the label displayed "205" when i debugged it! As you can see, I am having a problem as all my games are messed up. Is there any way to fix this, or is it just a bug in the program? Any and all answers are appreciated! Thank you, Ethan
Hello. My name is Ethan and I am new to B4A. I am loving it so far except for one major detail. I was creating a game where the width and "left" (distance from left of screen) of an object are crucial in the designer of b4a and of the code. However, I find that in the designer, if i input a value under width of, for example a panel, it is a different value than the code spits out. I decided to test this using a new b4a project. I put a panel on the screen with the width as 131, and then i had this sub: Code: Copy Sub Button1_Click label1.text = panel1.width end sub and the label displayed "205" when i debugged it! As you can see, I am having a problem as all my games are messed up. Is there any way to fix this, or is it just a bug in the program? Any and all answers are appreciated! Thank you, Ethan
Erel B4X founder Staff member Licensed User Longtime User Dec 29, 2014 #2 Your device scale is probably 1.5. The designer variant scale is 1 so all the dimensions are scaled. AutoScaleAll method (in the designer script) can also affect the dimensions. Upvote 0
Your device scale is probably 1.5. The designer variant scale is 1 so all the dimensions are scaled. AutoScaleAll method (in the designer script) can also affect the dimensions.