Absolute panel coordinates?

Imagine you have a dropdown menu (panelh 200 when expanded) that’s located very near the button of the master (fullscreen) control panel.
Now if you enable the dropdown, it will get cut off as it reaches over the lower border of the screen.
As the dropdown will likely inherit transforms from it’s parent containers, how can I figure out it actual position on screen,
so I can calculate how much to move it up?

Thanks a bunch
Achim

If you use the controlpanel command to open your panel and assume that the user does not move the window (a big assumption, i know), they you can use controlpanel -w x y to specifc where the panel opens. You could use these numbers to figure it out.

I guess it would be nice to get an option in controlpanel command to return the windows current position. I’ll RFE that.

Think you got me wrong. I’m more concerned about the actual panely position of a gadget inside the controlpanel.

I mean there may be some(many) parent containers which apply various (children) offsets? For example, you have a dropdown in
“/ctrlpanel/scrollpane/pane/scrollpane”

“/ctrlpanel/scrollpane” applies children offsets
“/ctrlpanel/scrollpane/pane” and “/ctrlpanel/scrollpane/pane/scrollpane” may apply even more children offsets

So the dropdown itself doesn’t know about those offsets, it only has a panely value, which might not match it’s actual position in the master controlpanel (due to the offsets). So I’m looking for something which allows me to retrieve the “real” panely value.

The position of the actual controlpanel window you mentioned is another issue. Haven’t even thought about this.
Instead of the controlpanel command RFE, what do you think about an expression, which can get the panel[xywh] of the opened controlpanel window itself? These would get updated if you move/resize the window. This would also allow to automatically resize/reposition all the UI stuff based on the retrieved panelw and panelh (of the opened window). And the windows panel[xy] can be used to ensure that gadget stay inside the window.

There is a somewhat new parameter called Fit on Panel Components that can help automatically resize your panels. You can choose to fix a panel, or have it resize relative to the other gadgets or just stretch to fill the area. This can be set for width or height or both. Give that a try if you haven’t already.

It would be nice to have an expression to fetch a open controlpanel window’s size and position though.

Know about it, but the general workflow is still not 100% clear to me (posted a documentation RFE ~ 2 weeks ago). And there are some update issues, so in order to see a change you often need to reopen the panel to get the new layout.

Anyway, for now I prefer my tableLayout approach. For me it’s more intuitive to define a table, and then define size/position via cellranges.

This way I can also resize background TOPs to match the containers size. As far as I figured the “Fit” workflow, it will resize children panels to fit the available space, but the size changes are not accessable in the children, so background TOPs will be “distorted”. Or is there a way to get at the actual panel[xywh] of a “fittet” panel?