summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorcsaba <csaba>2023-11-10 20:28:59 (GMT)
committercsaba <csaba>2023-11-10 20:28:59 (GMT)
commit3c2b81f90f8bb785d3f364558c578685d85943fd (patch)
tree79eda50b8057917ae166ab5bc1c1cb377f365df8 /doc
parente057ae9cc33c7b8c75c853c562b8da55f20529f9 (diff)
downloadtk-3c2b81f90f8bb785d3f364558c578685d85943fd.zip
tk-3c2b81f90f8bb785d3f364558c578685d85943fd.tar.gz
tk-3c2b81f90f8bb785d3f364558c578685d85943fd.tar.bz2
Extended the man page for ttk::notebook; updated ttkWinTheme.c and ttkWinXPTheme.c.
Diffstat (limited to 'doc')
-rw-r--r--doc/ttk_notebook.n41
1 files changed, 40 insertions, 1 deletions
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n
index 869e4bf..007ef92 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.n
@@ -230,7 +230,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 size 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
@@ -247,12 +255,43 @@ 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 {4.5p 1.5p 4.5p 1.5p}
+ttk::style map TNotebook.Tab \\
+ -padding {selected {4.5p 3p 4.5p 1.5p}}
+.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