gtk-sharp 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.Container 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 (); } }` (FIXME: all methods in this class should specify types in their param elements, and this doc needs a good proofreading.)
- Constructor
  2.12.0.0
  Creates a new object.
  This is the default constructor for .
- Constructor
  2.12.0.0
  System.Obsolete
  a
  Protected Constructor.
  Chain to this constructor if you have manually registered a native value for your subclass.
- Constructor
  2.12.0.0
  Pointer to the C object.
  Internal constructor

  This is an internal constructor, and should not be used by user code.

- Method
  2.12.0.0
  System.Int32 `` `` 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. A specifying the index (starting from 0) of the appended page in the notebook, or -1 if the method fails.

  Appends a page to notebook. The tab widget is the and the content is .

  Don't forget to call the Show method on the widget or else the new page will not be shown.

- Method
  2.12.0.0
  System.Int32 `` `` `` 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, with a custom popup-label. a

  Appends a page to notebook, specifying the widget to use as the label in the popup menu.

  Don't forget to call the Show method on the widget or else the new page will not be shown.

- Event
  2.12.0.0
  GLib.Signal("change_current_page")
  Gtk.ChangeCurrentPageHandler Signaled 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.

- Event
  2.12.0.0
  GLib.Signal("create_window")
  Gtk.CreateWindowHandler To be added. To be added.
- Property
  2.12.0.0
  System.Int32 Sets or obtains the index of the curent page. Returns the index of the current page . The index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned.
- Property
  2.12.0.0
  Gtk.Widget Obtains 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.

- Property
  2.12.0.0
  GLib.Property("enable-popup")
  System.Boolean Indicates if the popup menu is enabled. Returns true if the popup menu is enabled and false if not. if true and the user clicks with the right mouse button on the tabs, a menu with all the pages will be popped up.
- Event
  2.12.0.0
  GLib.Signal("focus_tab")
  Gtk.FocusTabHandler Signaled when a Tab is focused

  This event is raised when a tab has been focused.

- Method
  2.12.0.0
  Gtk.Widget `` The child widget in the page. Returns the label for the menu of the notebookpage containing the given widget. The , or null if the page does not have a menu label other than the default menu label. the label of a menu doesn't have to be a . it can be any
- Method
  2.12.0.0
  System.String `` The child widget in the page Returns the label caption for the menu of the notebookpage containing the given widget.

  The text of the menu label, or if the widget does not have a menu label other than the default menu label, or the menu label page is not a .

  Retrieves the text of the menu label for the page containing .

- Method
  2.12.0.0
  Gtk.Widget `` the zero-based index of the page to return. use -1 for the last page. Returns the notebookpage with the given index. returns the with the given index.
- Method
  2.12.0.0
  System.Boolean `` To be added. Gets the detachable property of a child.. if , the child is detachable.
- Method
  2.12.0.0
  Gtk.Widget `` The child widget in the page. Returns the for the Notebook page containing the given widget. The label, or null if the page does not have a tab label other than the default tab label.

  the label of a menu doesn't have to be a . it can be any

- Method
  2.12.0.0
  System.String `` The widget in the page. Returns the label caption for the Notebookpage containing the given widget.

  The text of the tab label, or if the widget does not have a tab label other than the default tab label, or the tab label page is not a .

  Returns the tab label text 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 .

- Method
  2.12.0.0
  System.Boolean `` child page. Gets the tab reorder property of a child. if , the child is reorderable.
- Property
  2.12.0.0
  GLib.Property("group")
  System.IntPtr To be added. To be added. To be added.
- Property
  2.12.0.0
  GLib.Property("group-id")
  System.Obsolete
  System.Int32 Group ID for tab drag and drop. default value is -1.
- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Property
  2.12.0.0
  GLib.Property("homogeneous")
  System.Obsolete
  System.Boolean Indicates if all the tabs have the same size. Returns a boolean to indicate if the tabs have the same size or not. True if the tabs have the same size and false if not. Default is false.
- Property
  2.12.0.0
  System.Obsolete
  System.Boolean Whether tabs should have homogeneous sizes. a
- Method
  2.12.0.0
  System.Int32 `` `` `` 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. Inserts a page into the notebook at the given position. a

  Insert a page into the notebook at the given position.

  Don't forget to call the Show method on the widget or else the new page will not be shown.

- Method
  2.12.0.0
  System.Int32 `` `` `` `` The to use as th content of the page. the to use as a label. use null for the default label. the to use as menu label. use null to get the same label as the tab label, this only works if the tab label is a the zero-based position to insert the page. use -1 make it the last page. Insert a page into notebook at the given position, with a custom popup-label. a

  Don't forget to call the Show method on the widget or else the new page will not be shown.

- Property
  2.12.0.0
  Gtk.Container+ContainerChild `` To be added. To be added. To be added. To be added.
- Event
  2.12.0.0
  GLib.Signal("move_focus_out")
  Gtk.MoveFocusOutHandler Signaled when Focus is being moved out.

  This event is raised before the focus is removed from the current widget

- Method
  2.12.0.0
  System.Void

  Switches to the next page.

  Switches to the next page. Nothing happens if the current page is the last page.

- Property
  2.12.0.0
  System.Int32 returns the amount of pages in this notebook. the amount of pages in the notebook.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideChangeCurrentPage", Type=typeof(Gtk.Notebook))
  System.Void `` a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideCreateWindow", Type=typeof(Gtk.Notebook))
  Gtk.Notebook `` `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideFocusTab", Type=typeof(Gtk.Notebook))
  System.Boolean `` a Default handler for the event. a Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideMoveFocusOut", Type=typeof(Gtk.Notebook))
  System.Void `` a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverridePageAdded", Type=typeof(Gtk.Notebook))
  System.Void `` `` added page. index of added page. Default handler for event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverridePageRemoved", Type=typeof(Gtk.Notebook))
  System.Void `` `` removed page. index of removed page. Default handler for event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverridePageReordered", Type=typeof(Gtk.Notebook))
  System.Void `` `` reordered page. index of reordered page. Default handler for event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideReorderTab", Type=typeof(Gtk.Notebook))
  System.Void `` `` To be added. To be added. Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideSelectPage", Type=typeof(Gtk.Notebook))
  System.Boolean `` a Default handler for the event. a Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideSwitchPage", Type=typeof(Gtk.Notebook))
  System.Void `` `` a a Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Property
  2.12.0.0
  GLib.Property("page")
  System.Int32 Sets or obtains the index of the curent page. Returns the index of the curent page. use instead.
