summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorcsaba <csaba>2023-11-12 14:07:40 (GMT)
committercsaba <csaba>2023-11-12 14:07:40 (GMT)
commitb5cf51ea45f5c92dedcc0d01746691f9da068577 (patch)
treee85708b29097d82fde8d1f964707b570f713ffae /doc
parent56410ec6ae9289909c614df04aad9f58eed33013 (diff)
downloadtk-b5cf51ea45f5c92dedcc0d01746691f9da068577.zip
tk-b5cf51ea45f5c92dedcc0d01746691f9da068577.tar.gz
tk-b5cf51ea45f5c92dedcc0d01746691f9da068577.tar.bz2
Backported the changes made in the branch bug-eedd2e078d to core-8-6-branch.
Diffstat (limited to 'doc')
-rw-r--r--doc/ttk_notebook.n39
1 files changed, 38 insertions, 1 deletions
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n
index efbfe6c..293f018 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.n
@@ -232,7 +232,15 @@ are:
.br
\fB\-tabmargins\fP \fIpadding\fP
.br
-\fB\-tabposition\fP \fIside\fP
+\fB\-tabposition\fP \fIposition\fP
+.RS
+Specifies the position of the tab row or column as a string of length
+1 or 2. The first character indicates the side as \fBn\fP, \fBs\fP,
+\fBw\fP, or \fBe\fP, while the second character (if present) is the
+sticky bit (specified as \fBw\fP, \fBe\fP, \fBn\fP, or \fBs\fP) within
+the tab position. The default position is \fBn\fP for the \fBaqua\fP
+theme and \fBnw\fP for all the other built-in themes.
+.RE
.br
.PP
\fBTNotebook.Tab\fP styling options configurable with \fBttk::style\fP
@@ -249,12 +257,41 @@ are:
Defines how much the tab grows in size. Usually used with the
\fBselected\fP dynamic state. \fB\-tabmargins\fP should be
set appropriately so that there is room for the tab growth.
+For example, the Ttk library file \fBvistaTheme.tcl\fP contains
+the lines
+.CS
+ttk::style configure TNotebook -tabmargins {2 2 2 0}
+ttk::style map TNotebook.Tab -expand {selected {2 2 2 2}}
+.CE
+which are valid for the default value \fBnw\fP of the \fB\-tabposition\fP
+style option. For a \fBttk::notebook\fP style \fBnbStyle\fP defined by
+.CS
+set nbStyle SW.TNotebook
+ttk::style configure $nbStyle -tabposition sw
+.CE
+you will have to adapt the above settings as follows:
+.CS
+ttk::style configure $nbStyle -tabmargins {2 0 2 2}
+ttk::style map $nbStyle.Tab -expand {selected {2 2 2 2}}
+.CE
.RE
\fB\-font\fP \fIfont\fP
.br
\fB\-foreground\fP \fIcolor\fP
.br
\fB\-padding\fP \fIpadding\fP
+.RS
+Some themes (e.g., \fBclam\fP) use a different \fIpadding\fP for the
+selected tab. For example, the Ttk library file \fBclamTheme.tcl\fP
+contains the lines
+.CS
+ttk::style configure TNotebook.Tab -padding {6 2 6 2}
+ttk::style map TNotebook.Tab -padding {selected {6 4 6 2}}
+.CE
+which are valid for the default value \fBnw\fP of the \fB\-tabposition\fP
+style option. Again, for a different tab position you will have to adapt
+the above settings accordingly.
+.RE
.PP
Some options are only available for specific themes.
.PP