Re: [gtkmm] Q: how to centre in a VBox?



On Thu, Oct 23, 2003 at 08:57:49AM -0600, D. R. Evans wrote:
> Ah! gtkmm seems to violate normal STL semantics regarding lifetimes. If I 
> use an hbox that goes out of scope at the end of the page's constructor, 
> then it doesn't work -- I have to include the hbox as an object carried 
> inside the class that defines the page. 

The pack_foo-methods only take a reference, because otherwise they would have
to make a copy of each widget, and you don't want that.
You don't have to have the HBox as a member of the class if you are not
going to use it outside the constructor. Just create the HBox with new and
call manage() on it.

/Fredrik Arnerup



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]