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



Oops, 

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++;
	}

hope this helps, 
-Vlad

On Mon, Feb 02, 2004 at 08:56:58AM +0100, Andreas B. Thun wrote:
> Vlad:
> 
> void Gtk::Notebook::set_current_page  	(  	int   	 page_number  	 )   
> Switches to the page number page_num .
> Parameters:
>     page_num 	Index of the page to switch to, starting from 0. If 
>     negative, the last page will be used. If greater than the number of 
>     pages in the notebook, nothing will be done.
> 
> It still does not work :-/
> 

-- 
______________________________________________________
Vladislav Grinchenko    e-mail (w): vgrinche integ com
Software Engineer            (h): 3rdshift comcast net
Integral Systems, Inc.

   Focus on quality, and productivity will follow.
______________________________________________________



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