gtk-sharp0.0.0.0neutralGtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.Notebook widget container
The Notebook widget is a whose
children are pages that can be switched between using tabs
along the edge. Tabs are typically
widgets, but can be any other widget.
There are many configuration options for Notebooks. Among
other things, you can choose on which edge the tabs appear
(The property), whether, if there
are too many tabs to fit the notebook should be made bigger
or scrolling arrows added (The property),
and whether there will be a popup menu allowing the users to
switch pages (The property).
Notebooks without tabs, can be used as containers to quickly
switch between different groups of information to reduce
any flicker caused by widget relayout by the application.
using System;
using Gtk;
class NotebookSample
{
static void Main ()
{
new NotebookSample ();
}
NotebookSample ()
{
Application.Init ();
Window win = new Window ("NotebookSample");
win.DeleteEvent += new DeleteEventHandler (OnWinDelete);
win.SetDefaultSize (400, 400);
Notebook nb = new Notebook ();
for (int i = 0; i < 5; i ++)
{
string label = String.Format ("Page {0}", i+1);
nb.AppendPage (new Button (label), new Label (label));
}
win.Add (nb);
win.ShowAll ();
Application.Run ();
}
void OnWinDelete (object obj, DeleteEventArgs args)
{
Application.Quit ();
}
}
Gtk.ContainerAtk.ImplementorGLib.IWrapperGLib.IWrapperSystem.IDisposableMethodSystem.StringReturns the label widget for a given widget.
The widget in the page.
The tab label widget, or if
not found.
Returns the tab label widget for the page child. is returned if the child widget is not
in the notebook or if no tab label has specifically been
set for the .
MethodSystem.StringReturns the label caption for a given widget.
The child widget in the page
The text of the tab label, or if
the widget does not have a menu label other than the
default menu label, or the menu label widget is not a .
Retrieves the text of the menu label for the page
containing .
MethodSystem.VoidEnables the page-selection popup.
Enables the popup menu: if the user clicks with the right
mouse button on the bookmarks, a menu with all the pages
will be popped up.
MethodSystem.VoidSets the label for the page containing a widget
The child widget whose label will be changed
The new caption for the tab.
Creates a new label and sets it as the tab label for the
page containing .
MethodSystem.VoidSwitches to the previous page.
Switches to the previous page. Nothing happens if the
current page is the first page.
MethodSystem.VoidEnables the page-selection popup.
Disables the popup menu. Inverse operation of MethodSystem.VoidRemoves a page.
The page number to remove starting from
zero. You can use minus one to remove the last page.
Removes a page from the notebook given its index in the
notebook.
MethodSystem.VoidAppends a page.
The to use as the contents of the page.
The to be
used as the label for the page, or to
use the default label, 'page N'.
Appends a page to notebook. The tab widget is the and the content is MethodSystem.VoidAppends a page, with a custom popup-label.
The to use as
the contents of the page.
The
to be used as the label for the
page, or to use the default label,
'page N'.
The widget to use
as a label for the page-switch menu, if its enabled. If is passed, and
is a or , then
the menu label will be a newly created label with the same
text as ; If is not a ,
must be specified if the
page-switch menu is to be used.
Appends a page to notebook, specifying the
widget to use as the label in the popup menu.MethodSystem.VoidInserts a page into the notebook
The to use as
the contents of the page.
The to be used as the label for
the page, or to use the default
label, 'page N'.
The index (starting at 0) at which to insert the page, or -1
to append the page after all other pages.
Insert a page into the notebook at the given position
MethodGtk.WidgetTo be added
an object of type an object of type To be addedMethodSystem.VoidChanges the position of a widget in the notebook.
The widget to move.
The new position, or -1 to move to the end
Reorders the page containing , so
that it appears in position position. If position is greater
than or equal to the number of children in the list or
negative, will be moved to the end
of the list.
MethodGtk.WidgetTo be added
an object of type an object of type To be addedMethodGtk.WidgetTo be added
an object of type an object of type To be addedMethodSystem.VoidTo be added
an object of type
an object of type To be addedMethodSystem.VoidTo be added
an object of type
an object of type To be addedMethodSystem.VoidTo be addedTo be addedMethodSystem.VoidTo be added
an object of type
an object of type
an object of type To be addedMethodSystem.VoidTo be added
an object of type
an object of type To be addedMethodSystem.VoidTo be added
an object of type
an object of type
an object of type
an object of type To be addedMethodSystem.VoidDisposes the resources associated with the object.ConstructorInternal constructor
Pointer to the C object.
An instance of Notebook, wrapping the C object.This is an internal constructor, and should not be used by user code.ConstructorCreates a new object.an object of type This is the default constructor for .PropertySystem.Int32To be added
an object of type an object of type To be addedPropertySystem.BooleanTo be added
an object of type an object of type To be addedPropertySystem.BooleanTo be added
an object of type an object of type To be addedPropertySystem.BooleanTo be added
an object of type an object of type To be addedPropertySystem.UInt32To be added
an object of type an object of type To be addedPropertySystem.BooleanTo be added
an object of type an object of type To be addedPropertySystem.UInt32To be added
an object of type an object of type To be addedPropertySystem.UInt32To be added
an object of type an object of type To be addedPropertySystem.Int32To be added
an object of type an object of type To be addedPropertyGtk.PositionTypeTo be added
an object of type an object of type To be addedPropertySystem.BooleanTo be added
an object of type an object of type To be addedEventGtk.SelectPageHandlerTo be addedTo be addedEventGtk.SwitchPageHandlerSignaled when the page changes
This signal is raised when the page is changed either by
the user or programatically.
EventGtk.MoveFocusOutHandlerSignaled when Focus is being moved out.
This event is raised before the focus is removed from the
current widget
EventGtk.ChangeCurrentPageHandlerSignaled when a request is made to change the current
page
This event is raised when a request is made to change the
current page in the notebook.
EventGtk.FocusTabHandlerSignaled when a Tab is focused
This event is raised when a tab has been focused.
MethodSystem.VoidTo be added
an object of type
an object of type
an object of type
an object of type To be addedMethodSystem.VoidTo be added
an object of type
an object of type To be addedPropertySystem.Int32To be addeda To be addedPropertyGtk.WidgetObtains the widget that represents the current page.The object in the current page.
This property uses and together to
provide a quicker way of getting the current page widget.
MethodSystem.VoidTo be added
a
a
a
a To be addedPropertyGLib.GTypeTo be addeda To be addedMethodSystem.BooleanDefault handler for the event.
a a Override this method in a subclass to provide a default handler for the event.MethodSystem.VoidDefault handler for the event.
a Override this method in a subclass to provide a default handler for the event.MethodSystem.VoidDefault handler for the event.
a Override this method in a subclass to provide a default handler for the event.MethodSystem.VoidDefault handler for the event.
a
a Override this method in a subclass to provide a default handler for the event.MethodSystem.BooleanDefault handler for the event.
a a Override this method in a subclass to provide a default handler for the event.ConstructorTo be added
a a To be addedMethodSystem.Int32Returns the page number that a child exists on. to look for.
Page number that the widget exists on, -1 if the widget isn't in the notebook.This function returns -1 if the is not a direct child of the notebook.