Activity coordinate translation

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I have a button positioned on a panel which is positioned within the activity. I would like to find the coordinates of the upper left corner of the button relative to the activity coordinates.

The coordinates of the button are relative to the panel and the position of the panel is relative to the activity.

Sure, it's easy just to add tops and lefts, but is there a better way to translate coordinates?

Thanks,
Barry.
 

canalrun

Well-Known Member
Licensed User
Longtime User
No.
What do you want to do with the absolute coordinates ?

Best regards.

I want to position a dynamically created panel that is a child of Activity above a button that is a child of the panel.

Windows has a nice function for doing this. I wonder if Android and B4A have one also. It makes the code a little more universal not having to know the parent-child relationship of the control.
 
Upvote 0
Top