6 avril 2020 12:03 "Andrew Lindesay" <apl@xxxxxxxxxxxxxx> a écrit:
Hello;
```
BLayoutBuilder::Group<>(this, B_VERTICAL)
.Add(fMessageTextView, 1)
.Add(fConfirmMinimumAgeCheckBox, 1)
.Add(fConfirmUserUsageConditionsCheckBox, 1)
.Add(fUserUsageConditionsLink, 1)
.AddGroup(B_HORIZONTAL, 1)
.AddGlue()
.Add(fLogoutButton)
.Add(fAgreeButton)
.End()
.SetInsets(B_USE_WINDOW_INSETS);
```
Which is working well except that with the two `BCheckBox` items, the window
width reduces to the
width of the checkboxes + label. Without the checkboxes in the layout the
windows remains
as-specified in the constructor of the window.
Any idea why the checkboxes have this effect in this case? Let me know if
there isn't enough
detail.
BLayoutBuilder::Grid<>(this, B_VERTICAL)
.Add(fMessageTextView, 0, 0, 2)
.Add(fConfirmMinimumAgeCheckBox, 1, 0, 1)
.Add(fConfirmUserUsageConditionsCheckBox, 2, 0, 1)
.Add(fUserUsageConditionsLink, 3, 0, 2)
.AddGroup(B_HORIZONTAL, 4, 0, 2)
.AddGlue()
.Add(fLogoutButton)
.Add(fAgreeButton)
.End()
.SetInsets(B_USE_WINDOW_INSETS);