Re: HSeparator doesn't show
- From: jody <jody xha gmail com>
- To: "Tiberius DULUMAN" <tiberius duluman gmail com>, gtkmm-list gnome org
- Subject: Re: HSeparator doesn't show
- Date: Thu, 12 Jun 2008 13:33:47 +0200
Thanks
this
m_VBox1.pack_start(manage(new Gtk::HSeparator()), Gtk::PACK_EXPAND_WIDGET);
didn't work:
xbvd.cpp: In constructor 'xbvd::xbvd(xbv*)':
xbvd.cpp:208: error: no matching function for call to
'Gtk::VBox::pack_start(Gtk::HSeparator*, Gtk::PackOptions)'
/usr/include/gtkmm-2.4/gtkmm/box.h:330: note: candidates are: void
Gtk::Box::pack_start(Gtk::Widget&, bool, bool, guint)
/usr/include/gtkmm-2.4/gtkmm/box.h:337: note: void
Gtk::Box::pack_start(Gtk::Widget&, Gtk::PackOptions, guint)
but by dereferencing the output of manage i got it wirking
m_VBox1.pack_start(*manage(new Gtk::HSeparator()), Gtk::PACK_EXPAND_WIDGET);
Thanks again!
Jody
On Thu, Jun 12, 2008 at 1:26 PM, Tiberius DULUMAN
<tiberius duluman gmail com> wrote:
>> Gtk::HSeparator hsep;
>> m_VBox1.pack_start(m_HBox1, Gtk::PACK_SHRINK);
>> m_VBox1.pack_start(hsep, Gtk::PACK_EXPAND_WIDGET);
>> m_VBox1.pack_start(m_HBox2, Gtk::PACK_SHRINK);
>>
> If your code is like the one above, then the hsep object is destroyed
> when it gets out of scope ( when the function ends ). It should work like this:
>
> m_VBox1.pack_start(manage(new Gtk::HSeparator()), Gtk::PACK_EXPAND_WIDGET);
>
> The separator will be deleted when the window is destroyed.
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]