[haiku-development] Automatically set window / view Layout

  • From: Clemens <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Mon, 16 Aug 2010 10:46:51 +1200


after a long time I wrote a gui app again and I was amazed how easy it is to setup a basic view layout with the layout engine and the layout friendly constructors :-).

But when I run my program nothing showed up! The problem was that I haven't call the SetLayout method. I remember I did this mistake earlier so maybe also other people will run into it. Why I have to set the layout manually? Because the window does not know which kind of BLayout is needed? Can we provide a default BWindow layout to omit the SetLayout call or set one in AddChild if needed? I feel the SetLayout call is not very intuitive.

thank you,

Other related posts: