Android Question The values in designer are not the same as code

Ethan Uzarowski

New Member
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:

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,