package stk

  1. Overview
  2. Docs

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 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.