Human UI - Absolute Positioning

@andheum, I constructed a GH definition with Human UI controls. It consists of a few sliders and a few shapes.

It appears that the shapes are drawn over the sliders and so I changed to absolute positioning of the shapes. This works fine but every time when I activate the UI window by setting Show to True, the shapes return to the position as if their Absolute Positioning was set to False. I just have to toggle the boolean to False and back to True for the elements to get positioned where they should. Is that a bug or just the way it has to be?

By default, all UI elements are positioned in a “stack” that puts them vertically one below the next. Absolute positioning adds them to a “Grid” where their positions can be determined relative to the upper left corner.

Shape positioning can be a little complex - usually you’ll have the best results with shapes that are in the +X -Y quadrant of the world space.

Human UI is also a little sensitive to execution order. Window Show/Hide is not generally intended to be a “dynamic” control. Every time it’s triggered, the “Add Elements” component is triggered, re-adding the element to the window. Unless the “Adjust element positioning” is also triggered at the same time, it will seem to not take effect.

One workaround to the behavior you’re describing is to cluster your “Adjust element positioning” component with “Add Elements” - then they will always execute together.

1 Like