Combined height of all panels in a container?

I’m trying to build a tabbed panel with scrollbars (this time using the panel align options). In order to calculate the necessary offsets to scroll the panel, I need to know the total panelheight of all panels inside a certain COMP. Is there a way to query that size?

Hey Achim,

I don’t know about a fully automated way to do that but using a text DAT connected to a opexecute DAT will do the job by always summing up the included panel heights.
Attached is a small component were I use this technique.

cheers
markus
panelheight.tox (694 Bytes)

Hey Markus,

thanks for the tox! It’s similar to my current approach (summing the height while the script creates the panels). But I was looking for a fully automated way, so that it supports size changes of the contained panels. I probably can monitor size changes via an extra text/parm DAT combo per panel, but I need to keep the node count to an absolute minimum, so this is not an option.

The other idea was to select (and add) the dimensions using a multiple select CHOP, but those select CHOPs would cook whenever a node is created anywhere in the current session (viewtopic.php?f=12&t=840&hilit=+multi)

Maybe I should RFE “childrenh” and “childrenw” panelvariables

Achim

found a solution. In each panel, create a constant CHOP with 1 channel
name: valuepar("../panelorder") # panelorder needs to be unique throughout your UI
value: the height of the gadget (maybe multiplied by paneldisplay to accommodate changes in visibility)

then export all these to the same constant CHOP (it needs as many channels as the highest panelorder used) and finally add them together.
Seems to work great until a native solution is (hopefully) available.