Re: [gtkmm] how to set appended Notebook page active?



Thx! I´ve included gtkmm.h, but CfgStatTbl is not
defined. What else must I include?

my bad. I cut'n'pasted wrong line.

Something along these lines should work:

	Gtk::Notebook_Helpers::PageList::iterator iter;
	iter = m_notebook->pages ().begin ();

	while (iter != m_notebook->pages ().end ()) {
		Gtk::Widget* wp = (*iter).get_child ();
		CfgStatTbl* tbl = dynamic_cast<CfgStatTbl*> (wp);
		if (tbl != NULL) {
			if (tbl_name_ == tbl->name ()) {
				m_notebook->set_current_page ((*iter).get_page_num ());
				return;
			}
		}
		iter++;
	}





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