You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Friday, December 16th 2022, 9:29am

Relative layer-positions?

Hi Klaus,

is it possible to get a layers y-position relative to it´s parent?

MAIN PARENT (scrollarea-plugin)
|_____Child 1 (parent: main parent, align: bottomcenter, edge: topcenter)
.........|_____Child 2 (parent: child 1, align: bottomcenter, edge: topcenter)
..........................|______Child 3 (parent: child 2, align: bottomcenter, edge: topcenter)

If I try to grab the y-position of Child 3 it returns 0, of course. But how do I get it´s relative position on the scrollarea-layer?
The problem is that if I automatically add a bunch of layers with unknown size (i.e. textfields or images with width=x and height=prop) to the scrollarea I can´t tell how large the scrollarea needs to be.

And getting the pixelheight of a textfield in a short time is almost impossible. And adding a delay (delayedcall(1,get(plugin[get(name)].height)) is´nt really a solution if there are 20 textfield- and 10 image-childs *unsure*

Thx in advance *g*


Friday, December 16th 2022, 4:00pm

for the 2nd question look here :

for the first... there is
but i think there is no direct function for layer1 --> layer2 coordinate conversion....
you'd have to do this yourself

This post has been edited 1 times, last edit by "indexofrefraction" (Dec 17th 2022, 11:02am)