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

Ingo Weinhold schrieb:
On 2008-08-26 at 12:16:36 [+0200], julun <host.haiku@xxxxxx> wrote:
Ingo Weinhold schrieb:
On 2008-08-26 at 10:53:33 [+0200], julun <host.haiku@xxxxxx> wrote:
Stephan Assmus schrieb:
Do
they also have to respect the passed explicit min/max size, they don't
atm.
If you mean the constraints set on the view, that's kind of tricky, since
the used layout might not even support constraints spanning more than one
column. By default the label item has fixed width, in which case the view's constraints could directly be translated to constraints for the other item,
but since it is possible to set explicit constraints on the items, that's
not always feasible.
I had a certain width for my dialog with some elements like this:

|- BBox -----------------------------------------------------------|
| | PopUpMenu BButton | | --------------------------------------------------------------------

I was interested to span the popup menu bar over the whole length
close to the button by setting PopUpMenu CreateMenuBarLayoutItem
SetExplicitMinSize(BSize(button height, B_SIZE_UNLIMITED )).

Assuming that the PopUpMenu is a BMenuField and your BBox has a horizontal group layout, you added the menu field items and the button in that order, and also assuming the BSize() parameters were actually the other way around, that still doesn't achieve what you want.

Yes, i did it that way. I was just typing what i remembered so far, got mixed up :(

You should set the item's maximum size to BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET).

If i looked correctly the MenuBarLayoutItem ctor set's this value, still no luck. I will go back to this and see what might be wrong.

Thanks anyway,
Karsten

Other related posts: