[Gtk-sharp-list] Notebook

Ahmed Bouagja ahmed.bouagja@eurecom.fr
Wed, 23 Apr 2003 16:15:41 +0200


Gonzalo Paniagua Javier wrote:

>El mié, 23 de 04 de 2003 a las 15:13, Lee Mallabone escribió:
>  
>
>>On Wed, 2003-04-23 at 14:03, Ahmed Bouagja wrote:
>>
>>    
>>
>>>Can someone please tell me how to get the number of pages in a Notebook 
>>>widget, or where I can find all properties ans methods of  Gtk# widgets
>>>      
>>>
>>Looking at the C docs, there is a function for doing this named:
>>gtk_notebook_get_n_pages(), however it was added in Gtk+ 2.2 and Gtk#
>>currently only targets Gtk+ 2.0.
>>    
>>
>
>By now, you can set CurrentPage to a negative number and then get the
>value of CurrentPage. It will be the upper limit for iterating through
>all the pages. Example:
>
>	nb.CurrentPage = -1;
>	int end = nb.CurrentPage;
>	for (int i = 0; i <= end; i++) {
>		Widget page = nb.GetNthPage (i);
>		.....
>	}
>  
>
thanks, this is a good work around

 --
Ahmed