[haiku-development] Re: Layout Question With Checkboxes / Window

  • From: "Andrew Lindesay" <apl@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 06 Apr 2020 22:56:43 +1200

- Use a grid layout instead, and leave an empty column to the right of 
your checkboxes:

Hello Adrien;

Thank you for the guidance.  I managed to get my desired outcome with a mix of 
more fiddling together your suggestion;

        BGridView* messageAndSettingsGridView = new BGridView();
        BLayoutBuilder::Grid<>(messageAndSettingsGridView, B_VERTICAL)
                .Add(fMessageTextView, 0, 0, 2)
                .Add(fConfirmMinimumAgeCheckBox, 0, 1, 1)
                .Add(fConfirmUserUsageConditionsCheckBox, 0, 2, 1)
                .Add(fUserUsageConditionsLink, 0, 3, 2);

        BLayoutBuilder::Group<>(this, B_VERTICAL)
                .Add(messageAndSettingsGridView, 1)
                .AddGroup(B_HORIZONTAL, 1)
                        .AddGlue()
                        .Add(fLogoutButton)
                        .Add(fAgreeButton)
                .End()
                .Add(fWorkerIndicator, 1)
                .SetInsets(B_USE_WINDOW_INSETS);

I think a comment might be required. ;-)

Regards.

Other related posts: