package stk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Class Notebook.notebookSource

Notebook widget.

A notebook widget is a [Widget.widget] Container.container, i.e. a widget containing contents widgets (the pages), each one being associated to a widget representing this page in the list of displayed tabs.

A notebook can be oriented vertically (tabs are on the left and and are packed vertically) or horizontally (tabs are on top and and are packed horizontally).

method active_page : int option
method set_active_page : int -> bool

Make page p the active page (0-based index).

method get_nth : int option -> (Stk.Widget.widget * Stk.Widget.widget) option

nb#get_page None returns None. nb#get_page (Some n) returns None if n-th page does not exist, or Some (label_widget, page_widget).

method pack : ?pos:int -> label:Stk.Widget.widget -> Stk.Widget.widget -> unit

#pack ~label w adds a new page with contents widget w and label widget label. Optional argument pos can be used to specify a 0-based position for the new page. Default is to append the page.

method unpack : Stk.Widget.widget -> unit

unpack w removes the page corresponding to the (contents) widget w.

method remove_page : int -> unit

remove_page i removes the page at index i.

OCaml

Innovation. Community. Security.