[Glade-users] TreeView with context menu



Hi,

I try to make a program with libglademm library. With Glade, I make a
GtkTreeView class. So in my code I can point it like this:
....
m_refGlade->get_widget( "treeview1", m_TreeView );
....

where m_TreeView is declared like this:
Gtk::TreeView* m_TreeView;

But to use pop up context menu, I must derived the Gtk::TreeView class
after reading this tutorial:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08s06.html

So let's say my derived class of Gtk::TreeView is TreeView_WithPopup.
and I declared it like this:
TreeView_WithPopup* m_TreeView.

But I got error about failing dynamic cast if I runt the program and my
tree did not show up. How do I point to derived class of Gtk::TreeView
exactly?

Thank you.

Regards,

Akbar





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