/// <summary> /// Clears all pages from a notebook. /// </summary> /// <param name="notebook">The notebook to clear the pages from.</param> public static void ClearPages(this Gtk.Notebook notebook) { while (notebook.NPages > 0) { notebook.RemovePage(-1); } }
protected void AddCustomWidget(Gtk.Widget w) { w.ShowAll(); book.AppendPage(w, null); book.Page = book.NPages - 1; if (initialized) { Gtk.Widget cw = book.GetNthPage(0); book.RemovePage(0); cw.Destroy(); } else { initialized = true; } }
/// <summary> /// Clears all pages from a notebook. /// </summary> /// <param name="notebook">The notebook to clear the pages from.</param> public static void ClearPages(this Gtk.Notebook notebook) { if (notebook == null) { throw new ArgumentNullException(nameof(notebook)); } while (notebook.NPages > 0) { notebook.RemovePage(-1); } }
internal void DeletePage() { tabs.RemoveAt(notebook.CurrentPage); notebook.RemovePage(notebook.CurrentPage); }
void HandleCloseActivated(object sender, EventArgs e) { noteBook.RemovePage(noteBook.Page); }
void CreateHandlers() { Close.Clicked += delegate { _parent.RemovePage(_parent.CurrentPage); }; }
void HandleActivated(object sender, EventArgs e) { nb.RemovePage(nb.Page); }