I've been using (or abusing) setIsGroup(true) on a ListGrid in order to get a nice border and a title label that don't consume additional layout space and look consistent with other "isGroups" that I use elsewhere. This is how this looked as far as SmartGWT 13.1d-2022-01-09 (wacky background colors are for "debugging" only):
However, somewhere around 13.1d-2022-01-30 the Canvas.setGroupPadding() property has been introduced and its default value has been set to 10. This has affected my ListGrids and they look like this now:
There is a gap between the blue group box and the list grid.
I've found the affecting change to SmartGWT only after a session of bisecting and trying various versions. I thought I can restore the original appearance by finding all my ListGrids that are setIsGroup(true) and only add setGroupPadding(0) to them and I'll be good. But unfortunately the result is not the same.
In 13.1d-2022-01-15 (that's between the 2 previous versions) something extra was also changed with the group box paddings and now when I setGroupPadding(0), I get this:
There is a slight empty gap between the top border of the group box and the ListGrid's top header.
This behavior is the same in 13.1d-2023-05-22, to which I have switched recently.
Is there a way to restore the appearance of ListGrid.setIsGroup(true) from version 13.1d-2022-01-09?
However, somewhere around 13.1d-2022-01-30 the Canvas.setGroupPadding() property has been introduced and its default value has been set to 10. This has affected my ListGrids and they look like this now:
There is a gap between the blue group box and the list grid.
I've found the affecting change to SmartGWT only after a session of bisecting and trying various versions. I thought I can restore the original appearance by finding all my ListGrids that are setIsGroup(true) and only add setGroupPadding(0) to them and I'll be good. But unfortunately the result is not the same.
In 13.1d-2022-01-15 (that's between the 2 previous versions) something extra was also changed with the group box paddings and now when I setGroupPadding(0), I get this:
There is a slight empty gap between the top border of the group box and the ListGrid's top header.
This behavior is the same in 13.1d-2023-05-22, to which I have switched recently.
Is there a way to restore the appearance of ListGrid.setIsGroup(true) from version 13.1d-2022-01-09?
Code:
import com.google.gwt.user.client.ui.RootPanel; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.Layout; public class SmartGridWoes extends Canvas { public SmartGridWoes() { this.setBackgroundColor("#e0ffe0"); this.setHeight100(); this.setWidth100(); Layout main = new HLayout(); main.setBackgroundColor("cyan"); main.setPadding(10); main.setMembersMargin(10); ListGrid grid1 = new ListGrid(); grid1.setWidth(300); grid1.setHeight(200); main.addMember(grid1); ListGrid groupedGrid1 = new ListGrid(); groupedGrid1.setWidth(300); groupedGrid1.setHeight(200); groupedGrid1.setIsGroup(true); groupedGrid1.setGroupTitle("Grouped grid"); // Remove the default padding of 10, but not the gap // between the top border of the group box and the // list grid's header. groupedGrid1.setGroupPadding(0); main.addMember(groupedGrid1); addChild(main); RootPanel.get().add(this); } }
Comment