I'm attempting to make a screen saver which animates the position of a logo every second. In doing so, I'd like to calculate the valid x/y values of the child logo by taking MY widget width/height and subtracting that of the child. I can then, every interval, pick a new random x/y value in the range. I am having trouble querying the widgets for their sizes. If I use getProp(XX, "width") I don't get the ACTUAL width, I get "auto". Attached is something I threw together as an example... note that it is important that I be able to get the computed widget sizes since things may be dynamically computed.
screensave.json (4.8 KB)
That's not possible currently, but why not simply use percents to define the child's position ?
I need to be able to animate the position, so I was assuming I need to use a variable for the left/top properties. Something like "VAR{anim_x,0}" The issue isn't so much that I cannot set the position... it's that I don't know the range of legit values. The X of the child should be limited to the width of the parent less its own width. I suppose I could hard-code the value for the child width, or set it myself... I think I know the screen width (my parent is full screen/modal) and I can force the child width. Not elegant but maybe that solves my problem. Maybe there's an option that use canvas widgets... which know their size.