Community
Participate
Working Groups
N20090212-2000 Add another setting to GridLayout, analogous to makeColumnsEqualWidth: /** * makeRowsEqualHeight specifies whether all rows in the layout * will be forced to have the same height. * * The default value is false. */ public boolean makeRowsEqualHeight = false; This would for example be useful for layouts like in the New Java Project wizard, where we have a grid of radio buttons that must live in the same composite, and we would like to enforce equal vertical spacing between the radios.
Created attachment 156017 [details] Screenshot with red rectangles to show differing gap sizes The Apply Patch wizard has the same problem.
This might be a good idea for some day but for now you might consider using a vertical FillLayout or a vertical RowLayout. You can play with the spacing and margins in each of those layouts. Please let me know if this suits your needs (and if not, please say why you need this behavior in GridLayout).
The problem in both cases I mentioned is that we need to lay out radio buttons that belong to a single button group. This only works if all the radios have the same parent composite (otherwise, we would have to implement all traverse listeners and selection event handling by hand). FillLayout and RowLayout don't allow us to add more items to the right of the radio buttons, so nested composites for the horizontal distribution won't work (and they also wouldn't support columns and would need manual handling of traversal).
The snapshot in comment 1 looks ok - are the red-bordered items "fillers"? If you can keep working around the problem for now, in the way you seem to have already done, then we would like to leave this as an enhancement (i.e. lower priority) until we have some more time. Would you like to try submitting a patch to GridLayout? I don't think it's a difficult fix... but it would need lots of testing to make sure nobody is broken (lots of people use GridLayout <grin>).
> The snapshot in comment 1 looks ok - are the red-bordered items "fillers"? I've painted these red rectangles on top of the original screenshot. They all have the same size, and if you look closely at the gap between File and URL, you can see that there are a few more pixels between those two radios (in comparison to the top and bottom gaps). The "workaround" we use now is to use GridLayout and accept the slightly irregular gaps. I'm sorry, but my time budget is also overflowing, so I guess we'll just have to leave this as an enhancement.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.