[haiku-3rdparty-dev] Re: Use of Layout Manager in BBox

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Tue, 19 Mar 2013 11:29:55 +0100 (CET)

Hi Andrew,

On March 19, 2013 at 10:03 AM Andrew Lindesay <apl@xxxxxxxxxxxxxx> wrote:
> Thanks for getting back to me on that.  I just tried this and I can now
> see the BBox and border, but I don't see the views that ought to be
> displayed inside.  My code looks like this;
>
>            aboutBox->AddChild(BLayoutBuilder::Group<>(B_HORIZONTAL)
>                    .Add(aboutLabel) // BString
>                    .AddGlue()
>                    .Add(aboutButton) // BButton
> //                 .SetInsets(4,4,4,4)
>                    .View()
>            );

That code looks good; I don't see what's wrong with it.
Just as a hint: there is a version of SetInsets() that only takes a single
argument for this use case. Furthermore, you should use one of the predefined
spacings in order to make them flexible to the font size, for example
B_USE_SMALL_SPACING.

> Any other ideas?

Without posting more of your code, I haven't :-)

Bye,
   Axel.

Other related posts: