Re: Accessing children on Gtk::Notebook



On Thu, 2012-01-26 at 06:24 -0800, gig-raf wrote:
> void exampleWindow::on_button_modifyTabContent()
> {
>     // I want to access the "elements" on the notebook.page. But how
> do I do
> that?
>     //Gtk::Widget* pTest =
> m_Notebook.get_nth_page(m_Notebook.get_current_page());
> 
>     .....
> }

This should work fine. Maybe you are confused that you get a
Gtk::Widget* back rather than the Gtk::VBox* that you added. You should
use dynamic_cast<> to get a Gtk::VBox*. Do use an if() to check it for
null before using it.
> 
> 
-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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