I forgot to mention, that there is more labels and text controls. In fact the number of controls is dynamic; it’s a UI framework, configured by the user. Also the span
is configurable, means whether a label+text takes 100% width or just 50%.
Like this:
Label 1: Text 1___ Label 2: Text 2___
Label 3: Text 3___ Label 4: Text 4___
Label 5: Text 5_______________________
Label 6: Text 6___ Label 7: Text 7___
Label 8: Text 8_______________________
Label 9: Text 9_______________________
…
I’m afraid, that with the below proposal e.g. Label 1 and Label 3 would not take the same horizontal space if the text has a different length. Because were wall wrapped
in separate composites.
From:
Mickael Istria <mistria@xxxxxxxxxx>
Date: Tuesday, 27. September 2022 at 11:37
To: General development mailing list of the Eclipse project. <eclipse-dev@xxxxxxxxxxx>
Cc: Hoepfner, Marcus <marcus.hoepfner@xxxxxxx>
Subject: Re: [eclipse-dev] GridLayout with >2 columns and imaginary center line
1 parent composite with GridLayout(numColumns: 2, equalWidth: true) and 3 children:: 1 composite for `Label1: Text1________` another for `Label2: Text2_________` and another for `Label3: Text3________`. The
latest one must has a GridData.horizontalSpan=2; each child composite has a GridLayout(2, false) and the Text have GridData.grabExcessibeHorizontalSpace=true.