ttk::notebook tab
Gives or sets the options of a tab.
PATHNAME tab TAB
PATHNAME tab TAB OPTION
PATHNAME tab TAB OPTION VALUE ?OPTION VALUE ...?
Description
With no OPTION, gives a list of each tab option and its value. With one OPTION, gives its value. With pairs, sets the options. The tab options are these.
-text: the text of the tab.-underline: the index of a character of the text to underline, or -1.-state:normal,disabledfor a tab that the user cannot select, orhidden.-sticky: the sides of the page area that a smaller page sticks to, fromn,s,e, andw. The defaultnsewstretches the page.-padding: the space around the page in the page area.-imageand-compound: an image of the tab and its place.
Returns
A list of options and values, a value, or an empty string.
Examples
% ttk::notebook .tnbta
> ttk::frame .tnbta.a
> .tnbta add .tnbta.a -text First
> .tnbta tab 0
-padding 0 -sticky nsew -state normal -text First -image {} -compound {} -underline -1
% ttk::notebook .tnbta2
> ttk::frame .tnbta2.a
> .tnbta2 add .tnbta2.a
> .tnbta2 tab 0 -text Renamed
> .tnbta2 tab 0 -text
Renamed
Errors
% ttk::notebook .tnbta3; ttk::frame .tnbta3.a; .tnbta3 add .tnbta3.a; .tnbta3 tab 0 -state bogus
bad state "bogus": must be normal, disabled, or hidden
-errorcode NONE
% ttk::notebook .tnbta4; ttk::frame .tnbta4.a; .tnbta4 add .tnbta4.a; .tnbta4 tab 0 -sticky bogus
Bad -sticky specification bogus
-errorcode NONE
% ttk::notebook .tnbta5; .tnbta5 tab
wrong # args: should be ".tnbta5 tab tab ?-option ?value??..."
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1