[haiku-development] Re: documentation/help with layout system needed

  • From: julun <host.haiku@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 26 Aug 2008 10:53:33 +0200

Hi,

Stephan Assmus schrieb:
Hi Marcus,


<snip>


        BGridLayout* sizeBoxLayout = new BGridLayout(10, 10);
        sizeBox->SetLayout(sizeBoxLayout);

        AddChild(BGroupLayoutBuilder(B_VERTICAL, 10)
                .Add(BGroupLayoutBuilder(B_HORIZONTAL, 10)
                        .Add(nameEdit->CreateLabelLayoutItem())
                        .Add(nameEdit->CreateTextViewLayoutItem())
                )
                .Add(BGridLayoutBuilder(sizeBoxLayout)
                        .Add(widthEdit->CreateLabelLayoutItem(), 0, 0)
                        .Add(widthEdit->CreateTextViewLayoutItem(), 1, 0)
                        .Add(widthLabel, 2, 0)
                        .Add(heightEdit->CreateLabelLayoutItem(), 0, 1)
                        .Add(heightEdit->CreateTextViewLayoutItem(), 1, 1)

while using layouts and e.g BTextControl, i noticed that one has to always call CreateLabelLayoutItem(), even only interested in the textview layout item. Same goes for BPopUpMenu/BMenuField combo. Do they also have to respect the passed explicit min/max size, they don't atm.

Should i file a bug report about this?

Karsten

Other related posts: