[Gtk-sharp-list] Notebook

Steinar Herland steinar.herland@gecko.no
Wed, 23 Apr 2003 17:11:22 +0200

(Sorry, sent the previous one using wrong mail-account.)

-----Opprinnelig melding-----
Fra: Steinar Herland=20
Sendt: 23. april 2003 16:59
Til: 'gtk-sharp-list@lists.ximian.com'
Emne: SV: [Gtk-sharp-list] Notebook

How about a .custom file to define Pages on the notebook object?

public int Pages
		//TODO: Call something to prevent drawing to display?
		int currentPage =3D CurrentPage;
		CurrentPage =3D -1;
		int numPages =3D CurrentPage;
		CurrentPage =3D currentPage;
		//TODO: Call something to restore drawing to display?
		return numPages;


-----Opprinnelig melding-----
Fra: Ahmed Bouagja [mailto:ahmed.bouagja@eurecom.fr]=20
Sendt: 23. april 2003 16:16
Til: gtk-sharp-list@lists.ximian.com
Emne: Re: [Gtk-sharp-list] Notebook

Gonzalo Paniagua Javier wrote:

>El mi=E9, 23 de 04 de 2003 a las 15:13, Lee Mallabone escribi=F3:
> =20
>>On Wed, 2003-04-23 at 14:03, Ahmed Bouagja wrote:
>>   =20
>>>Can someone please tell me how to get the number of pages in a =
>>>widget, or where I can find all properties ans methods of  Gtk# =
>>>     =20
>>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.
>>   =20
>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 =3D -1;
>	int end =3D nb.CurrentPage;
>	for (int i =3D 0; i <=3D end; i++) {
>		Widget page =3D nb.GetNthPage (i);
>		.....
>	}
> =20
thanks, this is a good work around


Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com