summaryrefslogtreecommitdiffstats
path: root/doc/ttk_notebook.n
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2009-11-01 18:12:44 (GMT)
committerjenglish <jenglish@flightlab.com>2009-11-01 18:12:44 (GMT)
commit0c58d63813ddb8805d9b12b877a47e2d66027897 (patch)
tree82d1b223559ec164d9a4b29d63dac1acfbaf507e /doc/ttk_notebook.n
parent0f2aa87192cc95c6095ccce0e517004664c2061f (diff)
downloadtk-0c58d63813ddb8805d9b12b877a47e2d66027897.zip
tk-0c58d63813ddb8805d9b12b877a47e2d66027897.tar.gz
tk-0c58d63813ddb8805d9b12b877a47e2d66027897.tar.bz2
Uniform, extensible syntax for [$w identify] methods:
[$w identify $component $x $y]. All ttk::* widgets support [$w identify element $x $y]; widgets with other identifiable parts may have additional subcommands. Notebook widgets support [$nb identify tab], Panedwindow widgets support [$w identify sash]. Older 2-argument form [$w identify $x $y] still supported, though it does different things depending on the widget.
Diffstat (limited to 'doc/ttk_notebook.n')
-rw-r--r--doc/ttk_notebook.n30
1 files changed, 16 insertions, 14 deletions
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n
index 699225f..b3eda25 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_notebook.n,v 1.15 2008/09/23 13:36:57 dkf Exp $
+'\" RCS: @(#) $Id: ttk_notebook.n,v 1.16 2009/11/01 18:12:44 jenglish Exp $
'\"
.so man.macros
.TH ttk::notebook n 8.5 Tk "Tk Themed Widget"
@@ -13,14 +13,13 @@
ttk::notebook \- Multi-paned container widget
.SH SYNOPSIS
.nf
-\fBttk::notebook\fR \fIpathName \fR?\fIoptions...\fR?
+\fBttk::notebook\fR \fIpathname \fR?\fIoptions...\fR?
.br
-\fIpathName \fBadd\fR \fIwindow\fR ?\fIoptions...\fR?
-\fIpathName \fBinsert\fR \fIindex\fR \fIwindow\fR ?\fIoptions...\fR?
+\fIpathname \fBadd\fR \fIwindow\fR ?\fIoptions...\fR?
+\fIpathname \fBinsert\fR \fIindex\fR \fIwindow\fR ?\fIoptions...\fR?
.fi
.BE
.SH DESCRIPTION
-.PP
A \fBttk::notebook\fR widget manages a collection of windows
and displays a single one at a time.
Each slave window is associated with a \fItab\fR,
@@ -50,7 +49,6 @@ specifies the desired width of the pane area
(not including internal padding).
Otherwise, the maximum width of all panes is used.
.SH "TAB OPTIONS"
-.PP
The following options may be specified for individual notebook panes:
.OP \-state state State
Either \fBnormal\fR, \fBdisabled\fR or \fBhidden\fR.
@@ -82,7 +80,6 @@ in the text string.
The underlined character is used for mnemonic activation
if \fBttk::notebook::enableTraversal\fR is called.
.SH "TAB IDENTIFIERS"
-.PP
The \fItabid\fR argument to the following commands may take
any of the following forms:
.IP \(bu
@@ -104,7 +101,6 @@ which returns the number of tabs
(only valid for
.QW "\fIpathname \fBindex\fR" ).
.SH "WIDGET COMMAND"
-.PP
.TP
\fIpathname \fBadd\fR \fIwindow\fR ?\fIoptions...\fR?
Adds a new tab to the notebook.
@@ -128,9 +124,18 @@ The tab will not be displayed, but the associated window
remains managed by the notebook and its configuration remembered.
Hidden tabs may be restored with the \fBadd\fR command.
.TP
-\fIpathName \fBidentify\fR \fIx y\fR
-Returns the name of the element at position \fIx\fR, \fIy\fR.
-See \fIttk::widget(n)\fR.
+\fIpathname \fBidentify\fR \fIcomponent\fR \fIx\fR \fIy\fR
+Returns the name of the element under the point given by \fIx\fR and \fIy\fR,
+or the empty string if no component is present at that location.
+The following subcommands are supported:
+.RS
+.TP
+\fIpathname \fBidentify\fR \fBelement\fR \fIx\fR \fIy\fR
+Returns the name of the element at the specified location.
+.TP
+\fIpathname \fBidentify\fR \fBtab\fR \fIx\fR \fIy\fR
+Returns the index of the tab at the specified location.
+.RE
.TP
\fIpathname \fBindex\fR \fItabid\fR
Returns the numeric index of the tab specified by \fItabid\fR,
@@ -170,7 +175,6 @@ See \fBTAB OPTIONS\fR for the available options.
\fIpathname \fBtabs\fR
Returns the list of windows managed by the notebook.
.SH "KEYBOARD TRAVERSAL"
-.PP
To enable keyboard traversal for a toplevel window
containing a notebook widget \fI$nb\fR, call:
.CS
@@ -192,11 +196,9 @@ including nested notebooks.
However, notebook traversal only works properly if all panes
are direct children of the notebook.
.SH "VIRTUAL EVENTS"
-.PP
The notebook widget generates a \fB<<NotebookTabChanged>>\fR
virtual event after a new tab is selected.
.SH "EXAMPLE"
-.PP
.CS
pack [\fBttk::notebook\fR .nb]
\.nb add [frame .nb.f1] \-text "First tab"