- Event
  2.12.0.0
  GLib.Signal("page_added")
  Gtk.PageAddedHandler Raised when a notebook page is added.
- Method
  2.12.0.0
  System.Int32 `` to look for. Returns the page number that a child exists on. 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.
- Event
  2.12.0.0
  GLib.Signal("page_removed")
  Gtk.PageRemovedHandler Raised when a notebook page is removed.
- Event
  2.12.0.0
  GLib.Signal("page_reordered")
  Gtk.PageReorderedHandler Raised when a notebook page is reordered.
- Method
  2.12.0.0
  System.Void Enables the page-selection popup.

  Disables the popup menu. Inverse operation of

- Method
  2.12.0.0
  System.Void Enables 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.

- Method
  2.12.0.0
  System.Int32 `` `` a t use as content of the page. the to use as the tab label. use null to use the default label. prepends a page. a

  Don't forget to call the Show method on the widget or else the new page will not be shown.

- Method
  2.12.0.0
  System.Int32 `` `` `` the to use as contents of the page. the to use as tab label. use null to use the default label. the to use as menu label. use null to get the same label as the tab label, this only works if the tab label is a prepends a page, with a custom popup-label. a

  Don't forget to call the Show method on the widget or else the new page will not be shown.

- Method
  2.12.0.0
  System.Void Switches to the previous page.

  Switches to the previous page. Nothing happens if the current page is the first page.

- Method
  2.12.0.0
  System.Void `` `` `` `` the page. indicates if expand is true or false. indicates if fill is true or false. returns to which is used. Query the packing attributes for the tab label of the page containing child.
- Method
  2.12.0.0
  System.Void `` The page number to remove starting from zero. You can use minus one to remove the last page. Removes a page.

  Removes a page from the notebook given its index in the notebook.

- Method
  2.12.0.0
  System.Void `` `` The widget to move. The new position, or -1 to move to the end Changes the position of a widget in the notebook.

  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.

- Event
  2.12.0.0
  GLib.Signal("reorder_tab")
  Gtk.ReorderTabHandler Raised when a tab is reordered.
- Property
  2.12.0.0
  GLib.Property("scrollable")
  System.Boolean Indicates if scroll arrows are added if there are too many tabs. Returns true if arrows are added and false if not. Default is false.
- Event
  2.12.0.0
  GLib.Signal("select_page")
  Gtk.SelectPageHandler Raised when a page of the notebook is selected.
- Method
  2.12.0.0
  System.Void `` `` the page the to use as menu label. use null to get the same label as the tab label, this only works if the tab label is a Sets the menu label of a page.
- Method
  2.12.0.0
  System.Void `` `` the page. the text of the label. sets the text of a menu label of a page.
- Method
  2.12.0.0
  System.Void `` `` child to update. if , the child is detachable. Sets a child's detachable property.
- Method
  2.12.0.0
  System.Void `` `` the page the to use as label. use null for the default label. Sets the label for the page containing a widget
- Method
  2.12.0.0
  System.Void `` `` `` `` a page. sets true to expand the label. sets true to fill to fill the allocated area. sets of the label. Sets the packing of the tab label of a page.
- Method
  2.12.0.0
  System.Void `` `` The child widget whose label will be changed The new caption for the tab. Sets the label for the page containing a widget

  Creates a new label and sets it as the tab label for the page containing .

- Method
  2.12.0.0
  System.Void `` `` child page. if , the child is reorderable. Sets the tab reorder property of a child.
- Property
  2.12.0.0
  GLib.Property("show-border")
  System.Boolean Indicates if the border is shown. Returns true if the border is shown and false if not. Default value is true.
- Property
  2.12.0.0
  GLib.Property("show-tabs")
  System.Boolean Indicates if the tabs are shown. Returns true if the tabs are shown and false if not. Default value is true.
- Event
  2.12.0.0
  GLib.Signal("switch_page")
  Gtk.SwitchPageHandler Signaled when the page changes

  This signal is raised when the page is changed either by the user or programatically.

- Property
  2.12.0.0
  GLib.Property("tab-border")
  System.Obsolete
  System.UInt32 Sets the width of the border around the tabs.. Default value is 2. This is a easy the change and at the same time. Use those properties to read the width.
- Property
  2.12.0.0
  GLib.Property("tab-hborder")
  System.Obsolete
  System.UInt32 Sets or obtains the width of the horizontal border around the tabs. Returns the horizontal width of the border. Default value is 2.
- Property
  2.12.0.0
  GLib.Property("tab-pos")
  Gtk.PositionType Sets or obtains The position of the tabs. the of this notebook. default is top.
- Property
  2.12.0.0
  GLib.Property("tab-vborder")
  System.Obsolete
  System.UInt32 Sets or obtains the width of the vertical border around the tabs. Returns the vertical width of the border. Default value is 2.
- Property
  2.12.0.0
  Gtk.NotebookWindowCreationFunc Sets a delegate to create windows for detached tabs. a .