Replies: 1 comment 2 replies
-
Hi @david-pa , The children of VBox and HBox layouts can specify the "hGrab/vGrab" properties. It's a boolean that indicates whether they should be resized along the vertical or horizontal axis when their parent is resized. In your case, you can apply hGrab=true to either ListA or ListB (or even both; in that case they'll share the remaining space), since all you care about is the spacing between them. Since they are contained in a properties intermediate container, you will also need to specify hGrab=true on this container. So it should look like this:
hGrab will have no effect in the "Normal State", nor in the "Elongated List B Values" cases, because there is no extra space to be grabbed for these children (they already take the entire space in their parent). However, for the Elongated Header case, Properties will be extended horizontally to take the entire space in its parent (same width at the header), and listA/listB will then also get some extra space to grab. The remaining space will be shared equally between them (Since listA is left-aligned and listB is right-aligned, it shouldn't matter which one is extended). |
Beta Was this translation helpful? Give feedback.
-
I am working on an existing project utilizing GLSP, and I am having trouble rendering nodes when certain text elements are much longer than previously anticipated.
Currently, the layout behavior is something like this from what I can tell (where List A and List B are composed of small text-based elements):

In the above picture, the result of the elongated list value is okay, but the case where the header is elongated is not.
The alignment of List B is meant to be aligned with the right edge of the node at all times (the text elements are right aligned too) and List A is meant to be similarly aligned to the left. The header seems to stretch the node out to the point where the Properties container is no longer driving the max width of the node, and the Properties container currently doesn't stretch with it.
I'd like to be able to dynamically adjust the
hgap
in the container to help with this, or find a way to get the property container to take up that extra space. Is there a way to do this, or a recommended adjustment to the current layout I need to make to get the result to get things to be more consistent?Beta Was this translation helpful? Give feedback.
All reactions