beetlebug▾
/

ttk::notebook add

Adds a page with a tab at the end, or shows a hidden tab again.

PATHNAME add PAGE ?OPTION VALUE ...?

Description

PAGE is a widget, a child of the notebook or of its parent. The notebook adds a tab for it at the end of the row, with the tab options of the call. The first tab that is added is selected. For a page that is already in the notebook, add sets its options and turns a hidden tab back to normal.

Returns

An empty string.

Examples

% ttk::notebook .tnbad
> ttk::frame .tnbad.a
> .tnbad add .tnbad.a -text First
> list [.tnbad tabs] [.tnbad select]
.tnbad.a .tnbad.a

Errors

% ttk::notebook .tnbad2; .tnbad2 add .nosuch
bad window path name ".nosuch"
-errorcode NONE

% ttk::notebook .tnbad3; .tnbad3 add
wrong # args: should be ".tnbad3 add window ?-option value ...?"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also