Re: Glade, GTKMM, and adding widgets to containers that are created in Glade.



On Tue, 2009-10-13 at 18:28 -0500, Steve Scott wrote:
> Hi,
> 
> Is there some trick to adding hand coded widgets to containers that
> were in created in Glade.  In other words I have a ScrolledWindow
> created in Glade and in code I have created a TreeView (and model).
> No matter what I try I am unable to see my TreeView appear in my GUI.
> From all the examples I have found this is how it is supposed to work
> in this case:
> 
>  m_refGlade->get_widget("myscrolledwindow", m_myScrolledWindow); //
> get my glade defined ScrolledWindow Widget
>  m_myScrolledWindow->add(*m_myTreeView); // add my TreeView Widget to
> the scrolledWindow.  (and yes the Treeview has a listmodel)
>  m_myTreeView->show(); // update the GUI
> 
> Can someone tell me what I am doing wrong?

get_widget_derived() might be what you area looking for. Here is some
informatin about its use with Gtk::Builder though it was much the same
with libglademm:
http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-builder-using-derived-widgets.html.en

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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