https://pkg.go.dev/modernc.org/tk9.0 Go Skip to Main Content [ ] [ ] # # * Why Go submenu dropdown icon + Case Studies Common problems companies solve with Go + Use Cases Stories about how and why companies use Go + Security Policy How Go can help keep you secure by default * Learn * Docs submenu dropdown icon + Effective Go Tips for writing clear, performant, and idiomatic Go code + Go User Manual A complete introduction to building software with Go + Standard library Reference documentation for Go's standard library + Release Notes Learn what's new in each Go release * Packages * Community submenu dropdown icon + Recorded Talks Videos from prior events + Meetups # Meet other local Go developers + Conferences # Learn and network with Go developers from around the world + Go blog The Go project's official blog. + Go project Get help and stay informed from Go + Get connected [google-gro] [github] [twitter] [reddit] [slack] [stack-over] Go. * Why Go # # Why Go + Case Studies + Use Cases + Security Policy * Learn * Docs # # Docs + Effective Go + Go User Manual + Standard library + Release Notes * Packages * Community # # Community + Recorded Talks + Meetups # + Conferences # + Go blog + Go project + Get connected [google-gro] [github] [twitter] [reddit] [slack] [stack-over] 1. Discover Packages 2. modernc.org/tk9.0 # Go tk9_0 package module # Version: v0.53.0 Opens a new window with list of versions in this module. Latest Latest Warning This package is not in the latest version of its module. Go to latest Published: Nov 27, 2024 License: BSD-3-Clause Opens a new window with license information. Imports: 37 Opens a new window with list of imports. Imported by: 3 Opens a new window with list of known importers. [Main ] Details * checked Valid go.mod file # The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. * checked Redistributable license # Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed. * checked Tagged version # Modules with tagged versions give importers more predictable builds. * unchecked Stable version # When a project reaches major version v1 it is considered stable. * Learn more about best practices Repository gitlab.com/cznic/tk9.0 Links * Open Source Insights Logo Open Source Insights Jump to ... * README + tk9.0: The CGo-free, cross platform GUI toolkit for Go * Documentation + Overview + Index + Constants + Variables + Functions o ActivateTheme(name) o Bell(options) o Bind(options) o ChooseColor(options) o ChooseDirectory(options) o ClipboardAppend(data, options) o ClipboardClear(options) o ClipboardGet(options) o CourierFont() o CurrentThemeName() o Destroy(options) o Finalize() o Focus(options) o FontConfigure(name, options) o FontFamilies(options) o Fontchooser(options) o FontchooserFont() o FontchooserHide() o FontchooserShow() o GetOpenFile(options) o GetSaveFile(options) o Grid(w, options) o GridAnchor(w, anchor) o GridColumnConfigure(w, index, options) o GridRowConfigure(w, index, options) o Initialize() o MessageBox(options) o Pack(options) o Place(options) o StyleConfigure(style, options) o StyleElementCreate(elementName, typ, options) o StyleElementNames() o StyleElementOptions(element) o StyleLayout(style, options) o StyleLookup(style, options) o StyleMap(style, options) o StyleThemeNames() o StyleThemeStyles(themeName) o StyleThemeUse(themeName) o TeX(src, scale) o TeX2(src, scale) o TeXImg(src, scale) o TeXImg2(src, scale) o TkScaling(options) o TooltipClear(pattern) o TooltipConfigure(options) o TooltipDelay(delay) o TooltipFade(v) o TooltipOff(v) o TooltipOn(v) o Update() o WinfoHeight(w) o WinfoScreenHeight(w) o WinfoScreenWidth(w) o WinfoWidth(w) o WmGeometry(w, geometry) o WmMaxSize(w) o WmMinSize(w, widthHeight) o WmProtocol(w, name, command) o WmSetMaxSize(w, width, height) + Types o type ButtonWidget # Button(options) # Exit(options) # (w) Invoke() o type CanvasWidget # Canvas(options) # (w) Graph(script) o type CheckbuttonWidget # Checkbutton(options) # (w) Deselect() # (w) Invoke() # (w) Select() o type EntryWidget # Entry(options) o type Event # (e) ScrollSet(w) # (e) SetReturnCodeBreak() # (e) SetReturnCodeContinue() # (e) SetReturnCodeError() # (e) SetReturnCodeOK() # (e) SetReturnCodeReturn() # (e) Xview(w) # (e) Yview(w) o type EventHandler o type FileType o type FontFace # NewFont(options) # (f) Delete() # (f) String() o type FrameWidget # Frame(options) o type Img # NewBitmap(options) # NewPhoto(options) # (m) Copy(src, options) # (m) Delete() # (m) Graph(script) # (m) Height() # (m) String() # (m) Width() o type LC # (lc) String() o type LabelWidget # Label(options) o type LabelframeWidget # Labelframe(options) o type ListboxWidget # Listbox(options) o type MenuItem # (m) String() o type MenuWidget # Menu(options) # (w) AddCascade(options) # (w) AddCheckbutton(options) # (w) AddCommand(options) # (w) AddRadiobutton(options) # (w) AddSeparator(options) # (w) EntryConfigure(index, options) # (w) Invoke(index) o type MenubuttonWidget # Menubutton(options) o type MessageWidget # Message(options) o type Opt # Accelerator(val) # Activebackground(val) # Activeborderwidth(val) # Activeforeground(val) # Activerelief(val) # Activestyle(val) # After(val) # Align(val) # Anchor(val) # Arrowcolor(val) # Arrowsize(val) # Aspect(val) # Autoseparators(val) # Background(val) # Backgroundimage(val) # Backward() # Before(val) # Bgstipple(val) # Bigincrement(val) # Bitmap(val) # Blockcursor(val) # Border(val) # Bordercolor(val) # Bordermode(val) # Borderwidth(val) # Buttonbackground(val) # Buttoncursor(val) # Buttondownrelief(val) # Buttonuprelief(val) # Chars() # Children(list) # Class(val) # Closeenough(val) # Colormap(val) # Column(val) # Columnbreak(val) # Columns(val) # Columnseparatorwidth(val) # Columnspan(val) # Command(handler) # Compound(val) # Confine(val) # Confirmoverwrite(val) # Container(val) # Cursor(val) # Darkcolor(val) # Data(val) # Default(val) # Defaultextension(val) # Detail(val) # Digits(val) # Direction(val) # Disabledbackground(val) # Disabledforeground(val) # Displaychars() # Displaycolumns(val) # Displayindices() # Displaylines() # Displayof(val) # Elementborderwidth(val) # Elide(val) # Endline(val) # ExitHandler() # Expand(val) # Exportselection(val) # Family(val) # Fgstipple(val) # Fieldbackground(val) # File(val) # Filetypes(val) # Fill(val) # Focuscolor(val) # Focusfill(val) # Focussolid(val) # Focusthickness(val) # Font(list) # Force(val) # Foreground(val) # Format(val) # Forward() # From(val) # Gamma(val) # Gripsize(val) # Groovewidth(val) # Handlepad(val) # Handlesize(val) # Heading(columnId) # Height(val) # Hidemargin(val) # Highlightbackground(val) # Highlightcolor(val) # Highlightthickness(val) # Icon(val) # Id(val) # Image(val) # In(val) # Inactiveselectbackground(val) # Increment(val) # Indent(val) # Index(index) # Indicatorbackground(val) # Indicatorcolor(val) # Indicatormargin(val) # Indicatormargins(val) # Indicatoron(val) # Indicatorrelief(val) # Indicatorsize(val) # Indices() # Info(info) # Initialcolor(val) # Initialdir(val) # Initialfile(val) # Insertbackground(val) # Insertborderwidth(val) # Insertcolor(val) # Insertofftime(val) # Insertontime(val) # Insertunfocussed(val) # Insertwidth(val) # Invalidcommand(handler) # Ipadx(val) # Ipady(val) # Items(items) # Jump(val) # Justify(val) # Labelanchor(val) # Labelmargins(val) # Labeloutside(val) # Labelwidget(val) # Lastfor(val) # Lbl(val) # Length(val) # Lightcolor(val) # Lines() # Listvariable(val) # Lmargin1(val) # Lmargin2(val) # Lmargincolor(val) # Maskdata(val) # Maskfile(val) # Maximum(val) # Maxphase(val) # Maxundo(val) # Metadata(val) # Minsize(val) # Mnu(val) # Mode(val) # Msg(val) # Multiple(val) # Mustexist(val) # Nice(val) # Nocase() # Offrelief(val) # Offset(val) # Offvalue(val) # Onvalue(val) # Opaqueresize(val) # Open(val) # Orient(val) # Overrelief(val) # Overstrike(val) # Overstrikefg(val) # Padding(val) # Padx(val) # Pady(val) # Palette(val) # Parent(val) # Period(val) # Phase(val) # Placeholder(val) # Placeholderforeground(val) # Postcommand(handler) # Postoffset(val) # Proxybackground(val) # Proxyborderwidth(val) # Proxyrelief(val) # Readonlybackground(val) # Regexp() # Relheight(val) # Relief(val) # Relwidth(val) # Relx(val) # Rely(val) # Repeatdelay(val) # Repeatinterval(val) # Resolution(val) # Rmargin(val) # Rmargincolor(val) # Row(val) # Rowheight(val) # Rowspan(val) # Sashcursor(val) # Sashpad(val) # Sashrelief(val) # Sashthickness(val) # Sashwidth(val) # Screen(val) # Scrollregion(val) # Selectbackground(val) # Selectborderwidth(val) # Selectcolor(val) # Selectforeground(val) # Selectimage(val) # Selectmode(val) # Selecttype(val) # Setgrid(val) # Shiftrelief(val) # Show(val) # Showhandle(val) # Showvalue(val) # Side(val) # Size(val) # Slant(val) # Sliderlength(val) # Sliderrelief(val) # Sliderwidth(val) # Spacing1(val) # Spacing2(val) # Spacing3(val) # Startline(val) # State(val) # Sticky(val) # Stretch(when) # Striped(val) # Stripedbackground(val) # Style(val) # Tab(tabId) # Tabmargins(val) # Tabposition(val) # Tabs(val) # Tabstyle(val) # Tag(name) # Takefocus(val) # Tearoff(val) # Tearoffcommand(handler) # Textvariable(s) # Tickinterval(val) # Tile(val) # Title(val) # Titlecolumns(val) # Titleitems(val) # To(val) # Tristateimage(val) # Tristatevalue(val) # Troughcolor(val) # Troughrelief(val) # Txt(val) # Type(val) # Underline(val) # Underlinefg(val) # Undo(val) # Use(val) # Validate(val) # Validatecommand(handler) # Value(val) # Values(val) # Visual(val) # Weight(val) # Width(val) # Win(val) # Wrap(val) # Wraplength(val) # X(val) # Xpixels() # Xscrollcommand(handler) # Xscrollincrement(val) # Y(val) # Ypixels() # Yscrollcommand(handler) # Yscrollincrement(val) o type OptionMenuWidget # OptionMenu(varName, options) # (w) Name() o type Opts o type PanedwindowWidget # Panedwindow(options) # (w) Add(subwindow, options) # (w) Panecget(subwindow, opt) # (w) Paneconfigure(subwindow, options) o type RadiobuttonWidget # Radiobutton(options) o type ScaleWidget # Scale(options) o type ScrollbarWidget # Scrollbar(options) o type SpinboxWidget # Spinbox(options) o type TButtonWidget # TButton(options) # TExit(options) # (w) Invoke() o type TCheckbuttonWidget # TCheckbutton(options) # (w) Invoke() o type TComboboxWidget # TCombobox(options) # (w) Current(newIndex) o type TEntryWidget # TEntry(options) o type TFrameWidget # TFrame(options) o type TLabelWidget # TLabel(options) o type TLabelframeWidget # TLabelframe(options) o type TMenubuttonWidget # TMenubutton(options) o type TNotebookWidget # TNotebook(options) # (w) Add(options) # (w) Select(tabid) # (w) Tabs() o type TPanedwindowWidget # TPanedwindow(options) # (w) Add(subwindow, options) o type TProgressbarWidget # TProgressbar(options) o type TRadiobuttonWidget # TRadiobutton(options) o type TScaleWidget # TScale(options) # (w) Get(xy) o type TScrollbarWidget # TScrollbar(options) # (w) Set(firstLast) o type TSeparatorWidget # TSeparator(options) o type TSizegripWidget # TSizegrip(options) o type TSpinboxWidget # TSpinbox(options) o type TTreeviewWidget # TTreeview(options) # (w) Column(column, options) # (w) Heading(column, options) # (w) Insert(parent, index, options) # (w) Item(item, options) # (w) See(item) # (w) Selection(selop, itemList) o type TextWidget # Text(options) # (w) Clear() # (w) Copy() # (w) Count(options) # (w) Cut() # (w) Delete(options) # (w) EditReset() # (w) Get(options) # (w) ImageCreate(index, options) # (w) Index(index) # (w) Insert(index, chars, options) # (w) InsertML(list) # (w) MarkGravity(markName, direction) # (w) MarkNames() # (w) MarkSet(markName, index) # (w) MarkUnset(markName) # (w) Modified() # (w) Paste() # (w) Redo() # (w) Search(options) # (w) See(index) # (w) SelectAll() # (w) SetModified(v) # (w) TagAdd(options) # (w) TagBind(tag, sequence, handler) # (w) TagConfigure(tagName, options) # (w) TagDelete(tags) # (w) TagNames(index) # (w) TagRanges(tagName) # (w) Text() # (w) Undo() # (w) WindowCreate(index, options) # (w) Xview() # (w) Yview() # (w) Yviewmoveto(fraction) o type Theme # CurrentTheme() o type ThemeContext o type ThemeKey # RegisterTheme(name, t) o type Ticker # NewTicker(d, handler) o type ToplevelWidget # Toplevel(options) o type VariableOpt # Variable(val) # (v) Get() # (v) Set(val) o type Widget # Tooltip(w, options) o type Window # (w) Activebackground() # (w) Activeborderwidth() # (w) Activeforeground() # (w) Activerelief() # (w) Activestyle() # (w) Anchor() # (w) Aspect() # (w) Autoseparators() # (w) Background() # (w) Backgroundimage() # (w) Bigincrement() # (w) Bitmap() # (w) Blockcursor() # (w) Borderwidth() # (w) Busy(options) # (w) BusyForget(options) # (w) Button(options) # (w) Buttonbackground() # (w) Buttoncursor() # (w) Buttondownrelief() # (w) Buttonuprelief() # (w) Canvas(options) # (w) Center() # (w) Checkbutton(options) # (w) Class() # (w) Closeenough() # (w) Colormap() # (w) Columns() # (w) Compound() # (w) Configure(options) # (w) Confine() # (w) Container() # (w) Cursor() # (w) Default() # (w) Digits() # (w) Direction() # (w) Disabledbackground() # (w) Disabledforeground() # (w) Displaycolumns() # (w) Elementborderwidth() # (w) Endline() # (w) Entry(options) # (w) Exit(options) # (w) Exportselection() # (w) Font() # (w) Foreground() # (w) Format() # (w) Frame(options) # (w) Handlepad() # (w) Handlesize() # (w) Height() # (w) Highlightbackground() # (w) Highlightcolor() # (w) Highlightthickness() # (w) IconPhoto(options) # (w) Image() # (w) Inactiveselectbackground() # (w) Increment() # (w) Indicatoron() # (w) Insertbackground() # (w) Insertborderwidth() # (w) Insertofftime() # (w) Insertontime() # (w) Insertunfocussed() # (w) Insertwidth() # (w) Jump() # (w) Justify() # (w) Label(options) # (w) Labelanchor() # (w) Labelframe(options) # (w) Labelwidget() # (w) Lbl() # (w) Length() # (w) Listbox(options) # (w) Listvariable() # (w) Lower(belowThis) # (w) Maximum() # (w) Maxundo() # (w) Menu(options) # (w) Menubutton(options) # (w) Message(options) # (w) Mnu() # (w) Mode() # (w) Offrelief() # (w) Offvalue() # (w) Onvalue() # (w) Opaqueresize() # (w) OptionMenu(varName, options) # (w) Orient() # (w) Overrelief() # (w) Padding() # (w) Padx() # (w) Pady() # (w) Panedwindow(options) # (w) Phase() # (w) Placeholder() # (w) Placeholderforeground() # (w) Proxybackground() # (w) Proxyborderwidth() # (w) Proxyrelief() # (w) Radiobutton(options) # (w) Raise(aboveThis) # (w) Readonlybackground() # (w) Relief() # (w) Repeatdelay() # (w) Repeatinterval() # (w) Resolution() # (w) Sashcursor() # (w) Sashpad() # (w) Sashrelief() # (w) Sashwidth() # (w) Scale(options) # (w) Screen() # (w) Scrollbar(options) # (w) Scrollregion() # (w) Selectbackground() # (w) Selectborderwidth() # (w) Selectcolor() # (w) Selectforeground() # (w) Selectimage() # (w) Selectmode() # (w) Selecttype() # (w) SetResizable(width, height) # (w) Setgrid() # (w) Show() # (w) Showhandle() # (w) Showvalue() # (w) Sliderlength() # (w) Sliderrelief() # (w) Spacing1() # (w) Spacing2() # (w) Spacing3() # (w) Spinbox(options) # (w) Startline() # (w) State() # (w) Sticky() # (w) String() # (w) Striped() # (w) Style() # (w) TButton(options) # (w) TCheckbutton(options) # (w) TCombobox(options) # (w) TEntry(options) # (w) TExit(options) # (w) TFrame(options) # (w) TLabel(options) # (w) TLabelframe(options) # (w) TMenubutton(options) # (w) TNotebook(options) # (w) TPanedwindow(options) # (w) TProgressbar(options) # (w) TRadiobutton(options) # (w) TScale(options) # (w) TScrollbar(options) # (w) TSeparator(options) # (w) TSizegrip(options) # (w) TSpinbox(options) # (w) TTreeview(options) # (w) Tabs() # (w) Tabstyle() # (w) Takefocus() # (w) Tearoff() # (w) Text(options) # (w) Textvariable() # (w) Tickinterval() # (w) Tile() # (w) Title() # (w) Titlecolumns() # (w) Titleitems() # (w) Toplevel(options) # (w) Tristateimage() # (w) Tristatevalue() # (w) Troughcolor() # (w) Txt() # (w) Type() # (w) Underline() # (w) Undo() # (w) Use() # (w) Validate() # (w) Value() # (w) Values() # (w) Variable() # (w) Visual() # (w) Wait() # (w) WaitVisibility() # (w) Weight() # (w) WidgetState(stateSpec) # (w) Width() # (w) WmTitle(s) # (w) Wrap() # (w) Wraplength() # (w) Xscrollincrement() # (w) Yscrollincrement() + Notes o Bugs * Source Files * Directories [README] # README P tk9.0: The CGo-free, cross platform GUI toolkit for Go photo Using Go embedded images (_examples/photo.go). 1 package main 2 3 import _ "embed" 4 import . "modernc.org/tk9.0" 5 6 //go:embed gopher.png 7 var gopher []byte 8 9 func main() { 10 Pack(Label(Image(NewPhoto(Data(gopher)))), 11 TExit(), 12 Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 13 App.Center().Wait() 14 } menu Cascading menus (_examples/menu.go) 1 package main 2 3 import ( 4 "fmt" 5 . "modernc.org/tk9.0" 6 "runtime" 7 ) 8 9 func main() { 10 menubar := Menu() 11 12 fileMenu := menubar.Menu() 13 fileMenu.AddCommand(Lbl("New"), Underline(0), Accelerator("Ctrl+N")) 14 fileMenu.AddCommand(Lbl("Open..."), Underline(0), Accelerator("Ctrl+O"), Command(func() { GetOpenFile() })) 15 Bind(App, "", Command(func() { fileMenu.Invoke(1) })) 16 fileMenu.AddCommand(Lbl("Save"), Underline(0), Accelerator("Ctrl+S")) 17 fileMenu.AddCommand(Lbl("Save As..."), Underline(5)) 18 fileMenu.AddCommand(Lbl("Close"), Underline(0), Accelerator("Crtl+W")) 19 fileMenu.AddSeparator() 20 fileMenu.AddCommand(Lbl("Exit"), Underline(1), Accelerator("Ctrl+Q"), ExitHandler()) 21 Bind(App, "", Command(func() { fileMenu.Invoke(6) })) 22 menubar.AddCascade(Lbl("File"), Underline(0), Mnu(fileMenu)) 23 24 editMenu := menubar.Menu() 25 editMenu.AddCommand(Lbl("Undo")) 26 editMenu.AddSeparator() 27 editMenu.AddCommand(Lbl("Cut")) 28 editMenu.AddCommand(Lbl("Copy")) 29 editMenu.AddCommand(Lbl("Paste")) 30 editMenu.AddCommand(Lbl("Delete")) 31 editMenu.AddCommand(Lbl("Select All")) 32 menubar.AddCascade(Lbl("Edit"), Underline(0), Mnu(editMenu)) 33 34 helpMenu := menubar.Menu() 35 helpMenu.AddCommand(Lbl("Help Index")) 36 helpMenu.AddCommand(Lbl("About...")) 37 menubar.AddCascade(Lbl("Help"), Underline(0), Mnu(helpMenu)) 38 39 App.WmTitle(fmt.Sprintf("%s on %s", App.WmTitle(""), runtime.GOOS)) 40 App.Configure(Mnu(menubar), Width("8c"), Height("6c")).Wait() 41 } Menus on darwin are now using the system-managed menu bar. svg Rich text using markup (_examples/text.go). 1 package main 2 3 import . "modernc.org/tk9.0" 4 5 func main() { 6 var scroll *TScrollbarWidget 7 t := Text(Font("helvetica", 10), Yscrollcommand(func(e *Event) { e.ScrollSet(scroll) }), Setgrid(true), Wrap("word"), Padx("2m"), Pady("2m")) 8 scroll = TScrollbar(Command(func(e *Event) { e.Yview(t) })) 9 Grid(t, Sticky("news"), Pady("2m")) 10 Grid(scroll, Row(0), Column(1), Sticky("nes"), Pady("2m")) 11 GridRowConfigure(App, 0, Weight(1)) 12 GridColumnConfigure(App, 0, Weight(1)) 13 Grid(TExit(), Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 14 t.TagConfigure("bgstipple", Background(Black), Borderwidth(0), Bgstipple(Gray12)) 15 t.TagConfigure("big", Font("helvetica", 12, "bold")) 16 t.TagConfigure("bold", Font("helvetica", 10, "bold", "italic")) 17 t.TagConfigure("center", Justify("center")) 18 t.TagConfigure("color1", Background("#a0b7ce")) 19 t.TagConfigure("color2", Foreground(Red)) 20 t.TagConfigure("margins", Lmargin1("12m"), Lmargin2("6m"), Rmargin("10m")) 21 t.TagConfigure("overstrike", Overstrike(1)) 22 t.TagConfigure("raised", Relief("raised"), Borderwidth(1)) 23 t.TagConfigure("right", Justify("right")) 24 t.TagConfigure("spacing", Spacing1("10p"), Spacing2("2p"), Lmargin1("12m"), Lmargin2("6m"), Rmargin("10m")) 25 t.TagConfigure("sub", Offset("-2p"), Font("helvetica", 8)) 26 t.TagConfigure("sunken", Relief("sunken"), Borderwidth(1)) 27 t.TagConfigure("super", Offset("4p"), Font("helvetica", 8)) 28 t.TagConfigure("tiny", Font("times", 8, "bold")) 29 t.TagConfigure("underline", Underline(1)) 30 t.TagConfigure("verybig", Font(CourierFont(), 22, "bold")) 31 t.InsertML(`Text widgets like this one allow you to display information in a variety of styles. Display styles are controlled 32 using a mechanism called tags. Tags are just textual names that you can apply to one or more ranges of characters within a 33 text widget. You can configure tags with various display styles. If you do this, then the tagged characters will be displayed with the 34 styles you chose. The available display styles are: 35

1. Font. You can choose any system font, large or small. 36

2. Color. You can change either the background or foreground color, or 37 both. 38

3. Stippling. You can cause the background information to be drawn with a stipple fill instead 39 of a solid fill. 40

4. Underlining. You can underline ranges of text. 41

5. Overstrikes. You can draw lines through ranges of text. 42

6. 3-D effects. You can arrange for the background to be drawn with a border that makes characters appear either 43 raised or sunken. 44

7. Justification. You can arrange for lines to be displayed
left-justified
right-justified, or 45
centered.
46

8. Superscripts and subscripts. You can control the vertical position of text to generate superscript effects like 47 10n or subscript effects like Xi. 48

9. Margins. You can control the amount of extra space left on each side of the text 49

This paragraph is an example of the use of margins. It consists of a single line of text that wraps around on the 50 screen. There are two separate left margin values, one for the first display line associated with the text line, and one for the 51 subsequent display lines, which occur because of wrapping. There is also a separate specification for the right margin, which is used to 52 choose wrap points for lines. 53

10. Spacing. You can control the spacing of lines with three separate parameters. "Spacing1" tells how much extra 54 space to leave above a line, "spacing3" tells how much space to leave below a line, and if a text line wraps, "spacing2" tells how much 55 space to leave between the display lines that make up the text line. 56
These indented paragraphs illustrate how spacing can be used. Each paragraph is actually a single line in the text widget, 57 which is word-wrapped by the widget. 58
Spacing1 is set to 10 points for this text, which results in relatively large gaps between the paragraphs. Spacing2 is set 59 to 2 points, which results in just a bit of extra space within a pararaph. Spacing3 isn't used in this example. 60
To see where the space is, select ranges of text within these paragraphs. The selection highlight will cover the extra 61 space.`) 62 App.Center().Wait() 63 } svg Using svg (_examples/svg.go). 1 package main 2 3 import . "modernc.org/tk9.0" 4 5 // https://en.wikipedia.org/wiki/SVG 6 const svg = ` 7 8 9 10 11 12 13 14 15 16 ` 17 18 func main() { 19 Pack(Label(Image(NewPhoto(Data(svg)))), 20 TExit(), 21 Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 22 App.Center().Wait() 23 } calc A simple calculator (_examples/calc.go). 1 package main 2 3 import "github.com/expr-lang/expr" 4 import . "modernc.org/tk9.0" 5 6 func main() { 7 out := Label(Height(2), Anchor("e"), Txt("(123+232)/(123-10)")) 8 Grid(out, Columnspan(4), Sticky("e")) 9 var b *ButtonWidget 10 for i, c := range "C()/789*456-123+0.=" { 11 b = Button(Txt(string(c)), 12 Command( 13 func() { 14 switch c { 15 case 'C': 16 out.Configure(Txt("")) 17 case '=': 18 x, err := expr.Eval(out.Txt(), nil) 19 if err != nil { 20 MessageBox(Icon("error"), Msg(err.Error()), Title("Error")) 21 x = "" 22 } 23 out.Configure(Txt(x)) 24 default: 25 out.Configure(Txt(out.Txt() + string(c))) 26 } 27 }, 28 ), 29 Width(-4)) 30 Grid(b, Row(i/4+1), Column(i%4), Sticky("news"), Ipadx("1.5m"), Ipady("2.6m")) 31 } 32 Grid(b, Columnspan(2)) 33 App.Configure(Padx(0), Pady(0)).Wait() 34 } font A font previewer (_examples/font.go). 1 package main 2 3 import "fmt" 4 import "slices" 5 import . "modernc.org/tk9.0" 6 7 func main() { 8 var scroll *TScrollbarWidget 9 t := Text(Wrap("none"), Setgrid(true), Yscrollcommand(func(e *Event) { e.ScrollSet(scroll) })) 10 scroll = TScrollbar(Command(func(e *Event) { e.Yview(t) })) 11 fonts := FontFamilies() 12 slices.Sort(fonts) 13 Grid(t, Sticky("news"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 14 Grid(scroll, Row(0), Column(1), Sticky("nes"), Pady("2m")) 15 GridRowConfigure(App, 0, Weight(1)) 16 GridColumnConfigure(App, 0, Weight(1)) 17 Grid(TExit(), Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 18 m := map[string]bool{} 19 for i, font := range fonts { 20 if m[font] { 21 continue 22 } 23 m[font] = true 24 tag := fmt.Sprintf("t%v", i) 25 t.TagConfigure(tag, Font(NewFont(Family(font)))) 26 t.Insert("end", font+": ", "", "Lorem ipsum dolor sit amet, consectetur adipiscing elit...\n", tag) 27 } 28 App.Center().Wait() 29 } splot Surface plot (_examples/splot.go). This example requires Gnuplot 5.4+ installation. 1 package main 2 3 import . "modernc.org/tk9.0" 4 5 var cm = int(TkScaling()*72/2.54 + 0.5) 6 7 func main() { 8 Pack(Label(Image(NewPhoto(Width(20*cm), Height(15*cm)).Graph("set grid; splot x**2+y**2, x**2-y**2"))), 9 TExit(), 10 Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 11 App.Center().Wait() 12 } tori Interlocked tori plot (_examples/tori.go). This example requires Gnuplot 5.4+ installation. 1 package main 2 3 import . "modernc.org/tk9.0" 4 5 // https://gnuplot.sourceforge.net/demo_5.4/hidden2.html 6 const script = ` 7 set multiplot title "Interlocking Tori" 8 set title "PM3D surface\nno depth sorting" 9 set parametric 10 set urange [-pi:pi] 11 set vrange [-pi:pi] 12 set isosamples 50,20 13 set origin -0.02,0.0 14 set size 0.55, 0.9 15 unset key 16 unset xtics 17 unset ytics 18 unset ztics 19 set border 0 20 set view 60, 30, 1.5, 0.9 21 unset colorbox 22 set pm3d scansbackward 23 splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d,1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d 24 set title "PM3D surface\ndepth sorting" 25 set origin 0.40,0.0 26 set size 0.55, 0.9 27 set colorbox vertical user origin 0.9, 0.15 size 0.02, 0.50 28 set format cb "%.1f" 29 set pm3d depthorder 30 splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d,1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d 31 unset multiplot` 32 33 var cm = int(TkScaling()*72/2.54 + 0.5) 34 35 func main() { 36 Pack(Label(Image(NewPhoto(Width(20*cm), Height(15*cm)).Graph(script))), 37 TExit(), 38 Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 39 App.Center().Wait() 40 } tori-canvas Interlocked tori plot on canvas (_examples/tori_canvas.go). This example requires Gnuplot 5.4+ installation. 1 package main 2 3 import . "modernc.org/tk9.0" 4 5 // https://gnuplot.sourceforge.net/demo_5.4/surface2.9.gnu 6 const script = ` 7 set dummy u, v 8 set key bmargin center horizontal Right noreverse enhanced autotitle nobox 9 set parametric 10 set view 50, 30, 1, 1 11 set isosamples 50, 20 12 set hidden3d back offset 1 trianglepattern 3 undefined 1 altdiagonal bentover 13 set style data lines 14 set xyplane relative 0 15 set title "Interlocking Tori" 16 set grid 17 set urange [ -3.14159 : 3.14159 ] noreverse nowriteback 18 set vrange [ -3.14159 : 3.14159 ] noreverse nowriteback 19 set xrange [ * : * ] noreverse writeback 20 set x2range [ * : * ] noreverse writeback 21 set yrange [ * : * ] noreverse writeback 22 set y2range [ * : * ] noreverse writeback 23 set zrange [ * : * ] noreverse writeback 24 set cbrange [ * : * ] noreverse writeback 25 set rrange [ * : * ] noreverse writeback 26 set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault 27 NO_ANIMATION = 1 28 splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with lines,1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with lines` 29 30 var cm = int(TkScaling()*72/2.54 + 0.5) 31 32 func main() { 33 Pack(Canvas(Width(20*cm), Height(15*cm), Background(White)).Graph(script), 34 TExit(), 35 Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 36 App.Center().Wait() 37 } tex Rendering plain TeX (_examples/tex.go). No runtime dependencies required. 1 package main 2 3 import . "modernc.org/tk9.0" 4 5 func main() { 6 tex := `$$\int _0 ^\infty {{\sin ax \sin bx}\over{x^2}}\,dx = {\pi a\over 2}$$` 7 Pack(Label(Relief("sunken"), Image(NewPhoto(Data(TeX(tex, 2*TkScaling()*72/600))))), 8 TExit(), 9 Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 10 App.Center().Wait() 11 } embed Embedding pictures, TeX and other widgets in Text (_examples/ embed.go). 1 package main 2 3 import . "modernc.org/tk9.0" 4 import _ "embed" 5 6 //go:embed gotk.png 7 var icon []byte 8 9 func main() { 10 fontSize := int(10*TkScaling()/NativeScaling + 0.5) 11 font := Font("helvetica", fontSize) 12 var scroll *TScrollbarWidget 13 t := Text(font, Height(15), Yscrollcommand(func(e *Event) { e.ScrollSet(scroll) }), Setgrid(true), Wrap("word"), 14 Padx("4p"), Pady("12p")) 15 scroll = TScrollbar(Command(func(e *Event) { e.Yview(t) })) 16 Grid(t, Sticky("news"), Pady("2m")) 17 Grid(scroll, Row(0), Column(1), Sticky("nes"), Pady("2m")) 18 GridRowConfigure(App, 0, Weight(1)) 19 GridColumnConfigure(App, 0, Weight(1)) 20 Grid(Exit().Configure(font), Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")) 21 t.TagConfigure("c", Justify("center")) 22 t.TagConfigure("e", Offset("-2p")) 23 t.TagConfigure("t", Font("times", fontSize)) 24 sym := " TEX " 25 tex := `$Q(\xi) = \lambda_1 y_1^2 \sum_{i=2}^n \sum_{j=2}^n y_i b_{ij} y_j$` 26 t.InsertML(`Hello Go + Tk`, NewPhoto(Data(icon)), Padx("4p"), `users! 27

Hello Go + Tk +`, sym, tex, ` users! (\$inline math\$) 28

Hello Go + Tk +`, sym, `$`+tex+`$`, ` users! (\$\$display math\$\$)
29

The above exemplifies embeding pictures and`, sym, `scripts. A text widget can also embed other widgets. For example, 30 when a`, Button(font, Txt("")), Padx("4p"), Pady("2p"), Align("center"), `and 31 a`, Entry(font, Textvariable(""), Background(White), Width(8)), Padx("4p"), Pady("2p"), Align("center"), `are part of 32 the markup, they will reflow when their containing text widget is resized.`) 33 App.Center().Wait() 34 } This program additionally demonstrates some techniques for handling non-default scale factors. embed2 The above screen shot is from '$ TK9_SCALE=1.2 go run _examples/ embed.go'. tbutton Styling a button (_examples/tbutton.go). See the discussion at Tutorial: Modifying a ttk button's style 1 package main 2 3 import _ "embed" 4 import . "modernc.org/tk9.0" 5 6 //go:embed red_corner.png 7 var red []byte 8 9 //go:embed green_corner.png 10 var green []byte 11 12 func main() { 13 StyleElementCreate("Red.Corner.TButton.indicator", "image", NewPhoto(Data(red))) 14 StyleElementCreate("Green.Corner.TButton.indicator", "image", NewPhoto(Data(green))) 15 StyleLayout("Red.Corner.TButton", 16 "Button.border", Sticky("nswe"), Border(1), Children( 17 "Button.focus", Sticky("nswe"), Children( 18 "Button.padding", Sticky("nswe"), Children( 19 "Button.label", Sticky("nswe"), 20 "Red.Corner.TButton.indicator", Side("right"), Sticky("ne"))))) 21 StyleLayout("Green.Corner.TButton", 22 "Button.border", Sticky("nswe"), Border(1), Children( 23 "Button.focus", Sticky("nswe"), Children( 24 "Button.padding", Sticky("nswe"), Children( 25 "Button.label", Sticky("nswe"), 26 "Green.Corner.TButton.indicator", Side("right"), Sticky("ne"))))) 27 opts := Opts{Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")} 28 rb := TButton(Txt("Red")) 29 gb := TButton(Txt("Green")) 30 Grid(rb, gb, opts) 31 Grid(TButton(Txt("Use style"), Command(func() { 32 rb.Configure(Style("Red.Corner.TButton")) 33 gb.Configure(Style("Green.Corner.TButton")) 34 })), TExit(), opts) 35 App.Wait() 36 } azure Example usage of the theme register. (_examples/azure.go) 1 package main 2 3 import . "modernc.org/tk9.0" 4 import _ "modernc.org/tk9.0/themes/azure" 5 6 func main() { 7 Pack(TButton(Txt("Light"), Command(func() { ActivateTheme("azure light") })), 8 TButton(Txt("Dark"), Command(func() { ActivateTheme("azure dark") })), 9 TExit(), 10 Pady("2m"), Ipady("1m")) 11 App.Wait() 12 } b5 Technology preview of a Bootstrap 5-like theme buttons (_examples/ b5.go). Only a partial prototype/problem study/work in progress at the moment. But it may get there, eventually. (_examples/b5.go) 1 package main 2 3 import ( 4 . "modernc.org/tk9.0" 5 "modernc.org/tk9.0/b5" 6 ) 7 8 func main() { 9 background := White 10 primary := b5.Colors{b5.ButtonText: "#fff", b5.ButtonFace: "#0d6efd", b5.ButtonFocus: "#98c1fe"} 11 secondary := b5.Colors{b5.ButtonText: "#fff", b5.ButtonFace: "#6c757d", b5.ButtonFocus: "#c0c4c8"} 12 success := b5.Colors{b5.ButtonText: "#fff", b5.ButtonFace: "#198754", b5.ButtonFocus: "#9dccb6"} 13 danger := b5.Colors{b5.ButtonText: "#fff", b5.ButtonFace: "#dc3545", b5.ButtonFocus: "#f0a9b0"} 14 warning := b5.Colors{b5.ButtonText: "#000", b5.ButtonFace: "#ffc107", b5.ButtonFocus: "#ecd182"} 15 info := b5.Colors{b5.ButtonText: "#000", b5.ButtonFace: "#0dcaf0", b5.ButtonFocus: "#85d5e5"} 16 light := b5.Colors{b5.ButtonText: "#000", b5.ButtonFace: "#f8f9fa", b5.ButtonFocus: "#e9e9ea"} 17 dark := b5.Colors{b5.ButtonText: "#fff", b5.ButtonFace: "#212529", b5.ButtonFocus: "#a0a2a4"} 18 link := b5.Colors{b5.ButtonText: "#1774fd", b5.ButtonFace: "#fff", b5.ButtonFocus: "#c2dbfe"} 19 StyleThemeUse("default") 20 opts := Opts{Padx("1m"), Pady("2m"), Ipadx("1m"), Ipady("1m")} 21 Grid(TButton(Txt("Primary"), Style(b5.ButtonStyle("primary.TButton", primary, background, false))), 22 TButton(Txt("Secondary"), Style(b5.ButtonStyle("secondary.TButton", secondary, background, false))), 23 TButton(Txt("Success"), Style(b5.ButtonStyle("success.TButton", success, background, false))), 24 opts) 25 Grid(TButton(Txt("Danger"), Style(b5.ButtonStyle("danger.TButton", danger, background, false))), 26 TButton(Txt("Warning"), Style(b5.ButtonStyle("warning.TButton", warning, background, false))), 27 TButton(Txt("Info"), Style(b5.ButtonStyle("info.TButton", info, background, false))), 28 opts) 29 Grid(TButton(Txt("Light"), Style(b5.ButtonStyle("light.TButton", light, background, false))), 30 TButton(Txt("Dark"), Style(b5.ButtonStyle("dark.TButton", dark, background, false))), 31 TButton(Txt("Link"), Style(b5.ButtonStyle("link.TButton", link, background, false))), 32 opts) 33 Grid(TButton(Txt("Primary"), Style(b5.ButtonStyle("focused.primary.TButton", primary, background, true))), 34 TButton(Txt("Secondary"), Style(b5.ButtonStyle("focused.secondary.TButton", secondary, background, true))), 35 TButton(Txt("Success"), Style(b5.ButtonStyle("focused.success.TButton", success, background, true))), 36 opts) 37 Grid(TButton(Txt("Danger"), Style(b5.ButtonStyle("focused.danger.TButton", danger, background, true))), 38 TButton(Txt("Warning"), Style(b5.ButtonStyle("focused.warning.TButton", warning, background, true))), 39 TButton(Txt("Info"), Style(b5.ButtonStyle("focused.info.TButton", info, background, true))), 40 opts) 41 Grid(TButton(Txt("Light"), Style(b5.ButtonStyle("focused.light.TButton", light, background, true))), 42 TButton(Txt("Dark"), Style(b5.ButtonStyle("focused.dark.TButton", dark, background, true))), 43 TButton(Txt("Link"), Style(b5.ButtonStyle("focused.link.TButton", link, background, true))), 44 opts) 45 Grid(TExit(), Columnspan(3), opts) 46 App.Configure(Background(background)).Wait() 47 } --------------------------------------------------------------------- Gallery (_examples/demo.go) Darwin(macOS) Sequoia 15.0 darwin FreeBSD Xfce4 freebsd Linux Mate 1.26.0 linux Windows 11 windows11 Go Reference LiberaPay receives patrons Expand V Collapse ^ # Documentation P Rendered for [linux/amd64 ] Overview P * Hello world * In action * Frequently Asked Questions * Debugging * Supported targets * Builders * Runtime dependencies * Completeness * Error handling * Themes * VNC server * Package initialization * The options pattern * Widget path names, image and font names * Renamed options * OS thread * Event handlers * Specially handled types * Tcl/Tk code * Hacking * Notes * Additional copyrights * Sponsorship * "alt" theme style guide * "aqua" theme style guide * "clam" theme style guide * "classic" theme style guide * "default" theme style guide * "vista" theme style guide * "winnative" theme style guide * "xpnative" theme style guide Package tk9.0 is a CGo-free, cross platform GUI toolkit for Go. It is similar to Tkinter for Python. Hello world P Also available in _examples/hello.go package main import . "modernc.org/tk9.0" func main() { Pack(Button(Txt("Hello"), Command(func() { Destroy(App) }))) App.Wait() } To execute the above program on any supported target issue something like $ CGO_ENABLED=0 go run hello.go The CGO_ENABLED=0 is optional and here it only demonstrates the program can be built without CGo. In action P * equ A Plain TeX math editor. * visualmd A WYSIWYG markdown editor. Frequently Asked Questions P * Windows: How to build an executable that doesn't open a console window when run? From the documentation for cmd/link: On Windows, -H windowsgui writes a "GUI binary" instead of a "console binary.". To pass the flag to the Go build system use 'go build -ldflags -H=windowsgui somefile.go', for example. Debugging P Consider this program in _examples/debugging.go: // Build this program using -tags=tk.dmesg package main import . "modernc.org/tk9.0" func main() { Pack( TButton(Txt("Hello"), Command(func() { Destroy(App) })), Ipadx(10), Ipady(5), Padx(20), Pady(10), ) App.Wait() } Execute the program using the tags as indicated, then close the window or click the Hello button. With the tk.dmesg tag the package initialization prints the debug messages path. So we can view it, for example, like this: $ go run -tags=tk.dmesg _examples/debugging.go | tee log ... /tmp/debugging-18876-20240928-163046 $ cat /tmp/debugging-18876-20240928-163046 [18876 debugging] enter [dmesgon.go:32:0 proc.go:7278:doInit1 proc.go:7245:doInit] ... [18876 debugging] code=wm iconphoto . img2 -> r= err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=wm title . debugging -> r= err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=. configure -padx 4m -pady 3m -> r= err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=tk::PlaceWindow . center -> r= err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=ttk::button ..tbutton4 -text Hello -command {eventDispatcher 3} -> r=.tbutton4 err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:342:newChild] [18876 debugging] code=pack .tbutton4 -ipadx 10 -ipady 5 -padx 20 -pady 10 -> r= err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=destroy . -> r= err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=tkwait window . -> r= err= [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] $ 18876 was the process PID in this particular run. Using the tags allows to inspect the Tcl/Tk code executed during the lifetime of the process. Supported targets P These combinations of GOOS and GOARCH are currently supported OS Arch ------------- darwin amd64 darwin arm64 freebsd amd64 freebsd arm64 linux 386 linux amd64 linux arm linux arm64 linux loong64 linux ppc64le linux riscv64 linux s390x windows 386 windows amd64 windows arm64 Specific to FreeBSD: When building with cross-compiling or CGO_ENABLED=0, add the following argument to `go` so that these symbols are defined by making fakecgo the Cgo. -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" Builders P Builder results available at modern-c.appspot.com. Runtime dependencies P * Img.Graph and CanvasWidget.Graph require the gnuplot executable available in $PATH. Completeness P At the moment the package is a MVP allowing to build at least some simple, yet useful programs. The full Tk API is not yet usable. Please report needed, but non-exposed Tk features at the issue tracker, thanks. Providing feedback about the missing building blocks, bugs and your user experience is invaluable in helping this package to eventually reach version 1. See also RERO. Error handling P The ErrorMode variable selects the behaviour on errors for certain functions that do not return error. When ErrorMode is PanicOnError, the default, errors will panic, providing a stack trace. When ErrorMode is CollectErrors, errors will be recorded using errors.Join in the Error variable. Even if a function does not return error, it is still possible to handle errors in the usual way when needed, except that Error is now a static variable. That's a problem in the general case, but less so in this package that must be used from a single goroutine only, as documented elsewhere. // Explicit error handling. ErrorMode = CollectErrors if SomeFunnction(someArgument); Error != nil { ... error handling goes here } This is obviously a compromise enabling to have a way to check for errors and, at the same time, the ability to write concise code like: // Deferred error handling. if b = Button(Txt("Foo"), Padx(5), Pady(10)); Error != nil { ... } There are altogether four different places where the call to the Button function can produce errors as additionally to the call itself, every of its three arguments can independently fail as well. Checking each and one of them separately is not always necessary in GUI code. But the explicit option in the first example is still available when needed. Themes P There is a centralized theme register in Themes. Theme providers can opt in to call RegisterTheme at package initialization to make themes discoverable at run-time. Clients can use ActivateTheme to apply a theme by name. Example in _examples/azure.go. VNC server P There is a VNC over wbesockets functionality available for X11 backed hosts. See the tk9.0/vnc package for details. Package initialization P Package initialization is done lazily. This saves noticeable additional startup time and avoids screen flicker in hybrid programs that use the GUI only on demand. Early package initialization can be enforced by Initialize. Initialization will fail if a Unix process starts on a machine with no X server or the process is started in a way that it has no access to the X server. On the other hand, this package may work on Unix machines with no X server if the process is started remotely using '$ ssh -X foo@bar' and the X forwarding is enabled/supported. Darwin port uses the macOS GUI API and does not use X11. The options pattern P Zero or more options can be specified when creating a widget. For example b := Button(Txt("Hello"), OverRelief("flat")) or lbl := myFrame.Label(State("disabled"), Width(200)) Widget path names, image and font names P Tcl/Tk uses widget pathnames, image and font names explicitly set by user code. This package generates those names automatically and they are not directly needed in code that uses this package. Renamed options P There is, for a example, a Tcl/tk 'text' widget and a '-text' option. This package exports the widget as type 'TextWidget', its constructor as function 'Text' and the option as function 'Txt'. The complete list is: * Button option is renamed to [Btn] * Label option is renamed to Lbl * Menu option is renamed to Mnu * Message option is renamed to Msg * Text option is renamed to Txt OS thread P This package should be used from the same goroutine that initialized the package. Package initialization performs a runtime.LockOSThread, meaning func main() will start execuing locked on the same OS thread. Event handlers P The Command() and similar options expect an argument that must be one of: - An EventHandler or a function literal of the same signature. - A func(). This can be used when the handler does not need the associated Event instance. Specially handled types P * time.Duration When passing an argument of type time.Durarion to a function accepting 'any', the duration is converted to an integer number of milliseconds. * []byte When passing an argument of type []byte to a function accepting 'any', the byte slice is converted to a encoding/base64 encoded string. * []FileType When passing an argument of type []FileType to a function accepting 'any', the slice is converted to the representation the Tcl/Tk -filetypes option expects. Tcl/Tk code P At least some minimal knowledge of reading Tcl/Tk code is probably required for using this package and/or using the related documentation. However you will not need to write any Tcl code and you do not need to care about the grammar of Tcl words/string literals and how it differs from Go. There are several Tcl/Tk tutorials available, for example at tutorialspoint. Hacking P Merge requests for known issues are always welcome. Please send merge requests for new features/APIs after filling and discussing the additions/changes at the issue tracker first. Notes P Most of the documentation is generated directly from the Tcl/Tk documentation and may not be entirely correct for the Go package. Those parts hopefully still serve as a quick/offline Tcl/Tk reference. Additional copyrights P Parts of the documentation are copied and/or modified from the tcl.tk site, see the LICENSE-TCLTK file for details. Parts of the documentation are copied and/or modified from the tkinter.ttk site which is ---------------------------------------------------------------------------- (c) Copyright 2001-2024, Python Software Foundation, licensed under the Python Software Foundation License Version 2. ---------------------------------------------------------------------------- Sponsorship P You can support the maintenance and further development of this package at jnml's LiberaPay (using PayPal). "alt" theme style guide P "Checkbutton.indicator" style element options: * Background * Bordercolor * Foreground * Indicatorcolor * Indicatormargin * Lightcolor * [Shadecolor] "Combobox.downarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "Menubutton.indicator" style element options: * Arrowcolor * Arrowsize * Direction "Radiobutton.indicator" style element options: * Background * Bordercolor * Foreground * Indicatorcolor * Indicatormargin * Lightcolor * [Shadecolor] "Spinbox.downarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "Spinbox.uparrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "Treeitem.indicator" style element options: * Foreground * Indicatormargins * Size "arrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "border" style element options: * Background * Bordercolor * Borderwidth * Default * Relief "downarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "field" style element options: * Bordercolor * Fieldbackground * Focuscolor * [Focuswidth] "leftarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "rightarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "slider" style element options: * Background * Bordercolor * Borderwidth * Orient * Sliderrelief * [Sliderthickness] "thumb" style element options: * Background * Bordercolor * Orient * Relief * Width "uparrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Relief "alt" theme style list . Style map: -foreground {disabled #a3a3a3} -background {disabled # d9d9d9 active #ececec} -embossed {disabled 1} ComboboxPopdownFrame Layout: ComboboxPopdownFrame.border -sticky nswe Heading Layout: Treeheading.cell -sticky nswe Treeheading.border -sticky nswe -children {Treeheading.padding -sticky nswe -children {Treeheading.image -side right -sticky {} Treeheading.text -sticky we}} Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} Separator Layout: Treeitem.separator -sticky nswe TButton Layout: Button.border -sticky nswe -border 1 -children {Button.focus -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}}} Style map: -highlightcolor {alternate black} -relief { {pressed ! disabled} sunken {active !disabled} raised } TCheckbutton Layout: Checkbutton.padding -sticky nswe -children {Checkbutton.indicator -side left -sticky {} Checkbutton.focus -side left -sticky w -children {Checkbutton.label -sticky nswe}} Style map: -indicatorcolor {pressed #d9d9d9 alternate #aaaaaa disabled #d9d9d9} TCombobox Layout: Combobox.field -sticky nswe -children {Combobox.downarrow -side right -sticky ns Combobox.padding -sticky nswe -children {Combobox.textarea -sticky nswe}} Style map: -fieldbackground {readonly #d9d9d9 disabled #d9d9d9} -arrowcolor {disabled #a3a3a3} TEntry Layout: Entry.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}} Style map: -fieldbackground {readonly #d9d9d9 disabled #d9d9d9} TLabelframe Layout: Labelframe.border -sticky nswe TMenubutton Layout: Menubutton.border -sticky nswe -children {Menubutton.focus -sticky nswe -children {Menubutton.indicator -side right -sticky {} Menubutton.padding -sticky we -children {Menubutton.label -side left -sticky {}}}} TNotebook Layout: Notebook.client -sticky nswe TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Style map: -expand {selected {1.5p 1.5p 0.75p 0}} -background {selected #d9d9d9} TProgressbar - TRadiobutton Layout: Radiobutton.padding -sticky nswe -children {Radiobutton.indicator -side left -sticky {} Radiobutton.focus -side left -sticky {} -children {Radiobutton.label -sticky nswe}} Style map: -indicatorcolor {pressed #d9d9d9 alternate #aaaaaa disabled #d9d9d9} TScale - TScrollbar - TSpinbox Layout: Spinbox.field -side top -sticky we -children {null -side right -sticky {} -children {Spinbox.uparrow -side top -sticky e Spinbox.downarrow -side bottom -sticky e} Spinbox.padding -sticky nswe -children {Spinbox.textarea -sticky nswe}} Style map: -fieldbackground {readonly #d9d9d9 disabled #d9d9d9} -arrowcolor {disabled #a3a3a3} Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Toolbutton Layout: Toolbutton.border -sticky nswe -children {Toolbutton.focus -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Style map: -relief {disabled flat selected sunken pressed sunken active raised} -background {pressed #c3c3c3 active #ececec} Treeview Layout: Treeview.field -sticky nswe -border 1 -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}} Style map: -foreground {disabled #a3a3a3 selected #ffffff} -background {disabled #d9d9d9 selected #4a6984} Treeview.Separator Layout: Treeitem.separator -sticky nswe "aqua" theme style guide P "Button.button" style element options: "Checkbutton.button" style element options: "Combobox.button" style element options: "DisclosureButton.button" style element options: "Entry.field" style element options: * Background * Fieldbackground "GradientButton.button" style element options: "HelpButton.button" style element options: "Horizontal.Scrollbar.leftarrow" style element options: * Orient "Horizontal.Scrollbar.rightarrow" style element options: * Orient "Horizontal.Scrollbar.thumb" style element options: * Orient "Horizontal.Scrollbar.trough" style element options: * Orient "InlineButton.button" style element options: "Labelframe.border" style element options: "Menubutton.button" style element options: "Notebook.client" style element options: "Notebook.tab" style element options: "Progressbar.track" style element options: * Maximum * Mode * Orient * Phase * Value "Radiobutton.button" style element options: "RecessedButton.button" style element options: "RoundedRectButton.button" style element options: "Scale.slider" style element options: "Scale.trough" style element options: * From * Orient * To * Value "Searchbox.field" style element options: * Background * Fieldbackground "SidebarButton.button" style element options: "Spinbox.downarrow" style element options: "Spinbox.field" style element options: * Background * Fieldbackground "Spinbox.uparrow" style element options: "Toolbar.background" style element options: "Toolbutton.border" style element options: "Treeheading.cell" style element options: "Treeitem.indicator" style element options: "Treeview.treearea" style element options: "Vertical.Scrollbar.downarrow" style element options: * Orient "Vertical.Scrollbar.thumb" style element options: * Orient "Vertical.Scrollbar.trough" style element options: * Orient "Vertical.Scrollbar.uparrow" style element options: * Orient "background" style element options: "field" style element options: * Fieldbackground "fill" style element options: "hseparator" style element options: "separator" style element options: "sizegrip" style element options: "vseparator" style element options: "aqua" theme style list . Style map: -selectforeground { background systemSelectedTextColor ! focus systemSelectedTextColor} -foreground { disabled systemDisabledControlTextColor background systemLabelColor} -selectbackground { background systemSelectedTextBackgroundColor ! focus systemSelectedTextBackgroundColor} DisclosureButton Layout: DisclosureButton.button -sticky nswe GradientButton Layout: GradientButton.button -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}} Heading Layout: Treeheading.cell -sticky nswe Treeheading.image -side right -sticky {} Treeheading.text -side top -sticky {} HelpButton Layout: HelpButton.button -sticky nswe Horizontal.TScrollbar Layout: Horizontal.Scrollbar.trough -sticky we -children {Horizontal.Scrollbar.thumb -sticky nswe Horizontal.Scrollbar.rightarrow -side right -sticky {} Horizontal.Scrollbar.leftarrow -side right -sticky {}} ImageButton Layout: Button.padding -sticky nswe -children {Button.label -sticky nswe} Style map: -foreground { pressed systemLabelColor !pressed systemSecondaryLabelColor } InlineButton Layout: InlineButton.button -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}} Style map: -foreground { disabled systemWindowBackgroundColor } Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -side left -sticky {}} Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} RecessedButton Layout: RecessedButton.button -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}} Style map: -font { selected RecessedFont active RecessedFont pressed RecessedFont } -foreground { {disabled selected} systemWindowBackgroundColor3 {disabled !selected} systemDisabledControlTextColor selected systemTextBackgroundColor active white pressed white } RoundedRectButton Layout: RoundedRectButton.button -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}} Searchbox Layout: Searchbox.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}} SidebarButton Layout: SidebarButton.button -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}} Style map: -foreground { {disabled selected} systemWindowBackgroundColor3 {disabled !selected} systemDisabledControlTextColor selected systemTextColor active systemTextColor pressed systemTextColor } TButton Layout: Button.button -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}} Style map: -foreground { pressed white {alternate !pressed ! background} white disabled systemDisabledControlTextColor} TCheckbutton Layout: Checkbutton.button -sticky nswe -children {Checkbutton.padding -sticky nswe -children {Checkbutton.label -side left -sticky {}}} TCombobox Layout: Combobox.button -sticky nswe -children {Combobox.padding -sticky nswe -children {Combobox.textarea -sticky nswe}} Style map: -foreground { disabled systemDisabledControlTextColor } -selectbackground { !focus systemUnemphasizedSelectedTextBackgroundColor } TEntry Layout: Entry.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}} Style map: -foreground { disabled systemDisabledControlTextColor } -selectbackground { !focus systemUnemphasizedSelectedTextBackgroundColor } TLabelframe Layout: Labelframe.border -sticky nswe TLabelframe.Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} TMenubutton Layout: Menubutton.button -sticky nswe -children {Menubutton.padding -sticky nswe -children {Menubutton.label -side left -sticky {}}} TNotebook Layout: Notebook.client -sticky nswe TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -sticky nswe -children {Notebook.label -sticky nswe}} Style map: -foreground { {background !selected} systemControlTextColor {background selected} black {!background selected} systemSelectedTabTextColor disabled systemDisabledControlTextColor} TProgressbar Layout: Progressbar.track -sticky nswe TRadiobutton Layout: Radiobutton.button -sticky nswe -children {Radiobutton.padding -sticky nswe -children {Radiobutton.label -side left -sticky {}}} TScrollbar - TSpinbox Layout: Spinbox.buttons -side right -sticky {} -children {Spinbox.uparrow -side top -sticky e Spinbox.downarrow -side bottom -sticky e} Spinbox.field -sticky we -children {Spinbox.textarea -sticky we} Style map: -foreground { disabled systemDisabledControlTextColor } -selectbackground { !focus systemUnemphasizedSelectedTextBackgroundColor } Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -sticky nswe -children {Notebook.label -sticky nswe}} Toolbar Layout: Toolbar.background -sticky nswe Toolbutton Layout: Toolbutton.border -sticky nswe -children {Toolbutton.focus -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Treeview Layout: Treeview.field -sticky nswe -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}} Style map: -background { selected systemSelectedTextBackgroundColor } Vertical.TScrollbar Layout: Vertical.Scrollbar.trough -sticky ns -children {Vertical.Scrollbar.thumb -sticky nswe Vertical.Scrollbar.downarrow -side bottom -sticky {} Vertical.Scrollbar.uparrow -side bottom -sticky {}} "clam" theme style guide P "Checkbutton.indicator" style element options: * Indicatorbackground * [Indicatorforeground] * Indicatormargin * [Lowerbordercolor] * [Upperbordercolor] "Combobox.field" style element options: * Bordercolor * Fieldbackground * Lightcolor "Radiobutton.indicator" style element options: * Indicatorbackground * [Indicatorforeground] * Indicatormargin * [Lowerbordercolor] * [Upperbordercolor] "Spinbox.downarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "Spinbox.uparrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "arrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "bar" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "border" style element options: * Bordercolor * Borderwidth * Darkcolor * Lightcolor * Relief "client" style element options: * Background * Bordercolor * Darkcolor * Lightcolor "downarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "field" style element options: * Bordercolor * Fieldbackground * Lightcolor "hgrip" style element options: * Bordercolor * Gripsize * Lightcolor "leftarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "pbar" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "rightarrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "slider" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "tab" style element options: * Background * Bordercolor * Darkcolor * Lightcolor "thumb" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "trough" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "uparrow" style element options: * Arrowcolor * Arrowsize * Background * Bordercolor * Darkcolor * Gripsize * Lightcolor * Orient * Sliderlength * Troughcolor "vgrip" style element options: * Bordercolor * Gripsize * Lightcolor "clam" theme style list . Style map: -selectforeground {!focus white} -foreground {disabled # 999999} -selectbackground {!focus #9e9a91} -background {disabled # dcdad5 active #eeebe7} ComboboxPopdownFrame Layout: ComboboxPopdownFrame.border -sticky nswe Heading Layout: Treeheading.cell -sticky nswe Treeheading.border -sticky nswe -children {Treeheading.padding -sticky nswe -children {Treeheading.image -side right -sticky {} Treeheading.text -sticky we}} Horizontal.Sash Layout: Sash.hsash -sticky nswe -children {Sash.hgrip -sticky nswe} Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} Sash - Separator Layout: Treeitem.separator -sticky nswe TButton Layout: Button.border -sticky nswe -border 1 -children {Button.focus -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}}} Style map: -lightcolor {pressed #bab5ab} -background {disabled # dcdad5 pressed #bab5ab active #eeebe7} -bordercolor {alternate # 000000} -darkcolor {pressed #bab5ab} TCheckbutton Layout: Checkbutton.padding -sticky nswe -children {Checkbutton.indicator -side left -sticky {} Checkbutton.focus -side left -sticky w -children {Checkbutton.label -sticky nswe}} Style map: -indicatorbackground {pressed #dcdad5 {!disabled alternate} #5895bc {disabled alternate} #a0a0a0 disabled #dcdad5} TCombobox Layout: Combobox.downarrow -side right -sticky ns Combobox.field -sticky nswe -children {Combobox.padding -sticky nswe -children {Combobox.textarea -sticky nswe}} Style map: -foreground {{readonly focus} #ffffff} -fieldbackground {{readonly focus} #4a6984 readonly #dcdad5} -background {active # eeebe7 pressed #eeebe7} -bordercolor {focus #4a6984} -arrowcolor {disabled #999999} TEntry Layout: Entry.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}} Style map: -lightcolor {focus #6f9dc6} -background {readonly #dcdad5} -bordercolor {focus #4a6984} TLabelframe Layout: Labelframe.border -sticky nswe TMenubutton Layout: Menubutton.border -sticky nswe -children {Menubutton.focus -sticky nswe -children {Menubutton.indicator -side right -sticky {} Menubutton.padding -sticky we -children {Menubutton.label -side left -sticky {}}}} TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Style map: -lightcolor {selected #eeebe7 {} #cfcdc8} -padding {selected {4.5p 3p 4.5p 1.5p}} -background {selected #dcdad5 {} # bab5ab} TProgressbar - TRadiobutton Layout: Radiobutton.padding -sticky nswe -children {Radiobutton.indicator -side left -sticky {} Radiobutton.focus -side left -sticky {} -children {Radiobutton.label -sticky nswe}} Style map: -indicatorbackground {pressed #dcdad5 {!disabled alternate} #5895bc {disabled alternate} #a0a0a0 disabled #dcdad5} TScale - TScrollbar - TSpinbox Layout: Spinbox.field -side top -sticky we -children {null -side right -sticky {} -children {Spinbox.uparrow -side top -sticky e Spinbox.downarrow -side bottom -sticky e} Spinbox.padding -sticky nswe -children {Spinbox.textarea -sticky nswe}} Style map: -background {readonly #dcdad5} -bordercolor {focus # 4a6984} -arrowcolor {disabled #999999} Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Toolbutton Layout: Toolbutton.border -sticky nswe -children {Toolbutton.focus -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Style map: -lightcolor {pressed #bab5ab} -relief {disabled flat selected sunken pressed sunken active raised} -background {disabled # dcdad5 pressed #bab5ab active #eeebe7} -darkcolor {pressed #bab5ab} Treeview Layout: Treeview.field -sticky nswe -border 1 -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}} Style map: -foreground {disabled #999999 selected #ffffff} -background {disabled #dcdad5 selected #4a6984} -bordercolor {focus # 4a6984} Treeview.Separator Layout: Treeitem.separator -sticky nswe Vertical.Sash Layout: Sash.vsash -sticky nswe -children {Sash.vgrip -sticky nswe} "classic" theme style guide P "Button.border" style element options: * Background * Borderwidth * Default * Relief "Checkbutton.indicator" style element options: * Background * Borderwidth * Indicatorcolor * Indicatormargin * Indicatorrelief * Indicatorsize "Combobox.downarrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "Menubutton.indicator" style element options: * Background * [Indicatorborderwidth] * [Indicatorheight] * Indicatormargin * Indicatorrelief * [Indicatorwidth] "Radiobutton.indicator" style element options: * Background * Borderwidth * Indicatorcolor * Indicatormargin * Indicatorrelief * Indicatorsize "Spinbox.downarrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "Spinbox.uparrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "arrow" style element options: * Arrowsize * Background * Borderwidth * Relief "downarrow" style element options: * Arrowsize * Background * Borderwidth * Relief "highlight" style element options: * Default * Highlightcolor * Highlightthickness "hsash" style element options: * Background * Handlepad * Handlesize * Sashpad * Sashrelief * Sashthickness "leftarrow" style element options: * Arrowsize * Background * Borderwidth * Relief "rightarrow" style element options: * Arrowsize * Background * Borderwidth * Relief "slider" style element options: * Background * Orient * [Sliderborderwidth] * Sliderlength * Sliderrelief * [Sliderthickness] "uparrow" style element options: * Arrowsize * Background * Borderwidth * Relief "vsash" style element options: * Background * Handlepad * Handlesize * Sashpad * Sashrelief * Sashthickness "classic" theme style list . Style map: -highlightcolor {focus black} -foreground {disabled # a3a3a3} -background {disabled #d9d9d9 active #ececec} ComboboxPopdownFrame Layout: ComboboxPopdownFrame.border -sticky nswe Heading Layout: Treeheading.cell -sticky nswe Treeheading.border -sticky nswe -children {Treeheading.padding -sticky nswe -children {Treeheading.image -side right -sticky {} Treeheading.text -sticky we}} Horizontal.TScale Layout: Horizontal.Scale.highlight -sticky nswe -children {Horizontal.Scale.trough -sticky nswe -children {Horizontal.Scale.slider -side left -sticky {}}} Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} Sash - Separator Layout: Treeitem.separator -sticky nswe TButton Layout: Button.highlight -sticky nswe -children {Button.border -sticky nswe -border 1 -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}}} Style map: -relief {{!disabled pressed} sunken} TCheckbutton Layout: Checkbutton.highlight -sticky nswe -children {Checkbutton.border -sticky nswe -children {Checkbutton.padding -sticky nswe -children {Checkbutton.indicator -side left -sticky {} Checkbutton.label -side left -sticky nswe}}} Style map: -indicatorrelief {alternate raised selected sunken pressed sunken} -indicatorcolor {pressed #d9d9d9 alternate #b05e5e selected # b03060} TCombobox Layout: Combobox.highlight -sticky nswe -children {Combobox.field -sticky nswe -children {Combobox.downarrow -side right -sticky ns Combobox.padding -sticky nswe -children {Combobox.textarea -sticky nswe}}} Style map: -fieldbackground {readonly #d9d9d9 disabled #d9d9d9} TEntry Layout: Entry.highlight -sticky nswe -children {Entry.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}}} Style map: -fieldbackground {readonly #d9d9d9 disabled #d9d9d9} TLabelframe Layout: Labelframe.border -sticky nswe TMenubutton Layout: Menubutton.highlight -sticky nswe -children {Menubutton.border -sticky nswe -children {Menubutton.indicator -side right -sticky {} Menubutton.padding -sticky we -children {Menubutton.label -sticky {}}}} TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Style map: -background {selected #d9d9d9} TProgressbar - TRadiobutton Layout: Radiobutton.highlight -sticky nswe -children {Radiobutton.border -sticky nswe -children {Radiobutton.padding -sticky nswe -children {Radiobutton.indicator -side left -sticky {} Radiobutton.label -side left -sticky nswe}}} Style map: -indicatorrelief {alternate raised selected sunken pressed sunken} -indicatorcolor {pressed #d9d9d9 alternate #b05e5e selected # b03060} TScale Style map: -sliderrelief {{pressed !disabled} sunken} TScrollbar Style map: -relief {{pressed !disabled} sunken} TSpinbox Layout: Spinbox.highlight -sticky nswe -children {Spinbox.field -sticky nswe -children {null -side right -sticky {} -children {Spinbox.uparrow -side top -sticky e Spinbox.downarrow -side bottom -sticky e} Spinbox.padding -sticky nswe -children {Spinbox.textarea -sticky nswe}}} Style map: -fieldbackground {readonly #d9d9d9 disabled #d9d9d9} Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Toolbutton Layout: Toolbutton.focus -sticky nswe -children {Toolbutton.border -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Style map: -relief {disabled flat selected sunken pressed sunken active raised} -background {pressed #b3b3b3 active #ececec} Treeview Layout: Treeview.highlight -sticky nswe -children {Treeview.field -sticky nswe -border 1 -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}}} Style map: -foreground {disabled #a3a3a3 selected #000000} -background {disabled #d9d9d9 selected #c3c3c3} Treeview.Separator Layout: Treeitem.separator -sticky nswe Vertical.TScale Layout: Vertical.Scale.highlight -sticky nswe -children {Vertical.Scale.trough -sticky nswe -children {Vertical.Scale.slider -side top -sticky {}}} "default" theme style guide P "" style element options: "Checkbutton.indicator" style element options: * Bordercolor * Indicatorbackground * [Indicatorforeground] * Indicatormargin "Combobox.downarrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "Menubutton.indicator" style element options: * Arrowcolor * [Arrowpadding] * Arrowsize "Radiobutton.indicator" style element options: * Bordercolor * Indicatorbackground * [Indicatorforeground] * Indicatormargin "Spinbox.downarrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "Spinbox.uparrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "Treeheading.cell" style element options: * Background * [Rownumber] "Treeitem.indicator" style element options: * Foreground * Indicatormargins * Indicatorsize "Treeitem.row" style element options: * Background * [Rownumber] "Treeitem.separator" style element options: * Background * [Rownumber] "arrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "background" style element options: * Background "border" style element options: * Background * Borderwidth * Relief "client" style element options: * Background * Borderwidth * [Highlight] * Highlightcolor "ctext" style element options: * Anchor * [Embossed] * Font * Foreground * Justify * Text * Underline * Width * Wraplength "downarrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "field" style element options: * Borderwidth * Fieldbackground * Focuscolor * [Focuswidth] "fill" style element options: * Background "focus" style element options: * Focuscolor * Focussolid * Focusthickness "hsash" style element options: * Sashthickness "hseparator" style element options: * Background * Orient "image" style element options: * Background * Image * [Stipple] "indicator" style element options: "label" style element options: * Anchor * Background * Compound * [Embossed] * Font * Foreground * Image * Justify * [Space] * [Stipple] * Text * Underline * Width * Wraplength "leftarrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "padding" style element options: * Padding * Relief * Shiftrelief "pbar" style element options: * Background * [Barsize] * Borderwidth * Orient * [Pbarrelief] * [Thickness] "rightarrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "separator" style element options: * Background * Orient "sizegrip" style element options: * Background * Gripsize "slider" style element options: * Bordercolor * [Innercolor] * Orient * [Outercolor] "tab" style element options: * Background * Borderwidth * [Highlight] * Highlightcolor "text" style element options: * Anchor * [Embossed] * Font * Foreground * Justify * Text * Underline * Width * Wraplength "textarea" style element options: * Font * Width "thumb" style element options: * Background * Borderwidth * Orient * Relief * Width "treearea" style element options: "trough" style element options: * Groovewidth * Orient * [Troughborderwidth] * Troughcolor * Troughrelief "uparrow" style element options: * Arrowcolor * Arrowsize * Background * Borderwidth * Relief "vsash" style element options: * Sashthickness "vseparator" style element options: * Background * Orient "default" theme style list . Style map: -foreground {disabled #a3a3a3} -background {disabled # edeceb active #ececec} Cell Layout: Treedata.padding -sticky nswe -children {Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} ComboboxPopdownFrame Layout: ComboboxPopdownFrame.border -sticky nswe Heading Layout: Treeheading.cell -sticky nswe Treeheading.border -sticky nswe -children {Treeheading.padding -sticky nswe -children {Treeheading.image -side right -sticky {} Treeheading.text -sticky we}} Horizontal.Sash Layout: Sash.hsash -sticky we Horizontal.TProgressbar Layout: Horizontal.Progressbar.trough -sticky nswe -children {Horizontal.Progressbar.pbar -side left -sticky ns Horizontal.Progressbar.ctext -side left -sticky {}} Horizontal.TScale Layout: Horizontal.Scale.focus -sticky nswe -children {Horizontal.Scale.padding -sticky nswe -children {Horizontal.Scale.trough -sticky nswe -children {Horizontal.Scale.slider -side left -sticky {}}}} Horizontal.TScrollbar Layout: Horizontal.Scrollbar.trough -sticky we -children {Horizontal.Scrollbar.leftarrow -side left -sticky {} Horizontal.Scrollbar.rightarrow -side right -sticky {} Horizontal.Scrollbar.thumb -sticky nswe} Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} Row Layout: Treeitem.row -sticky nswe Sash - Separator Layout: Treeitem.separator -sticky nswe TButton Layout: Button.border -sticky nswe -border 1 -children {Button.focus -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}}} Style map: -relief {{!disabled pressed} sunken} TCheckbutton Layout: Checkbutton.padding -sticky nswe -children {Checkbutton.indicator -side left -sticky {} Checkbutton.focus -side left -sticky w -children {Checkbutton.label -sticky nswe}} Style map: -indicatorbackground {{alternate disabled} #a3a3a3 {alternate pressed} #5895bc alternate #4a6984 {selected disabled} # a3a3a3 {selected pressed} #5895bc selected #4a6984 disabled #edeceb pressed #c3c3c3} TCombobox Layout: Combobox.field -sticky nswe -children {Combobox.downarrow -side right -sticky ns Combobox.padding -sticky nswe -children {Combobox.textarea -sticky nswe}} Style map: -fieldbackground {readonly #edeceb disabled #edeceb} -arrowcolor {disabled #a3a3a3} TEntry Layout: Entry.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}} Style map: -fieldbackground {readonly #edeceb disabled #edeceb} TFrame Layout: Frame.border -sticky nswe TLabel Layout: Label.border -sticky nswe -border 1 -children {Label.padding -sticky nswe -border 1 -children {Label.label -sticky nswe}} TLabelframe Layout: Labelframe.border -sticky nswe TMenubutton Layout: Menubutton.border -sticky nswe -children {Menubutton.focus -sticky nswe -children {Menubutton.indicator -side right -sticky {} Menubutton.padding -sticky we -children {Menubutton.label -side left -sticky {}}}} Style map: -arrowcolor {disabled #a3a3a3} TNotebook Layout: Notebook.client -sticky nswe TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Style map: -highlightcolor {selected #4a6984} -highlight {selected 1} -background {selected #edeceb} TPanedwindow Layout: Panedwindow.background -sticky {} TProgressbar - TRadiobutton Layout: Radiobutton.padding -sticky nswe -children {Radiobutton.indicator -side left -sticky {} Radiobutton.focus -side left -sticky {} -children {Radiobutton.label -sticky nswe}} Style map: -indicatorbackground {{alternate disabled} #a3a3a3 {alternate pressed} #5895bc alternate #4a6984 {selected disabled} # a3a3a3 {selected pressed} #5895bc selected #4a6984 disabled #edeceb pressed #c3c3c3} TScale Style map: -outercolor {active #ececec} TScrollbar Style map: -arrowcolor {disabled #a3a3a3} TSeparator Layout: Separator.separator -sticky nswe TSizegrip Layout: Sizegrip.sizegrip -side bottom -sticky se TSpinbox Layout: Spinbox.field -side top -sticky we -children {null -side right -sticky {} -children {Spinbox.uparrow -side top -sticky e Spinbox.downarrow -side bottom -sticky e} Spinbox.padding -sticky nswe -children {Spinbox.textarea -sticky nswe}} Style map: -fieldbackground {readonly #edeceb disabled #edeceb} -arrowcolor {disabled #a3a3a3} Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Toolbutton Layout: Toolbutton.border -sticky nswe -children {Toolbutton.focus -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Style map: -relief {disabled flat selected sunken pressed sunken active raised} -background {pressed #c3c3c3 active #ececec} Treeview Layout: Treeview.field -sticky nswe -border 1 -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}} Style map: -foreground {disabled #a3a3a3 selected #ffffff} -background {disabled #edeceb selected #4a6984} Treeview.Separator Layout: Treeitem.separator -sticky nswe Vertical.Sash Layout: Sash.vsash -sticky ns Vertical.TProgressbar Layout: Vertical.Progressbar.trough -sticky nswe -children {Vertical.Progressbar.pbar -side bottom -sticky we} Vertical.TScale Layout: Vertical.Scale.focus -sticky nswe -children {Vertical.Scale.padding -sticky nswe -children {Vertical.Scale.trough -sticky nswe -children {Vertical.Scale.slider -side top -sticky {}}}} Vertical.TScrollbar Layout: Vertical.Scrollbar.trough -sticky ns -children {Vertical.Scrollbar.uparrow -side top -sticky {} Vertical.Scrollbar.downarrow -side bottom -sticky {} Vertical.Scrollbar.thumb -sticky nswe}PASS "vista" theme style guide P "Combobox.background" style element options: "Combobox.border" style element options: "Combobox.rightdownarrow" style element options: "ComboboxPopdownFrame.background" style element options: "Entry.background" style element options: "Entry.field" style element options: "Horizontal.Progressbar.pbar" style element options: "Horizontal.Scale.slider" style element options: "Horizontal.Scrollbar.grip" style element options: "Horizontal.Scrollbar.leftarrow" style element options: "Horizontal.Scrollbar.rightarrow" style element options: "Horizontal.Scrollbar.thumb" style element options: "Horizontal.Scrollbar.trough" style element options: "Menubutton.dropdown" style element options: "Spinbox.background" style element options: "Spinbox.downarrow" style element options: "Spinbox.field" style element options: "Spinbox.innerbg" style element options: "Spinbox.uparrow" style element options: "Vertical.Progressbar.pbar" style element options: "Vertical.Scale.slider" style element options: "Vertical.Scrollbar.downarrow" style element options: "Vertical.Scrollbar.grip" style element options: "Vertical.Scrollbar.thumb" style element options: "Vertical.Scrollbar.trough" style element options: "Vertical.Scrollbar.uparrow" style element options: "vista" theme style list . Style map: -foreground {disabled SystemGrayText} ComboboxPopdownFrame Layout: ComboboxPopdownFrame.background -sticky nswe -border 1 -children {ComboboxPopdownFrame.padding -sticky nswe} Heading Layout: Treeheading.cell -sticky nswe Treeheading.border -sticky nswe -children {Treeheading.padding -sticky nswe -children {Treeheading.image -side right -sticky {} Treeheading.text -sticky we}} Horizontal.TProgressbar Layout: Horizontal.Progressbar.trough -sticky nswe -children {Horizontal.Progressbar.pbar -side left -sticky ns Horizontal.Progressbar.ctext -sticky nswe} Horizontal.TScale Layout: Scale.focus -sticky nswe -children {Horizontal.Scale.trough -sticky nswe -children {Horizontal.Scale.track -sticky we Horizontal.Scale.slider -side left -sticky {}}} Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} Separator Layout: Treeitem.separator -sticky nswe TButton Layout: Button.button -sticky nswe -children {Button.focus -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}}} TCheckbutton Layout: Checkbutton.padding -sticky nswe -children {Checkbutton.indicator -side left -sticky {} Checkbutton.focus -side left -sticky w -children {Checkbutton.label -sticky nswe}} TCombobox Layout: Combobox.border -sticky nswe -children {Combobox.rightdownarrow -side right -sticky ns Combobox.padding -sticky nswe -children {Combobox.background -sticky nswe -children {Combobox.focus -sticky nswe -children {Combobox.textarea -sticky nswe}}}} Style map: -focusfill {{readonly focus} SystemHighlight} -foreground {disabled SystemGrayText {readonly focus} SystemHighlightText} -selectforeground {!focus SystemWindowText} -selectbackground {!focus SystemWindow} TEntry Layout: Entry.field -sticky nswe -children {Entry.background -sticky nswe -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}}} Style map: -selectforeground {!focus SystemWindowText} -selectbackground {!focus SystemWindow} TLabelframe.Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} TMenubutton Layout: Menubutton.dropdown -side right -sticky ns Menubutton.button -sticky nswe -children {Menubutton.padding -sticky we -children {Menubutton.label -sticky {}}} TNotebook Layout: Notebook.client -sticky nswe TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Style map: -expand {selected {2 2 2 2}} TProgressbar - TRadiobutton Layout: Radiobutton.padding -sticky nswe -children {Radiobutton.indicator -side left -sticky {} Radiobutton.focus -side left -sticky {} -children {Radiobutton.label -sticky nswe}} TScale - TSpinbox Layout: Spinbox.field -sticky nswe -children {Spinbox.background -sticky nswe -children {Spinbox.padding -sticky nswe -children {Spinbox.innerbg -sticky nswe -children {Spinbox.textarea -sticky nswe}} Spinbox.uparrow -side top -sticky nse Spinbox.downarrow -side bottom -sticky nse}} Style map: -selectforeground {!focus SystemWindowText} -selectbackground {!focus SystemWindow} Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Toolbutton Layout: Toolbutton.border -sticky nswe -children {Toolbutton.focus -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Treeview Layout: Treeview.field -sticky nswe -border 1 -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}} Style map: -foreground {disabled SystemGrayText selected SystemHighlightText} -background {disabled SystemButtonFace selected SystemHighlight} Treeview.Separator Layout: Treeitem.separator -sticky nswe Vertical.TProgressbar Layout: Vertical.Progressbar.trough -sticky nswe -children {Vertical.Progressbar.pbar -side bottom -sticky we} Vertical.TScale Layout: Scale.focus -sticky nswe -children {Vertical.Scale.trough -sticky nswe -children {Vertical.Scale.track -sticky ns Vertical.Scale.slider -side top -sticky {}}} "winnative" theme style guide P "Button.border" style element options: * Default * Highlightcolor * Relief "Checkbutton.indicator" style element options: "Combobox.focus" style element options: * Focusfill "ComboboxPopdownFrame.border" style element options: * Background * Borderwidth * Relief "Radiobutton.indicator" style element options: "Scrollbar.trough" style element options: "Spinbox.downarrow" style element options: "Spinbox.uparrow" style element options: "border" style element options: * Relief "client" style element options: "downarrow" style element options: "field" style element options: * Fieldbackground "focus" style element options: "leftarrow" style element options: "rightarrow" style element options: "sizegrip" style element options: "slider" style element options: * Orient "tab" style element options: * Background * Borderwidth "thumb" style element options: * Orient "uparrow" style element options: "winnative" theme style list . Style map: -foreground {disabled SystemGrayText} -embossed {disabled 1} ComboboxPopdownFrame Layout: ComboboxPopdownFrame.border -sticky nswe Heading Layout: Treeheading.cell -sticky nswe Treeheading.border -sticky nswe -children {Treeheading.padding -sticky nswe -children {Treeheading.image -side right -sticky {} Treeheading.text -sticky we}} Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} Separator Layout: Treeitem.separator -sticky nswe TButton Layout: Button.border -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}} Style map: -relief {{!disabled pressed} sunken} TCheckbutton Layout: Checkbutton.padding -sticky nswe -children {Checkbutton.indicator -side left -sticky {} Checkbutton.focus -side left -sticky w -children {Checkbutton.label -sticky nswe}} TCombobox Layout: Combobox.field -sticky nswe -children {Combobox.downarrow -side right -sticky ns Combobox.padding -sticky nswe -children {Combobox.focus -sticky nswe -children {Combobox.textarea -sticky nswe}}} Style map: -focusfill {{readonly focus} SystemHighlight} -foreground {disabled SystemGrayText {readonly focus} SystemHighlightText} -selectforeground {!focus SystemWindowText} -fieldbackground {readonly SystemButtonFace disabled SystemButtonFace} -selectbackground {!focus SystemWindow} TEntry Layout: Entry.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}} Style map: -selectforeground {!focus SystemWindowText} -selectbackground {!focus SystemWindow} -fieldbackground {readonly SystemButtonFace disabled SystemButtonFace} TLabelframe Layout: Labelframe.border -sticky nswe TLabelframe.Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} TMenubutton Layout: Menubutton.border -sticky nswe -children {Menubutton.focus -sticky nswe -children {Menubutton.indicator -side right -sticky {} Menubutton.padding -sticky we -children {Menubutton.label -side left -sticky {}}}} TNotebook Layout: Notebook.client -sticky nswe TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Style map: -expand {selected {2 2 2 0}} TProgressbar - TRadiobutton Layout: Radiobutton.padding -sticky nswe -children {Radiobutton.indicator -side left -sticky {} Radiobutton.focus -side left -sticky {} -children {Radiobutton.label -sticky nswe}} TScale - TSpinbox Layout: Spinbox.field -side top -sticky we -children {null -side right -sticky {} -children {Spinbox.uparrow -side top -sticky e Spinbox.downarrow -side bottom -sticky e} Spinbox.padding -sticky nswe -children {Spinbox.textarea -sticky nswe}} Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Toolbutton Layout: Toolbutton.border -sticky nswe -children {Toolbutton.focus -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Style map: -relief {disabled flat selected sunken pressed sunken active raised} Treeview Layout: Treeview.field -sticky nswe -border 1 -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}} Style map: -foreground {disabled SystemGrayText selected SystemHighlightText} -background {disabled SystemButtonFace selected SystemHighlight} Treeview.Separator Layout: Treeitem.separator -sticky nswe "xpnative" theme style guide P "Button.button" style element options: "Checkbutton.indicator" style element options: "Combobox.downarrow" style element options: "Combobox.field" style element options: "Entry.field" style element options: "Horizontal.Progressbar.pbar" style element options: "Horizontal.Progressbar.trough" style element options: "Horizontal.Scale.slider" style element options: "Horizontal.Scale.track" style element options: "Horizontal.Scrollbar.grip" style element options: "Horizontal.Scrollbar.thumb" style element options: "Horizontal.Scrollbar.trough" style element options: "Labelframe.border" style element options: "Menubutton.button" style element options: "Menubutton.dropdown" style element options: "NotebookPane.background" style element options: "Radiobutton.indicator" style element options: "Scale.trough" style element options: "Scrollbar.downarrow" style element options: "Scrollbar.leftarrow" style element options: "Scrollbar.rightarrow" style element options: "Scrollbar.uparrow" style element options: "Spinbox.downarrow" style element options: "Spinbox.field" style element options: "Spinbox.uparrow" style element options: "Toolbutton.border" style element options: "Treeheading.border" style element options: "Treeitem.indicator" style element options: "Treeview.field" style element options: "Vertical.Progressbar.pbar" style element options: "Vertical.Progressbar.trough" style element options: "Vertical.Scale.slider" style element options: "Vertical.Scale.track" style element options: "Vertical.Scrollbar.grip" style element options: "Vertical.Scrollbar.thumb" style element options: "Vertical.Scrollbar.trough" style element options: "client" style element options: "sizegrip" style element options: "tab" style element options: "xpnative" theme style list . Style map: -foreground {disabled SystemGrayText} Heading Layout: Treeheading.cell -sticky nswe Treeheading.border -sticky nswe -children {Treeheading.padding -sticky nswe -children {Treeheading.image -side right -sticky {} Treeheading.text -sticky we}} Horizontal.TScale Layout: Scale.focus -sticky nswe -children {Horizontal.Scale.trough -sticky nswe -children {Horizontal.Scale.track -sticky we Horizontal.Scale.slider -side left -sticky {}}} Horizontal.TScrollbar Layout: Horizontal.Scrollbar.trough -sticky we -children {Horizontal.Scrollbar.leftarrow -side left -sticky {} Horizontal.Scrollbar.rightarrow -side right -sticky {} Horizontal.Scrollbar.thumb -sticky nswe -unit 1 -children {Horizontal.Scrollbar.grip -sticky {}}} Item Layout: Treeitem.padding -sticky nswe -children {Treeitem.indicator -side left -sticky {} Treeitem.image -side left -sticky {} Treeitem.text -sticky nswe} Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} Separator Layout: Treeitem.separator -sticky nswe TButton Layout: Button.button -sticky nswe -children {Button.focus -sticky nswe -children {Button.padding -sticky nswe -children {Button.label -sticky nswe}}} TCheckbutton Layout: Checkbutton.padding -sticky nswe -children {Checkbutton.indicator -side left -sticky {} Checkbutton.focus -side left -sticky w -children {Checkbutton.label -sticky nswe}} TCombobox Layout: Combobox.field -sticky nswe -children {Combobox.downarrow -side right -sticky ns Combobox.padding -sticky nswe -children {Combobox.focus -sticky nswe -children {Combobox.textarea -sticky nswe}}} Style map: -focusfill {{readonly focus} SystemHighlight} -foreground {disabled SystemGrayText {readonly focus} SystemHighlightText} -selectforeground {!focus SystemWindowText} -selectbackground {!focus SystemWindow} TEntry Layout: Entry.field -sticky nswe -border 1 -children {Entry.padding -sticky nswe -children {Entry.textarea -sticky nswe}} Style map: -selectforeground {!focus SystemWindowText} -selectbackground {!focus SystemWindow} TLabelframe.Label Layout: Label.fill -sticky nswe -children {Label.text -sticky nswe} TMenubutton Layout: Menubutton.dropdown -side right -sticky ns Menubutton.button -sticky nswe -children {Menubutton.padding -sticky we -children {Menubutton.label -sticky {}}} TNotebook Layout: Notebook.client -sticky nswe TNotebook.Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Style map: -expand {selected {2 2 2 2}} TProgressbar - TRadiobutton Layout: Radiobutton.padding -sticky nswe -children {Radiobutton.indicator -side left -sticky {} Radiobutton.focus -side left -sticky {} -children {Radiobutton.label -sticky nswe}} TScale - TScrollbar - TSpinbox Layout: Spinbox.field -side top -sticky we -children {null -side right -sticky {} -children {Spinbox.uparrow -side top -sticky e Spinbox.downarrow -side bottom -sticky e} Spinbox.padding -sticky nswe -children {Spinbox.textarea -sticky nswe}} Style map: -selectforeground {!focus SystemWindowText} -selectbackground {!focus SystemWindow} Tab Layout: Notebook.tab -sticky nswe -children {Notebook.padding -side top -sticky nswe -children {Notebook.focus -side top -sticky nswe -children {Notebook.label -side top -sticky {}}}} Toolbutton Layout: Toolbutton.border -sticky nswe -children {Toolbutton.focus -sticky nswe -children {Toolbutton.padding -sticky nswe -children {Toolbutton.label -sticky nswe}}} Treeview Layout: Treeview.field -sticky nswe -border 1 -children {Treeview.padding -sticky nswe -children {Treeview.treearea -sticky nswe}} Style map: -foreground {disabled SystemGrayText selected SystemHighlightText} -background {disabled SystemButtonFace selected SystemHighlight} Treeview.Separator Layout: Treeitem.separator -sticky nswe Vertical.TScale Layout: Scale.focus -sticky nswe -children {Vertical.Scale.trough -sticky nswe -children {Vertical.Scale.track -sticky ns Vertical.Scale.slider -side top -sticky {}}} Vertical.TScrollbar Layout: Vertical.Scrollbar.trough -sticky ns -children {Vertical.Scrollbar.uparrow -side top -sticky {} Vertical.Scrollbar.downarrow -side bottom -sticky {} Vertical.Scrollbar.thumb -sticky nswe -unit 1 -children {Vertical.Scrollbar.grip -sticky {}}}PASS Index P * Constants * Variables * func ActivateTheme(name string) (err error) * func Bell(options ...Opt) * func Bind(options ...any) * func ChooseColor(options ...Opt) string * func ChooseDirectory(options ...Opt) string * func ClipboardAppend(data string, options ...Opt) * func ClipboardClear(options ...Opt) * func ClipboardGet(options ...Opt) string * func CourierFont() string * func CurrentThemeName() (r string) * func Destroy(options ...Opt) * func Finalize() (err error) * func Focus(options ...Opt) string * func FontConfigure(name string, options ...any) []string * func FontFamilies(options ...Opt) []string * func Fontchooser(options ...Opt) * func FontchooserFont() []string * func FontchooserHide() * func FontchooserShow() * func GetOpenFile(options ...Opt) (r []string) * func GetSaveFile(options ...Opt) string * func Grid(w Widget, options ...Opt) * func GridAnchor(w *Window, anchor string) string * func GridColumnConfigure(w Widget, index int, options ...Opt) * func GridRowConfigure(w Widget, index int, options ...Opt) * func Initialize() * func MessageBox(options ...Opt) string * func Pack(options ...Opt) * func Place(options ...Opt) * func StyleConfigure(style string, options ...any) []string * func StyleElementCreate(elementName, typ string, options ...any) string * func StyleElementNames() []string * func StyleElementOptions(element string) []string * func StyleLayout(style string, options ...any) string * func StyleLookup(style string, options ...any) string * func StyleMap(style string, options ...any) string * func StyleThemeNames() []string * func StyleThemeStyles(themeName ...string) []string * func StyleThemeUse(themeName ...string) string * func TeX(src string, scale float64) (png []byte) * func TeX2(src string, scale float64) (png []byte, err error) * func TeXImg(src string, scale float64) (img image.Image) * func TeXImg2(src string, scale float64) (img image.Image, err error) * func TkScaling(options ...any) float64 * func TooltipClear(pattern string) * func TooltipConfigure(options ...any) string * func TooltipDelay(delay time.Duration) string * func TooltipFade(v bool) string * func TooltipOff(v bool) string * func TooltipOn(v bool) string * func Update() * func WinfoHeight(w *Window) string * func WinfoScreenHeight(w *Window) string * func WinfoScreenWidth(w *Window) string * func WinfoWidth(w *Window) string * func WmGeometry(w *Window, geometry string) string * func WmMaxSize(w *Window) (width, height int) * func WmMinSize(w *Window, widthHeight ...any) (r string) * func WmProtocol(w *Window, name string, command any) string * func WmSetMaxSize(w *Window, width, height int) * type ButtonWidget * + func Button(options ...Opt) *ButtonWidget + func Exit(options ...Opt) *ButtonWidget * + func (w *ButtonWidget) Invoke() string * type CanvasWidget * + func Canvas(options ...Opt) *CanvasWidget * + func (w *CanvasWidget) Graph(script string) *CanvasWidget * type CheckbuttonWidget * + func Checkbutton(options ...Opt) *CheckbuttonWidget * + func (w *CheckbuttonWidget) Deselect() + func (w *CheckbuttonWidget) Invoke() string + func (w *CheckbuttonWidget) Select() * type EntryWidget * + func Entry(options ...Opt) *EntryWidget * type Event * + func (e *Event) ScrollSet(w Widget) + func (e *Event) SetReturnCodeBreak() + func (e *Event) SetReturnCodeContinue() + func (e *Event) SetReturnCodeError() + func (e *Event) SetReturnCodeOK() + func (e *Event) SetReturnCodeReturn() + func (e *Event) Xview(w Widget) + func (e *Event) Yview(w Widget) * type EventHandler * type FileType * type FontFace * + func NewFont(options ...Opt) *FontFace * + func (f *FontFace) Delete() + func (f *FontFace) String() string * type FrameWidget * + func Frame(options ...Opt) *FrameWidget * type Img * + func NewBitmap(options ...Opt) *Img + func NewPhoto(options ...Opt) *Img * + func (m *Img) Copy(src *Img, options ...Opt) (r *Img) + func (m *Img) Delete() + func (m *Img) Graph(script string) *Img + func (m *Img) Height() string + func (m *Img) String() string + func (m *Img) Width() string * type LC * + func (lc LC) String() string * type LabelWidget * + func Label(options ...Opt) *LabelWidget * type LabelframeWidget * + func Labelframe(options ...Opt) *LabelframeWidget * type ListboxWidget * + func Listbox(options ...Opt) *ListboxWidget * type MenuItem * + func (m *MenuItem) String() string * type MenuWidget * + func Menu(options ...Opt) *MenuWidget * + func (w *MenuWidget) AddCascade(options ...Opt) *MenuItem + func (w *MenuWidget) AddCheckbutton(options ...Opt) *MenuItem + func (w *MenuWidget) AddCommand(options ...Opt) *MenuItem + func (w *MenuWidget) AddRadiobutton(options ...Opt) *MenuItem + func (w *MenuWidget) AddSeparator(options ...Opt) *MenuItem + func (w *MenuWidget) EntryConfigure(index uint, options ...Opt) + func (w *MenuWidget) Invoke(index uint) * type MenubuttonWidget * + func Menubutton(options ...Opt) *MenubuttonWidget * type MessageWidget * + func Message(options ...Opt) *MessageWidget * type Opt * + func Accelerator(val any) Opt + func Activebackground(val any) Opt + func Activeborderwidth(val any) Opt + func Activeforeground(val any) Opt + func Activerelief(val any) Opt + func Activestyle(val any) Opt + func After(val any) Opt + func Align(val any) Opt + func Anchor(val any) Opt + func Arrowcolor(val any) Opt + func Arrowsize(val any) Opt + func Aspect(val any) Opt + func Autoseparators(val any) Opt + func Background(val any) Opt + func Backgroundimage(val any) Opt + func Backward() Opt + func Before(val any) Opt + func Bgstipple(val any) Opt + func Bigincrement(val any) Opt + func Bitmap(val any) Opt + func Blockcursor(val any) Opt + func Border(val any) Opt + func Bordercolor(val any) Opt + func Bordermode(val any) Opt + func Borderwidth(val any) Opt + func Buttonbackground(val any) Opt + func Buttoncursor(val any) Opt + func Buttondownrelief(val any) Opt + func Buttonuprelief(val any) Opt + func Chars() Opt + func Children(list ...any) Opt + func Class(val any) Opt + func Closeenough(val any) Opt + func Colormap(val any) Opt + func Column(val any) Opt + func Columnbreak(val any) Opt + func Columns(val any) Opt + func Columnseparatorwidth(val any) Opt + func Columnspan(val any) Opt + func Command(handler any) Opt + func Compound(val any) Opt + func Confine(val any) Opt + func Confirmoverwrite(val any) Opt + func Container(val any) Opt + func Cursor(val any) Opt + func Darkcolor(val any) Opt + func Data(val any) Opt + func Default(val any) Opt + func Defaultextension(val any) Opt + func Detail(val any) Opt + func Digits(val any) Opt + func Direction(val any) Opt + func Disabledbackground(val any) Opt + func Disabledforeground(val any) Opt + func Displaychars() Opt + func Displaycolumns(val any) Opt + func Displayindices() Opt + func Displaylines() Opt + func Displayof(val any) Opt + func Elementborderwidth(val any) Opt + func Elide(val any) Opt + func Endline(val any) Opt + func ExitHandler() Opt + func Expand(val any) Opt + func Exportselection(val any) Opt + func Family(val any) Opt + func Fgstipple(val any) Opt + func Fieldbackground(val any) Opt + func File(val any) Opt + func Filetypes(val any) Opt + func Fill(val any) Opt + func Focuscolor(val any) Opt + func Focusfill(val any) Opt + func Focussolid(val any) Opt + func Focusthickness(val any) Opt + func Font(list ...any) Opt + func Force(val any) Opt + func Foreground(val any) Opt + func Format(val any) Opt + func Forward() Opt + func From(val ...any) Opt + func Gamma(val any) Opt + func Gripsize(val any) Opt + func Groovewidth(val any) Opt + func Handlepad(val any) Opt + func Handlesize(val any) Opt + func Heading(columnId string) Opt + func Height(val any) Opt + func Hidemargin(val any) Opt + func Highlightbackground(val any) Opt + func Highlightcolor(val any) Opt + func Highlightthickness(val any) Opt + func Icon(val any) Opt + func Id(val any) Opt + func Image(val any) Opt + func In(val any) Opt + func Inactiveselectbackground(val any) Opt + func Increment(val any) Opt + func Indent(val any) Opt + func Index(index any) Opt + func Indicatorbackground(val any) Opt + func Indicatorcolor(val any) Opt + func Indicatormargin(val any) Opt + func Indicatormargins(val any) Opt + func Indicatoron(val any) Opt + func Indicatorrelief(val any) Opt + func Indicatorsize(val any) Opt + func Indices() Opt + func Info(info string) Opt + func Initialcolor(val any) Opt + func Initialdir(val any) Opt + func Initialfile(val any) Opt + func Insertbackground(val any) Opt + func Insertborderwidth(val any) Opt + func Insertcolor(val any) Opt + func Insertofftime(val any) Opt + func Insertontime(val any) Opt + func Insertunfocussed(val any) Opt + func Insertwidth(val any) Opt + func Invalidcommand(handler any) Opt + func Ipadx(val any) Opt + func Ipady(val any) Opt + func Items(items ...any) Opt + func Jump(val any) Opt + func Justify(val any) Opt + func Labelanchor(val any) Opt + func Labelmargins(val any) Opt + func Labeloutside(val any) Opt + func Labelwidget(val any) Opt + func Lastfor(val any) Opt + func Lbl(val any) Opt + func Length(val any) Opt + func Lightcolor(val any) Opt + func Lines() Opt + func Listvariable(val any) Opt + func Lmargin1(val any) Opt + func Lmargin2(val any) Opt + func Lmargincolor(val any) Opt + func Maskdata(val any) Opt + func Maskfile(val any) Opt + func Maximum(val any) Opt + func Maxphase(val any) Opt + func Maxundo(val any) Opt + func Metadata(val any) Opt + func Minsize(val ...any) Opt + func Mnu(val any) Opt + func Mode(val any) Opt + func Msg(val any) Opt + func Multiple(val any) Opt + func Mustexist(val any) Opt + func Nice(val any) Opt + func Nocase() Opt + func Offrelief(val any) Opt + func Offset(val any) Opt + func Offvalue(val any) Opt + func Onvalue(val any) Opt + func Opaqueresize(val any) Opt + func Open(val bool) Opt + func Orient(val any) Opt + func Overrelief(val any) Opt + func Overstrike(val any) Opt + func Overstrikefg(val any) Opt + func Padding(val any) Opt + func Padx(val any) Opt + func Pady(val any) Opt + func Palette(val any) Opt + func Parent(val any) Opt + func Period(val any) Opt + func Phase(val any) Opt + func Placeholder(val any) Opt + func Placeholderforeground(val any) Opt + func Postcommand(handler any) Opt + func Postoffset(val any) Opt + func Proxybackground(val any) Opt + func Proxyborderwidth(val any) Opt + func Proxyrelief(val any) Opt + func Readonlybackground(val any) Opt + func Regexp() Opt + func Relheight(val any) Opt + func Relief(val any) Opt + func Relwidth(val any) Opt + func Relx(val any) Opt + func Rely(val any) Opt + func Repeatdelay(val any) Opt + func Repeatinterval(val any) Opt + func Resolution(val any) Opt + func Rmargin(val any) Opt + func Rmargincolor(val any) Opt + func Row(val any) Opt + func Rowheight(val any) Opt + func Rowspan(val any) Opt + func Sashcursor(val any) Opt + func Sashpad(val any) Opt + func Sashrelief(val any) Opt + func Sashthickness(val any) Opt + func Sashwidth(val any) Opt + func Screen(val any) Opt + func Scrollregion(val any) Opt + func Selectbackground(val any) Opt + func Selectborderwidth(val any) Opt + func Selectcolor(val any) Opt + func Selectforeground(val any) Opt + func Selectimage(val any) Opt + func Selectmode(val any) Opt + func Selecttype(val any) Opt + func Setgrid(val any) Opt + func Shiftrelief(val any) Opt + func Show(val any) Opt + func Showhandle(val any) Opt + func Showvalue(val any) Opt + func Side(val any) Opt + func Size(val any) Opt + func Slant(val any) Opt + func Sliderlength(val any) Opt + func Sliderrelief(val any) Opt + func Sliderwidth(val any) Opt + func Spacing1(val any) Opt + func Spacing2(val any) Opt + func Spacing3(val any) Opt + func Startline(val any) Opt + func State(val any) Opt + func Sticky(val any) Opt + func Stretch(when string) Opt + func Striped(val any) Opt + func Stripedbackground(val any) Opt + func Style(val any) Opt + func Tab(tabId any) Opt + func Tabmargins(val any) Opt + func Tabposition(val any) Opt + func Tabs(val any) Opt + func Tabstyle(val any) Opt + func Tag(name string) Opt + func Takefocus(val any) Opt + func Tearoff(val any) Opt + func Tearoffcommand(handler any) Opt + func Textvariable(s string) Opt + func Tickinterval(val any) Opt + func Tile(val any) Opt + func Title(val any) Opt + func Titlecolumns(val any) Opt + func Titleitems(val any) Opt + func To(val ...any) Opt + func Tristateimage(val any) Opt + func Tristatevalue(val any) Opt + func Troughcolor(val any) Opt + func Troughrelief(val any) Opt + func Txt(val any) Opt + func Type(val any) Opt + func Underline(val any) Opt + func Underlinefg(val any) Opt + func Undo(val any) Opt + func Use(val any) Opt + func Validate(val any) Opt + func Validatecommand(handler any) Opt + func Value(val any) Opt + func Values(val any) Opt + func Visual(val any) Opt + func Weight(val any) Opt + func Width(val any) Opt + func Win(val any) Opt + func Wrap(val any) Opt + func Wraplength(val any) Opt + func X(val any) Opt + func Xpixels() Opt + func Xscrollcommand(handler any) Opt + func Xscrollincrement(val any) Opt + func Y(val any) Opt + func Ypixels() Opt + func Yscrollcommand(handler any) Opt + func Yscrollincrement(val any) Opt * type OptionMenuWidget * + func OptionMenu(varName *VariableOpt, options ...any) (r *OptionMenuWidget) * + func (w *OptionMenuWidget) Name() string * type Opts * type PanedwindowWidget * + func Panedwindow(options ...Opt) *PanedwindowWidget * + func (w *PanedwindowWidget) Add(subwindow *Window, options ...Opt) + func (w *PanedwindowWidget) Panecget(subwindow *Window, opt any) string + func (w *PanedwindowWidget) Paneconfigure(subwindow *Window, options ...Opt) string * type RadiobuttonWidget * + func Radiobutton(options ...Opt) *RadiobuttonWidget * type ScaleWidget * + func Scale(options ...Opt) *ScaleWidget * type ScrollbarWidget * + func Scrollbar(options ...Opt) *ScrollbarWidget * type SpinboxWidget * + func Spinbox(options ...Opt) *SpinboxWidget * type TButtonWidget * + func TButton(options ...Opt) *TButtonWidget + func TExit(options ...Opt) *TButtonWidget * + func (w *TButtonWidget) Invoke() string * type TCheckbuttonWidget * + func TCheckbutton(options ...Opt) *TCheckbuttonWidget * + func (w *TCheckbuttonWidget) Invoke() string * type TComboboxWidget * + func TCombobox(options ...Opt) *TComboboxWidget * + func (w *TComboboxWidget) Current(newIndex any) (r string) * type TEntryWidget * + func TEntry(options ...Opt) *TEntryWidget * type TFrameWidget * + func TFrame(options ...Opt) *TFrameWidget * type TLabelWidget * + func TLabel(options ...Opt) *TLabelWidget * type TLabelframeWidget * + func TLabelframe(options ...Opt) *TLabelframeWidget * type TMenubuttonWidget * + func TMenubutton(options ...Opt) *TMenubuttonWidget * type TNotebookWidget * + func TNotebook(options ...Opt) *TNotebookWidget * + func (w *TNotebookWidget) Add(options ...Opt) + func (w *TNotebookWidget) Select(tabid any) string + func (w *TNotebookWidget) Tabs() (r []*Window) * type TPanedwindowWidget * + func TPanedwindow(options ...Opt) *TPanedwindowWidget * + func (w *TPanedwindowWidget) Add(subwindow *Window, options ...Opt) * type TProgressbarWidget * + func TProgressbar(options ...Opt) *TProgressbarWidget * type TRadiobuttonWidget * + func TRadiobutton(options ...Opt) *TRadiobuttonWidget * type TScaleWidget * + func TScale(options ...Opt) *TScaleWidget * + func (w *TScaleWidget) Get(xy ...any) (r string) * type TScrollbarWidget * + func TScrollbar(options ...Opt) *TScrollbarWidget * + func (w *TScrollbarWidget) Set(firstLast string) * type TSeparatorWidget * + func TSeparator(options ...Opt) *TSeparatorWidget * type TSizegripWidget * + func TSizegrip(options ...Opt) *TSizegripWidget * type TSpinboxWidget * + func TSpinbox(options ...Opt) *TSpinboxWidget * type TTreeviewWidget * + func TTreeview(options ...Opt) *TTreeviewWidget * + func (w *TTreeviewWidget) Column(column any, options ...Opt) (r string) + func (w *TTreeviewWidget) Heading(column any, options ...Opt) (r string) + func (w *TTreeviewWidget) Insert(parent, index any, options ...Opt) (r string) + func (w *TTreeviewWidget) Item(item any, options ...Opt) (r string) + func (w *TTreeviewWidget) See(item any) + func (w *TTreeviewWidget) Selection(selop string, itemList ...any) (r []string) * type TextWidget * + func Text(options ...Opt) *TextWidget * + func (w *TextWidget) Clear() + func (w *TextWidget) Copy() + func (w *TextWidget) Count(options ...any) []string + func (w *TextWidget) Cut() + func (w *TextWidget) Delete(options ...any) + func (w *TextWidget) EditReset() + func (w *TextWidget) Get(options ...any) (r []string) + func (w *TextWidget) ImageCreate(index any, options ...Opt) + func (w *TextWidget) Index(index any) (r string) + func (w *TextWidget) Insert(index any, chars string, options ...string) any + func (w *TextWidget) InsertML(list ...any) + func (w *TextWidget) MarkGravity(markName, direction string) + func (w *TextWidget) MarkNames() []string + func (w *TextWidget) MarkSet(markName string, index any) + func (w *TextWidget) MarkUnset(markName ...string) + func (w *TextWidget) Modified() bool + func (w *TextWidget) Paste() + func (w *TextWidget) Redo() + func (w *TextWidget) Search(options ...any) string + func (w *TextWidget) See(index any) + func (w *TextWidget) SelectAll() + func (w *TextWidget) SetModified(v bool) + func (w *TextWidget) TagAdd(options ...any) string + func (w *TextWidget) TagBind(tag, sequence string, handler any) string + func (w *TextWidget) TagConfigure(tagName string, options ...Opt) + func (w *TextWidget) TagDelete(tags ...string) + func (w *TextWidget) TagNames(index string) []string + func (w *TextWidget) TagRanges(tagName string) (r []string) + func (w *TextWidget) Text() string + func (w *TextWidget) Undo() + func (w *TextWidget) WindowCreate(index any, options ...Opt) + func (w *TextWidget) Xview() string + func (w *TextWidget) Yview() string + func (w *TextWidget) Yviewmoveto(fraction any) string * type Theme * + func CurrentTheme() Theme * type ThemeContext * type ThemeKey * + func RegisterTheme(name string, t Theme) (r ThemeKey, err error) * type Ticker * + func NewTicker(d time.Duration, handler func()) (r *Ticker, err error) * type ToplevelWidget * + func Toplevel(options ...Opt) *ToplevelWidget * type VariableOpt * + func Variable(val any) *VariableOpt * + func (v *VariableOpt) Get() (r string) + func (v *VariableOpt) Set(val any) * type Widget * + func Tooltip(w Widget, options ...any) (r Widget) * type Window * + func (w *Window) Activebackground() string + func (w *Window) Activeborderwidth() string + func (w *Window) Activeforeground() string + func (w *Window) Activerelief() string + func (w *Window) Activestyle() string + func (w *Window) Anchor() string + func (w *Window) Aspect() string + func (w *Window) Autoseparators() string + func (w *Window) Background() string + func (w *Window) Backgroundimage() string + func (w *Window) Bigincrement() string + func (w *Window) Bitmap() string + func (w *Window) Blockcursor() string + func (w *Window) Borderwidth() string + func (w *Window) Busy(options ...Opt) + func (w *Window) BusyForget(options ...Opt) + func (w *Window) Button(options ...Opt) *ButtonWidget + func (w *Window) Buttonbackground() string + func (w *Window) Buttoncursor() string + func (w *Window) Buttondownrelief() string + func (w *Window) Buttonuprelief() string + func (w *Window) Canvas(options ...Opt) *CanvasWidget + func (w *Window) Center() *Window + func (w *Window) Checkbutton(options ...Opt) *CheckbuttonWidget + func (w *Window) Class() string + func (w *Window) Closeenough() string + func (w *Window) Colormap() string + func (w *Window) Columns() string + func (w *Window) Compound() string + func (w *Window) Configure(options ...Opt) *Window + func (w *Window) Confine() string + func (w *Window) Container() string + func (w *Window) Cursor() string + func (w *Window) Default() string + func (w *Window) Digits() string + func (w *Window) Direction() string + func (w *Window) Disabledbackground() string + func (w *Window) Disabledforeground() string + func (w *Window) Displaycolumns() string + func (w *Window) Elementborderwidth() string + func (w *Window) Endline() string + func (w *Window) Entry(options ...Opt) *EntryWidget + func (w *Window) Exit(options ...Opt) *ButtonWidget + func (w *Window) Exportselection() string + func (w *Window) Font() string + func (w *Window) Foreground() string + func (w *Window) Format() string + func (w *Window) Frame(options ...Opt) *FrameWidget + func (w *Window) Handlepad() string + func (w *Window) Handlesize() string + func (w *Window) Height() string + func (w *Window) Highlightbackground() string + func (w *Window) Highlightcolor() string + func (w *Window) Highlightthickness() string + func (w *Window) IconPhoto(options ...Opt) + func (w *Window) Image() string + func (w *Window) Inactiveselectbackground() string + func (w *Window) Increment() string + func (w *Window) Indicatoron() string + func (w *Window) Insertbackground() string + func (w *Window) Insertborderwidth() string + func (w *Window) Insertofftime() string + func (w *Window) Insertontime() string + func (w *Window) Insertunfocussed() string + func (w *Window) Insertwidth() string + func (w *Window) Jump() string + func (w *Window) Justify() string + func (w *Window) Label(options ...Opt) *LabelWidget + func (w *Window) Labelanchor() string + func (w *Window) Labelframe(options ...Opt) *LabelframeWidget + func (w *Window) Labelwidget() string + func (w *Window) Lbl() string + func (w *Window) Length() string + func (w *Window) Listbox(options ...Opt) *ListboxWidget + func (w *Window) Listvariable() string + func (w *Window) Lower(belowThis Widget) + func (w *Window) Maximum() string + func (w *Window) Maxundo() string + func (w *Window) Menu(options ...Opt) *MenuWidget + func (w *Window) Menubutton(options ...Opt) *MenubuttonWidget + func (w *Window) Message(options ...Opt) *MessageWidget + func (w *Window) Mnu() string + func (w *Window) Mode() string + func (w *Window) Offrelief() string + func (w *Window) Offvalue() string + func (w *Window) Onvalue() string + func (w *Window) Opaqueresize() string + func (w *Window) OptionMenu(varName *VariableOpt, options ...any) (r *OptionMenuWidget) + func (w *Window) Orient() string + func (w *Window) Overrelief() string + func (w *Window) Padding() string + func (w *Window) Padx() string + func (w *Window) Pady() string + func (w *Window) Panedwindow(options ...Opt) *PanedwindowWidget + func (w *Window) Phase() string + func (w *Window) Placeholder() string + func (w *Window) Placeholderforeground() string + func (w *Window) Proxybackground() string + func (w *Window) Proxyborderwidth() string + func (w *Window) Proxyrelief() string + func (w *Window) Radiobutton(options ...Opt) *RadiobuttonWidget + func (w *Window) Raise(aboveThis Widget) + func (w *Window) Readonlybackground() string + func (w *Window) Relief() string + func (w *Window) Repeatdelay() string + func (w *Window) Repeatinterval() string + func (w *Window) Resolution() string + func (w *Window) Sashcursor() string + func (w *Window) Sashpad() string + func (w *Window) Sashrelief() string + func (w *Window) Sashwidth() string + func (w *Window) Scale(options ...Opt) *ScaleWidget + func (w *Window) Screen() string + func (w *Window) Scrollbar(options ...Opt) *ScrollbarWidget + func (w *Window) Scrollregion() string + func (w *Window) Selectbackground() string + func (w *Window) Selectborderwidth() string + func (w *Window) Selectcolor() string + func (w *Window) Selectforeground() string + func (w *Window) Selectimage() string + func (w *Window) Selectmode() string + func (w *Window) Selecttype() string + func (w *Window) SetResizable(width, height bool) + func (w *Window) Setgrid() string + func (w *Window) Show() string + func (w *Window) Showhandle() string + func (w *Window) Showvalue() string + func (w *Window) Sliderlength() string + func (w *Window) Sliderrelief() string + func (w *Window) Spacing1() string + func (w *Window) Spacing2() string + func (w *Window) Spacing3() string + func (w *Window) Spinbox(options ...Opt) *SpinboxWidget + func (w *Window) Startline() string + func (w *Window) State() string + func (w *Window) Sticky() string + func (w *Window) String() (r string) + func (w *Window) Striped() string + func (w *Window) Style() string + func (w *Window) TButton(options ...Opt) *TButtonWidget + func (w *Window) TCheckbutton(options ...Opt) *TCheckbuttonWidget + func (w *Window) TCombobox(options ...Opt) *TComboboxWidget + func (w *Window) TEntry(options ...Opt) *TEntryWidget + func (w *Window) TExit(options ...Opt) *TButtonWidget + func (w *Window) TFrame(options ...Opt) *TFrameWidget + func (w *Window) TLabel(options ...Opt) *TLabelWidget + func (w *Window) TLabelframe(options ...Opt) *TLabelframeWidget + func (w *Window) TMenubutton(options ...Opt) *TMenubuttonWidget + func (w *Window) TNotebook(options ...Opt) *TNotebookWidget + func (w *Window) TPanedwindow(options ...Opt) *TPanedwindowWidget + func (w *Window) TProgressbar(options ...Opt) *TProgressbarWidget + func (w *Window) TRadiobutton(options ...Opt) *TRadiobuttonWidget + func (w *Window) TScale(options ...Opt) *TScaleWidget + func (w *Window) TScrollbar(options ...Opt) *TScrollbarWidget + func (w *Window) TSeparator(options ...Opt) *TSeparatorWidget + func (w *Window) TSizegrip(options ...Opt) *TSizegripWidget + func (w *Window) TSpinbox(options ...Opt) *TSpinboxWidget + func (w *Window) TTreeview(options ...Opt) *TTreeviewWidget + func (w *Window) Tabs() string + func (w *Window) Tabstyle() string + func (w *Window) Takefocus() string + func (w *Window) Tearoff() string + func (w *Window) Text(options ...Opt) *TextWidget + func (w *Window) Textvariable() (r string) + func (w *Window) Tickinterval() string + func (w *Window) Tile() string + func (w *Window) Title() string + func (w *Window) Titlecolumns() string + func (w *Window) Titleitems() string + func (w *Window) Toplevel(options ...Opt) *ToplevelWidget + func (w *Window) Tristateimage() string + func (w *Window) Tristatevalue() string + func (w *Window) Troughcolor() string + func (w *Window) Txt() string + func (w *Window) Type() string + func (w *Window) Underline() string + func (w *Window) Undo() string + func (w *Window) Use() string + func (w *Window) Validate() string + func (w *Window) Value() string + func (w *Window) Values() string + func (w *Window) Variable() string + func (w *Window) Visual() string + func (w *Window) Wait() + func (w *Window) WaitVisibility() + func (w *Window) Weight() string + func (w *Window) WidgetState(stateSpec string) (r string) + func (w *Window) Width() string + func (w *Window) WmTitle(s string) string + func (w *Window) Wrap() string + func (w *Window) Wraplength() string + func (w *Window) Xscrollincrement() string + func (w *Window) Yscrollincrement() string * Bugs Constants P View Source const ( Arrow = cursor("arrow") BasedArrowDown = cursor("based_arrow_down") BasedArrowUp = cursor("based_arrow_up") Boat = cursor("boat") Bogosity = cursor("bogosity") BottomLeftCorner = cursor("bottom_left_corner") BottomRightCorner = cursor("bottom_right_corner") BottomSide = cursor("bottom_side") BottomTee = cursor("bottom_tee") BoxSpiral = cursor("box_spiral") CenterPtr = cursor("center_ptr") Circle = cursor("circle") Clock = cursor("clock") CoffeeMug = cursor("coffee_mug") Cross = cursor("cross") CrossReverse = cursor("cross_reverse") Crosshair = cursor("crosshair") CursorIcon = cursor("icon") DiamondCross = cursor("diamond_cross") Dot = cursor("dot") Dotbox = cursor("dotbox") DoubleArrow = cursor("double_arrow") DraftLarge = cursor("draft_large") DraftSmall = cursor("draft_small") DrapedBox = cursor("draped_box") Exchange = cursor("exchange") Fleur = cursor("fleur") Gobbler = cursor("gobbler") Gumby = cursor("gumby") Hand1 = cursor("hand1") Hand2 = cursor("hand2") Heart = cursor("heart") IronCross = cursor("iron_cross") LeftPtr = cursor("left_ptr") LeftSide = cursor("left_side") LeftTee = cursor("left_tee") Leftbutton = cursor("leftbutton") LlAngle = cursor("ll_angle") LrAngle = cursor("lr_angle") Man = cursor("man") Middlebutton = cursor("middlebutton") Mouse = cursor("mouse") None = cursor("none") Pencil = cursor("pencil") Pirate = cursor("pirate") Plus = cursor("plus") QuestionArrow = cursor("question_arrow") RightPtr = cursor("right_ptr") RightSide = cursor("right_side") RightTee = cursor("right_tee") Rightbutton = cursor("rightbutton") RtlLogo = cursor("rtl_logo") Sailboat = cursor("sailboat") SbDownArrow = cursor("sb_down_arrow") SbHDoubleArrow = cursor("sb_h_double_arrow") SbLeftArrow = cursor("sb_left_arrow") SbRightArrow = cursor("sb_right_arrow") SbUpArrow = cursor("sb_up_arrow") SbVDoubleArrow = cursor("sb_v_double_arrow") Shuttle = cursor("shuttle") Sizing = cursor("sizing") Spider = cursor("spider") Spraycan = cursor("spraycan") Star = cursor("star") Target = cursor("target") Tcross = cursor("tcross") TopLeftArrow = cursor("top_left_arrow") TopLeftCorner = cursor("top_left_corner") TopRightCorner = cursor("top_right_corner") TopSide = cursor("top_side") TopTee = cursor("top_tee") Trek = cursor("trek") UlAngle = cursor("ul_angle") Umbrella = cursor("umbrella") UrAngle = cursor("ur_angle") Watch = cursor("watch") XCursor = cursor("X_cursor") Xterm = cursor("xterm") ) Named cursor constants recognized on all platforms. Writing, for example, 'Arrow' as an option is the same as writing 'Cursor("arrow")', but the compiler will catch any typos in the cursor name. View Source const ( CursorSize = cursor("size") No = cursor("no") SizeNeSw = cursor("size_ne_sw") SizeNs = cursor("size_ns") SizeNwSe = cursor("size_nw_se") SizeWe = cursor("size_we") Starting = cursor("starting") Uparrow = cursor("uparrow") ) Additional Windows cursors. View Source const ( Aliasarrow = cursor("aliasarrow") Bucket = cursor("bucket") Cancel = cursor("cancel") Closedhand = cursor("closedhand") Contextualmenuarrow = cursor("contextualmenuarrow") Copyarrow = cursor("copyarrow") Countingdownhand = cursor("countingdownhand") Countingupanddownhand = cursor("countingupanddownhand") Countinguphand = cursor("countinguphand") CrossHair = cursor("cross-hair") CursorText = cursor("text") Eyedrop = cursor("eyedrop") EyedropFull = cursor("eyedrop-full") Fist = cursor("fist") Hand = cursor("hand") Help = cursor("help") Movearrow = cursor("movearrow") Notallowed = cursor("notallowed") Openhand = cursor("openhand") Pointinghand = cursor("pointinghand") Poof = cursor("poof") Resize = cursor("resize") Resizebottomleft = cursor("resizebottomleft") Resizebottomright = cursor("resizebottomright") Resizedown = cursor("resizedown") Resizeleft = cursor("resizeleft") Resizeleftright = cursor("resizeleftright") Resizeright = cursor("resizeright") Resizetopleft = cursor("resizetopleft") Resizetopright = cursor("resizetopright") Resizeup = cursor("resizeup") Resizeupdown = cursor("resizeupdown") Spinning = cursor("spinning") ZoomIn = cursor("zoom-in") ZoomOut = cursor("zoom-out") ) Additional macOS cursors. View Source const ( Agua = "agua" // R:0 G:255 B:255 AliceBlue = "AliceBlue" // R:240 G:248 B:255 AntiqueWhite = "AntiqueWhite" // R:250 G:235 B:215 AntiqueWhite1 = "AntiqueWhite1" // R:255 G:239 B:219 AntiqueWhite2 = "AntiqueWhite2" // R:238 G:223 B:204 AntiqueWhite3 = "AntiqueWhite3" // R:205 G:192 B:176 AntiqueWhite4 = "AntiqueWhite4" // R:139 G:131 B:120 Aquamarine = "aquamarine" // R:127 G:255 B:212 Aquamarine1 = "aquamarine1" // R:127 G:255 B:212 Aquamarine2 = "aquamarine2" // R:118 G:238 B:198 Aquamarine3 = "aquamarine3" // R:102 G:205 B:170 Aquamarine4 = "aquamarine4" // R:69 G:139 B:116 Azure = "azure" // R:240 G:255 B:255 Azure1 = "azure1" // R:240 G:255 B:255 Azure2 = "azure2" // R:224 G:238 B:238 Azure3 = "azure3" // R:193 G:205 B:205 Azure4 = "azure4" // R:131 G:139 B:139 Beige = "beige" // R:245 G:245 B:220 Bisque = "bisque" // R:255 G:228 B:196 Bisque1 = "bisque1" // R:255 G:228 B:196 Bisque2 = "bisque2" // R:238 G:213 B:183 Bisque3 = "bisque3" // R:205 G:183 B:158 Bisque4 = "bisque4" // R:139 G:125 B:107 Black = "black" // R:0 G:0 B:0 BlanchedAlmond = "BlanchedAlmond" // R:255 G:235 B:205 Blue = "blue" // R:0 G:0 B:255 Blue1 = "blue1" // R:0 G:0 B:255 Blue2 = "blue2" // R:0 G:0 B:238 Blue3 = "blue3" // R:0 G:0 B:205 Blue4 = "blue4" // R:0 G:0 B:139 BlueViolet = "BlueViolet" // R:138 G:43 B:226 Brown = "brown" // R:165 G:42 B:42 Brown1 = "brown1" // R:255 G:64 B:64 Brown2 = "brown2" // R:238 G:59 B:59 Brown3 = "brown3" // R:205 G:51 B:51 Brown4 = "brown4" // R:139 G:35 B:35 Burlywood = "burlywood" // R:222 G:184 B:135 Burlywood1 = "burlywood1" // R:255 G:211 B:155 Burlywood2 = "burlywood2" // R:238 G:197 B:145 Burlywood3 = "burlywood3" // R:205 G:170 B:125 Burlywood4 = "burlywood4" // R:139 G:115 B:85 CadetBlue = "CadetBlue" // R:95 G:158 B:160 CadetBlue1 = "CadetBlue1" // R:152 G:245 B:255 CadetBlue2 = "CadetBlue2" // R:142 G:229 B:238 CadetBlue3 = "CadetBlue3" // R:122 G:197 B:205 CadetBlue4 = "CadetBlue4" // R:83 G:134 B:139 Chartreuse = "chartreuse" // R:127 G:255 B:0 Chartreuse1 = "chartreuse1" // R:127 G:255 B:0 Chartreuse2 = "chartreuse2" // R:118 G:238 B:0 Chartreuse3 = "chartreuse3" // R:102 G:205 B:0 Chartreuse4 = "chartreuse4" // R:69 G:139 B:0 Chocolate = "chocolate" // R:210 G:105 B:30 Chocolate1 = "chocolate1" // R:255 G:127 B:36 Chocolate2 = "chocolate2" // R:238 G:118 B:33 Chocolate3 = "chocolate3" // R:205 G:102 B:29 Chocolate4 = "chocolate4" // R:139 G:69 B:19 Coral = "coral" // R:255 G:127 B:80 Coral1 = "coral1" // R:255 G:114 B:86 Coral2 = "coral2" // R:238 G:106 B:80 Coral3 = "coral3" // R:205 G:91 B:69 Coral4 = "coral4" // R:139 G:62 B:47 CornflowerBlue = "CornflowerBlue" // R:100 G:149 B:237 Cornsilk = "cornsilk" // R:255 G:248 B:220 Cornsilk1 = "cornsilk1" // R:255 G:248 B:220 Cornsilk2 = "cornsilk2" // R:238 G:232 B:205 Cornsilk3 = "cornsilk3" // R:205 G:200 B:177 Cornsilk4 = "cornsilk4" // R:139 G:136 B:120 Crymson = "crymson" // R:220 G:20 B:60 Cyan = "cyan" // R:0 G:255 B:255 Cyan1 = "cyan1" // R:0 G:255 B:255 Cyan2 = "cyan2" // R:0 G:238 B:238 Cyan3 = "cyan3" // R:0 G:205 B:205 Cyan4 = "cyan4" // R:0 G:139 B:139 DarkBlue = "DarkBlue" // R:0 G:0 B:139 DarkCyan = "DarkCyan" // R:0 G:139 B:139 DarkGoldenrod = "DarkGoldenrod" // R:184 G:134 B:11 DarkGoldenrod1 = "DarkGoldenrod1" // R:255 G:185 B:15 DarkGoldenrod2 = "DarkGoldenrod2" // R:238 G:173 B:14 DarkGoldenrod3 = "DarkGoldenrod3" // R:205 G:149 B:12 DarkGoldenrod4 = "DarkGoldenrod4" // R:139 G:101 B:8 DarkGray = "DarkGray" // R:169 G:169 B:169 DarkGreen = "DarkGreen" // R:0 G:100 B:0 DarkGrey = "DarkGrey" // R:169 G:169 B:169 DarkKhaki = "DarkKhaki" // R:189 G:183 B:107 DarkMagenta = "DarkMagenta" // R:139 G:0 B:139 DarkOliveGreen = "DarkOliveGreen" // R:85 G:107 B:47 DarkOliveGreen1 = "DarkOliveGreen1" // R:202 G:255 B:112 DarkOliveGreen2 = "DarkOliveGreen2" // R:188 G:238 B:104 DarkOliveGreen3 = "DarkOliveGreen3" // R:162 G:205 B:90 DarkOliveGreen4 = "DarkOliveGreen4" // R:110 G:139 B:61 DarkOrange = "DarkOrange" // R:255 G:140 B:0 DarkOrange1 = "DarkOrange1" // R:255 G:127 B:0 DarkOrange2 = "DarkOrange2" // R:238 G:118 B:0 DarkOrange3 = "DarkOrange3" // R:205 G:102 B:0 DarkOrange4 = "DarkOrange4" // R:139 G:69 B:0 DarkOrchid = "DarkOrchid" // R:153 G:50 B:204 DarkOrchid1 = "DarkOrchid1" // R:191 G:62 B:255 DarkOrchid2 = "DarkOrchid2" // R:178 G:58 B:238 DarkOrchid3 = "DarkOrchid3" // R:154 G:50 B:205 DarkOrchid4 = "DarkOrchid4" // R:104 G:34 B:139 DarkRed = "DarkRed" // R:139 G:0 B:0 DarkSalmon = "DarkSalmon" // R:233 G:150 B:122 DarkSeaGreen = "DarkSeaGreen" // R:143 G:188 B:143 DarkSeaGreen1 = "DarkSeaGreen1" // R:193 G:255 B:193 DarkSeaGreen2 = "DarkSeaGreen2" // R:180 G:238 B:180 DarkSeaGreen3 = "DarkSeaGreen3" // R:155 G:205 B:155 DarkSeaGreen4 = "DarkSeaGreen4" // R:105 G:139 B:105 DarkSlateBlue = "DarkSlateBlue" // R:72 G:61 B:139 DarkSlateGray = "DarkSlateGray" // R:47 G:79 B:79 DarkSlateGray1 = "DarkSlateGray1" // R:151 G:255 B:255 DarkSlateGray2 = "DarkSlateGray2" // R:141 G:238 B:238 DarkSlateGray3 = "DarkSlateGray3" // R:121 G:205 B:205 DarkSlateGray4 = "DarkSlateGray4" // R:82 G:139 B:139 DarkSlateGrey = "DarkSlateGrey" // R:47 G:79 B:79 DarkTurquoise = "DarkTurquoise" // R:0 G:206 B:209 DarkViolet = "DarkViolet" // R:148 G:0 B:211 DeepPink = "DeepPink" // R:255 G:20 B:147 DeepPink1 = "DeepPink1" // R:255 G:20 B:147 DeepPink2 = "DeepPink2" // R:238 G:18 B:137 DeepPink3 = "DeepPink3" // R:205 G:16 B:118 DeepPink4 = "DeepPink4" // R:139 G:10 B:80 DeepSkyBlue = "DeepSkyBlue" // R:0 G:191 B:255 DeepSkyBlue1 = "DeepSkyBlue1" // R:0 G:191 B:255 DeepSkyBlue2 = "DeepSkyBlue2" // R:0 G:178 B:238 DeepSkyBlue3 = "DeepSkyBlue3" // R:0 G:154 B:205 DeepSkyBlue4 = "DeepSkyBlue4" // R:0 G:104 B:139 DimGray = "DimGray" // R:105 G:105 B:105 DimGrey = "DimGrey" // R:105 G:105 B:105 DodgerBlue = "DodgerBlue" // R:30 G:144 B:255 DodgerBlue1 = "DodgerBlue1" // R:30 G:144 B:255 DodgerBlue2 = "DodgerBlue2" // R:28 G:134 B:238 DodgerBlue3 = "DodgerBlue3" // R:24 G:116 B:205 DodgerBlue4 = "DodgerBlue4" // R:16 G:78 B:139 Firebrick = "firebrick" // R:178 G:34 B:34 Firebrick1 = "firebrick1" // R:255 G:48 B:48 Firebrick2 = "firebrick2" // R:238 G:44 B:44 Firebrick3 = "firebrick3" // R:205 G:38 B:38 Firebrick4 = "firebrick4" // R:139 G:26 B:26 FloralWhite = "FloralWhite" // R:255 G:250 B:240 ForestGreen = "ForestGreen" // R:34 G:139 B:34 Fuchsia = "fuchsia" // R:255 G:0 B:255 Gainsboro = "gainsboro" // R:220 G:220 B:220 GhostWhite = "GhostWhite" // R:248 G:248 B:255 Gold = "gold" // R:255 G:215 B:0 Gold1 = "gold1" // R:255 G:215 B:0 Gold2 = "gold2" // R:238 G:201 B:0 Gold3 = "gold3" // R:205 G:173 B:0 Gold4 = "gold4" // R:139 G:117 B:0 Goldenrod = "goldenrod" // R:218 G:165 B:32 Goldenrod1 = "goldenrod1" // R:255 G:193 B:37 Goldenrod2 = "goldenrod2" // R:238 G:180 B:34 Goldenrod3 = "goldenrod3" // R:205 G:155 B:29 Goldenrod4 = "goldenrod4" // R:139 G:105 B:20 Gray = "gray" // R:128 G:128 B:128 Gray0 = "gray0" // R:0 G:0 B:0 Gray1 = "gray1" // R:3 G:3 B:3 Gray10 = "gray10" // R:26 G:26 B:26 Gray100 = "gray100" // R:255 G:255 B:255 Gray11 = "gray11" // R:28 G:28 B:28 Gray12 = "gray12" // R:31 G:31 B:31 Gray13 = "gray13" // R:33 G:33 B:33 Gray14 = "gray14" // R:36 G:36 B:36 Gray15 = "gray15" // R:38 G:38 B:38 Gray16 = "gray16" // R:41 G:41 B:41 Gray17 = "gray17" // R:43 G:43 B:43 Gray18 = "gray18" // R:46 G:46 B:46 Gray19 = "gray19" // R:48 G:48 B:48 Gray2 = "gray2" // R:5 G:5 B:5 Gray20 = "gray20" // R:51 G:51 B:51 Gray21 = "gray21" // R:54 G:54 B:54 Gray22 = "gray22" // R:56 G:56 B:56 Gray23 = "gray23" // R:59 G:59 B:59 Gray24 = "gray24" // R:61 G:61 B:61 Gray25 = "gray25" // R:64 G:64 B:64 Gray26 = "gray26" // R:66 G:66 B:66 Gray27 = "gray27" // R:69 G:69 B:69 Gray28 = "gray28" // R:71 G:71 B:71 Gray29 = "gray29" // R:74 G:74 B:74 Gray3 = "gray3" // R:8 G:8 B:8 Gray30 = "gray30" // R:77 G:77 B:77 Gray31 = "gray31" // R:79 G:79 B:79 Gray32 = "gray32" // R:82 G:82 B:82 Gray33 = "gray33" // R:84 G:84 B:84 Gray34 = "gray34" // R:87 G:87 B:87 Gray35 = "gray35" // R:89 G:89 B:89 Gray36 = "gray36" // R:92 G:92 B:92 Gray37 = "gray37" // R:94 G:94 B:94 Gray38 = "gray38" // R:97 G:97 B:97 Gray39 = "gray39" // R:99 G:99 B:99 Gray4 = "gray4" // R:10 G:10 B:10 Gray40 = "gray40" // R:102 G:102 B:102 Gray41 = "gray41" // R:105 G:105 B:105 Gray42 = "gray42" // R:107 G:107 B:107 Gray43 = "gray43" // R:110 G:110 B:110 Gray44 = "gray44" // R:112 G:112 B:112 Gray45 = "gray45" // R:115 G:115 B:115 Gray46 = "gray46" // R:117 G:117 B:117 Gray47 = "gray47" // R:120 G:120 B:120 Gray48 = "gray48" // R:122 G:122 B:122 Gray49 = "gray49" // R:125 G:125 B:125 Gray5 = "gray5" // R:13 G:13 B:13 Gray50 = "gray50" // R:127 G:127 B:127 Gray51 = "gray51" // R:130 G:130 B:130 Gray52 = "gray52" // R:133 G:133 B:133 Gray53 = "gray53" // R:135 G:135 B:135 Gray54 = "gray54" // R:138 G:138 B:138 Gray55 = "gray55" // R:140 G:140 B:140 Gray56 = "gray56" // R:143 G:143 B:143 Gray57 = "gray57" // R:145 G:145 B:145 Gray58 = "gray58" // R:148 G:148 B:148 Gray59 = "gray59" // R:150 G:150 B:150 Gray6 = "gray6" // R:15 G:15 B:15 Gray60 = "gray60" // R:153 G:153 B:153 Gray61 = "gray61" // R:156 G:156 B:156 Gray62 = "gray62" // R:158 G:158 B:158 Gray63 = "gray63" // R:161 G:161 B:161 Gray64 = "gray64" // R:163 G:163 B:163 Gray65 = "gray65" // R:166 G:166 B:166 Gray66 = "gray66" // R:168 G:168 B:168 Gray67 = "gray67" // R:171 G:171 B:171 Gray68 = "gray68" // R:173 G:173 B:173 Gray69 = "gray69" // R:176 G:176 B:176 Gray7 = "gray7" // R:18 G:18 B:18 Gray70 = "gray70" // R:179 G:179 B:179 Gray71 = "gray71" // R:181 G:181 B:181 Gray72 = "gray72" // R:184 G:184 B:184 Gray73 = "gray73" // R:186 G:186 B:186 Gray74 = "gray74" // R:189 G:189 B:189 Gray75 = "gray75" // R:191 G:191 B:191 Gray76 = "gray76" // R:194 G:194 B:194 Gray77 = "gray77" // R:196 G:196 B:196 Gray78 = "gray78" // R:199 G:199 B:199 Gray79 = "gray79" // R:201 G:201 B:201 Gray8 = "gray8" // R:20 G:20 B:20 Gray80 = "gray80" // R:204 G:204 B:204 Gray81 = "gray81" // R:207 G:207 B:207 Gray82 = "gray82" // R:209 G:209 B:209 Gray83 = "gray83" // R:212 G:212 B:212 Gray84 = "gray84" // R:214 G:214 B:214 Gray85 = "gray85" // R:217 G:217 B:217 Gray86 = "gray86" // R:219 G:219 B:219 Gray87 = "gray87" // R:222 G:222 B:222 Gray88 = "gray88" // R:224 G:224 B:224 Gray89 = "gray89" // R:227 G:227 B:227 Gray9 = "gray9" // R:23 G:23 B:23 Gray90 = "gray90" // R:229 G:229 B:229 Gray91 = "gray91" // R:232 G:232 B:232 Gray92 = "gray92" // R:235 G:235 B:235 Gray93 = "gray93" // R:237 G:237 B:237 Gray94 = "gray94" // R:240 G:240 B:240 Gray95 = "gray95" // R:242 G:242 B:242 Gray96 = "gray96" // R:245 G:245 B:245 Gray97 = "gray97" // R:247 G:247 B:247 Gray98 = "gray98" // R:250 G:250 B:250 Gray99 = "gray99" // R:252 G:252 B:252 Green = "green" // R:0 G:128 B:0 Green1 = "green1" // R:0 G:255 B:0 Green2 = "green2" // R:0 G:238 B:0 Green3 = "green3" // R:0 G:205 B:0 Green4 = "green4" // R:0 G:139 B:0 GreenYellow = "GreenYellow" // R:173 G:255 B:47 Grey = "grey" // R:128 G:128 B:128 Grey0 = "grey0" // R:0 G:0 B:0 Grey1 = "grey1" // R:3 G:3 B:3 Grey10 = "grey10" // R:26 G:26 B:26 Grey100 = "grey100" // R:255 G:255 B:255 Grey11 = "grey11" // R:28 G:28 B:28 Grey12 = "grey12" // R:31 G:31 B:31 Grey13 = "grey13" // R:33 G:33 B:33 Grey14 = "grey14" // R:36 G:36 B:36 Grey15 = "grey15" // R:38 G:38 B:38 Grey16 = "grey16" // R:41 G:41 B:41 Grey17 = "grey17" // R:43 G:43 B:43 Grey18 = "grey18" // R:46 G:46 B:46 Grey19 = "grey19" // R:48 G:48 B:48 Grey2 = "grey2" // R:5 G:5 B:5 Grey20 = "grey20" // R:51 G:51 B:51 Grey21 = "grey21" // R:54 G:54 B:54 Grey22 = "grey22" // R:56 G:56 B:56 Grey23 = "grey23" // R:59 G:59 B:59 Grey24 = "grey24" // R:61 G:61 B:61 Grey25 = "grey25" // R:64 G:64 B:64 Grey26 = "grey26" // R:66 G:66 B:66 Grey27 = "grey27" // R:69 G:69 B:69 Grey28 = "grey28" // R:71 G:71 B:71 Grey29 = "grey29" // R:74 G:74 B:74 Grey3 = "grey3" // R:8 G:8 B:8 Grey30 = "grey30" // R:77 G:77 B:77 Grey31 = "grey31" // R:79 G:79 B:79 Grey32 = "grey32" // R:82 G:82 B:82 Grey33 = "grey33" // R:84 G:84 B:84 Grey34 = "grey34" // R:87 G:87 B:87 Grey35 = "grey35" // R:89 G:89 B:89 Grey36 = "grey36" // R:92 G:92 B:92 Grey37 = "grey37" // R:94 G:94 B:94 Grey38 = "grey38" // R:97 G:97 B:97 Grey39 = "grey39" // R:99 G:99 B:99 Grey4 = "grey4" // R:10 G:10 B:10 Grey40 = "grey40" // R:102 G:102 B:102 Grey41 = "grey41" // R:105 G:105 B:105 Grey42 = "grey42" // R:107 G:107 B:107 Grey43 = "grey43" // R:110 G:110 B:110 Grey44 = "grey44" // R:112 G:112 B:112 Grey45 = "grey45" // R:115 G:115 B:115 Grey46 = "grey46" // R:117 G:117 B:117 Grey47 = "grey47" // R:120 G:120 B:120 Grey48 = "grey48" // R:122 G:122 B:122 Grey49 = "grey49" // R:125 G:125 B:125 Grey5 = "grey5" // R:13 G:13 B:13 Grey50 = "grey50" // R:127 G:127 B:127 Grey51 = "grey51" // R:130 G:130 B:130 Grey52 = "grey52" // R:133 G:133 B:133 Grey53 = "grey53" // R:135 G:135 B:135 Grey54 = "grey54" // R:138 G:138 B:138 Grey55 = "grey55" // R:140 G:140 B:140 Grey56 = "grey56" // R:143 G:143 B:143 Grey57 = "grey57" // R:145 G:145 B:145 Grey58 = "grey58" // R:148 G:148 B:148 Grey59 = "grey59" // R:150 G:150 B:150 Grey6 = "grey6" // R:15 G:15 B:15 Grey60 = "grey60" // R:153 G:153 B:153 Grey61 = "grey61" // R:156 G:156 B:156 Grey62 = "grey62" // R:158 G:158 B:158 Grey63 = "grey63" // R:161 G:161 B:161 Grey64 = "grey64" // R:163 G:163 B:163 Grey65 = "grey65" // R:166 G:166 B:166 Grey66 = "grey66" // R:168 G:168 B:168 Grey67 = "grey67" // R:171 G:171 B:171 Grey68 = "grey68" // R:173 G:173 B:173 Grey69 = "grey69" // R:176 G:176 B:176 Grey7 = "grey7" // R:18 G:18 B:18 Grey70 = "grey70" // R:179 G:179 B:179 Grey71 = "grey71" // R:181 G:181 B:181 Grey72 = "grey72" // R:184 G:184 B:184 Grey73 = "grey73" // R:186 G:186 B:186 Grey74 = "grey74" // R:189 G:189 B:189 Grey75 = "grey75" // R:191 G:191 B:191 Grey76 = "grey76" // R:194 G:194 B:194 Grey77 = "grey77" // R:196 G:196 B:196 Grey78 = "grey78" // R:199 G:199 B:199 Grey79 = "grey79" // R:201 G:201 B:201 Grey8 = "grey8" // R:20 G:20 B:20 Grey80 = "grey80" // R:204 G:204 B:204 Grey81 = "grey81" // R:207 G:207 B:207 Grey82 = "grey82" // R:209 G:209 B:209 Grey83 = "grey83" // R:212 G:212 B:212 Grey84 = "grey84" // R:214 G:214 B:214 Grey85 = "grey85" // R:217 G:217 B:217 Grey86 = "grey86" // R:219 G:219 B:219 Grey87 = "grey87" // R:222 G:222 B:222 Grey88 = "grey88" // R:224 G:224 B:224 Grey89 = "grey89" // R:227 G:227 B:227 Grey9 = "grey9" // R:23 G:23 B:23 Grey90 = "grey90" // R:229 G:229 B:229 Grey91 = "grey91" // R:232 G:232 B:232 Grey92 = "grey92" // R:235 G:235 B:235 Grey93 = "grey93" // R:237 G:237 B:237 Grey94 = "grey94" // R:240 G:240 B:240 Grey95 = "grey95" // R:242 G:242 B:242 Grey96 = "grey96" // R:245 G:245 B:245 Grey97 = "grey97" // R:247 G:247 B:247 Grey98 = "grey98" // R:250 G:250 B:250 Grey99 = "grey99" // R:252 G:252 B:252 Honeydew = "honeydew" // R:240 G:255 B:240 Honeydew1 = "honeydew1" // R:240 G:255 B:240 Honeydew2 = "honeydew2" // R:224 G:238 B:224 Honeydew3 = "honeydew3" // R:193 G:205 B:193 Honeydew4 = "honeydew4" // R:131 G:139 B:131 HotPink = "HotPink" // R:255 G:105 B:180 HotPink1 = "HotPink1" // R:255 G:110 B:180 HotPink2 = "HotPink2" // R:238 G:106 B:167 HotPink3 = "HotPink3" // R:205 G:96 B:144 HotPink4 = "HotPink4" // R:139 G:58 B:98 IndianRed = "IndianRed" // R:205 G:92 B:92 IndianRed1 = "IndianRed1" // R:255 G:106 B:106 IndianRed2 = "IndianRed2" // R:238 G:99 B:99 IndianRed3 = "IndianRed3" // R:205 G:85 B:85 IndianRed4 = "IndianRed4" // R:139 G:58 B:58 Indigo = "indigo" // R:75 G:0 B:130 Ivory = "ivory" // R:255 G:255 B:240 Ivory1 = "ivory1" // R:255 G:255 B:240 Ivory2 = "ivory2" // R:238 G:238 B:224 Ivory3 = "ivory3" // R:205 G:205 B:193 Ivory4 = "ivory4" // R:139 G:139 B:131 Khaki = "khaki" // R:240 G:230 B:140 Khaki1 = "khaki1" // R:255 G:246 B:143 Khaki2 = "khaki2" // R:238 G:230 B:133 Khaki3 = "khaki3" // R:205 G:198 B:115 Khaki4 = "khaki4" // R:139 G:134 B:78 Lavender = "lavender" // R:230 G:230 B:250 LavenderBlush = "LavenderBlush" // R:255 G:240 B:245 LavenderBlush1 = "LavenderBlush1" // R:255 G:240 B:245 LavenderBlush2 = "LavenderBlush2" // R:238 G:224 B:229 LavenderBlush3 = "LavenderBlush3" // R:205 G:193 B:197 LavenderBlush4 = "LavenderBlush4" // R:139 G:131 B:134 LawnGreen = "LawnGreen" // R:124 G:252 B:0 LemonChiffon = "LemonChiffon" // R:255 G:250 B:205 LemonChiffon1 = "LemonChiffon1" // R:255 G:250 B:205 LemonChiffon2 = "LemonChiffon2" // R:238 G:233 B:191 LemonChiffon3 = "LemonChiffon3" // R:205 G:201 B:165 LemonChiffon4 = "LemonChiffon4" // R:139 G:137 B:112 LightBlue = "LightBlue" // R:173 G:216 B:230 LightBlue1 = "LightBlue1" // R:191 G:239 B:255 LightBlue2 = "LightBlue2" // R:178 G:223 B:238 LightBlue3 = "LightBlue3" // R:154 G:192 B:205 LightBlue4 = "LightBlue4" // R:104 G:131 B:139 LightCoral = "LightCoral" // R:240 G:128 B:128 LightCyan = "LightCyan" // R:224 G:255 B:255 LightCyan1 = "LightCyan1" // R:224 G:255 B:255 LightCyan2 = "LightCyan2" // R:209 G:238 B:238 LightCyan3 = "LightCyan3" // R:180 G:205 B:205 LightCyan4 = "LightCyan4" // R:122 G:139 B:139 LightGoldenrod = "LightGoldenrod" // R:238 G:221 B:130 LightGoldenrod1 = "LightGoldenrod1" // R:255 G:236 B:139 LightGoldenrod2 = "LightGoldenrod2" // R:238 G:220 B:130 LightGoldenrod3 = "LightGoldenrod3" // R:205 G:190 B:112 LightGoldenrod4 = "LightGoldenrod4" // R:139 G:129 B:76 LightGoldenrodYellow = "LightGoldenrodYellow" // R:250 G:250 B:210 LightGray = "LightGray" // R:211 G:211 B:211 LightGreen = "LightGreen" // R:144 G:238 B:144 LightGrey = "LightGrey" // R:211 G:211 B:211 LightPink = "LightPink" // R:255 G:182 B:193 LightPink1 = "LightPink1" // R:255 G:174 B:185 LightPink2 = "LightPink2" // R:238 G:162 B:173 LightPink3 = "LightPink3" // R:205 G:140 B:149 LightPink4 = "LightPink4" // R:139 G:95 B:101 LightSalmon = "LightSalmon" // R:255 G:160 B:122 LightSalmon1 = "LightSalmon1" // R:255 G:160 B:122 LightSalmon2 = "LightSalmon2" // R:238 G:149 B:114 LightSalmon3 = "LightSalmon3" // R:205 G:129 B:98 LightSalmon4 = "LightSalmon4" // R:139 G:87 B:66 LightSeaGreen = "LightSeaGreen" // R:32 G:178 B:170 LightSkyBlue = "LightSkyBlue" // R:135 G:206 B:250 LightSkyBlue1 = "LightSkyBlue1" // R:176 G:226 B:255 LightSkyBlue2 = "LightSkyBlue2" // R:164 G:211 B:238 LightSkyBlue3 = "LightSkyBlue3" // R:141 G:182 B:205 LightSkyBlue4 = "LightSkyBlue4" // R:96 G:123 B:139 LightSlateBlue = "LightSlateBlue" // R:132 G:112 B:255 LightSlateGray = "LightSlateGray" // R:119 G:136 B:153 LightSlateGrey = "LightSlateGrey" // R:119 G:136 B:153 LightSteelBlue = "LightSteelBlue" // R:176 G:196 B:222 LightSteelBlue1 = "LightSteelBlue1" // R:202 G:225 B:255 LightSteelBlue2 = "LightSteelBlue2" // R:188 G:210 B:238 LightSteelBlue3 = "LightSteelBlue3" // R:162 G:181 B:205 LightSteelBlue4 = "LightSteelBlue4" // R:110 G:123 B:139 LightYellow = "LightYellow" // R:255 G:255 B:224 LightYellow1 = "LightYellow1" // R:255 G:255 B:224 LightYellow2 = "LightYellow2" // R:238 G:238 B:209 LightYellow3 = "LightYellow3" // R:205 G:205 B:180 LightYellow4 = "LightYellow4" // R:139 G:139 B:122 Lime = "lime" // R:0 G:255 B:0 LimeGreen = "LimeGreen" // R:50 G:205 B:50 Linen = "linen" // R:250 G:240 B:230 Magenta = "magenta" // R:255 G:0 B:255 Magenta1 = "magenta1" // R:255 G:0 B:255 Magenta2 = "magenta2" // R:238 G:0 B:238 Magenta3 = "magenta3" // R:205 G:0 B:205 Magenta4 = "magenta4" // R:139 G:0 B:139 Maroon = "maroon" // R:128 G:0 B:0 Maroon1 = "maroon1" // R:255 G:52 B:179 Maroon2 = "maroon2" // R:238 G:48 B:167 Maroon3 = "maroon3" // R:205 G:41 B:144 Maroon4 = "maroon4" // R:139 G:28 B:98 MediumAquamarine = "MediumAquamarine" // R:102 G:205 B:170 MediumBlue = "MediumBlue" // R:0 G:0 B:205 MediumOrchid = "MediumOrchid" // R:186 G:85 B:211 MediumOrchid1 = "MediumOrchid1" // R:224 G:102 B:255 MediumOrchid2 = "MediumOrchid2" // R:209 G:95 B:238 MediumOrchid3 = "MediumOrchid3" // R:180 G:82 B:205 MediumOrchid4 = "MediumOrchid4" // R:122 G:55 B:139 MediumPurple = "MediumPurple" // R:147 G:112 B:219 MediumPurple1 = "MediumPurple1" // R:171 G:130 B:255 MediumPurple2 = "MediumPurple2" // R:159 G:121 B:238 MediumPurple3 = "MediumPurple3" // R:137 G:104 B:205 MediumPurple4 = "MediumPurple4" // R:93 G:71 B:139 MediumSeaGreen = "MediumSeaGreen" // R:60 G:179 B:113 MediumSlateBlue = "MediumSlateBlue" // R:123 G:104 B:238 MediumSpringGreen = "MediumSpringGreen" // R:0 G:250 B:154 MediumTurquoise = "MediumTurquoise" // R:72 G:209 B:204 MediumVioletRed = "MediumVioletRed" // R:199 G:21 B:133 MidnightBlue = "MidnightBlue" // R:25 G:25 B:112 MintCream = "MintCream" // R:245 G:255 B:250 MistyRose = "MistyRose" // R:255 G:228 B:225 MistyRose1 = "MistyRose1" // R:255 G:228 B:225 MistyRose2 = "MistyRose2" // R:238 G:213 B:210 MistyRose3 = "MistyRose3" // R:205 G:183 B:181 MistyRose4 = "MistyRose4" // R:139 G:125 B:123 Moccasin = "moccasin" // R:255 G:228 B:181 NavajoWhite = "NavajoWhite" // R:255 G:222 B:173 NavajoWhite1 = "NavajoWhite1" // R:255 G:222 B:173 NavajoWhite2 = "NavajoWhite2" // R:238 G:207 B:161 NavajoWhite3 = "NavajoWhite3" // R:205 G:179 B:139 NavajoWhite4 = "NavajoWhite4" // R:139 G:121 B:94 Navy = "navy" // R:0 G:0 B:128 NavyBlue = "NavyBlue" // R:0 G:0 B:128 OldLace = "OldLace" // R:253 G:245 B:230 Olive = "olive" // R:128 G:128 B:0 OliveDrab = "OliveDrab" // R:107 G:142 B:35 OliveDrab1 = "OliveDrab1" // R:192 G:255 B:62 OliveDrab2 = "OliveDrab2" // R:179 G:238 B:58 OliveDrab3 = "OliveDrab3" // R:154 G:205 B:50 OliveDrab4 = "OliveDrab4" // R:105 G:139 B:34 Orange = "orange" // R:255 G:165 B:0 Orange1 = "orange1" // R:255 G:165 B:0 Orange2 = "orange2" // R:238 G:154 B:0 Orange3 = "orange3" // R:205 G:133 B:0 Orange4 = "orange4" // R:139 G:90 B:0 OrangeRed = "OrangeRed" // R:255 G:69 B:0 OrangeRed1 = "OrangeRed1" // R:255 G:69 B:0 OrangeRed2 = "OrangeRed2" // R:238 G:64 B:0 OrangeRed3 = "OrangeRed3" // R:205 G:55 B:0 OrangeRed4 = "OrangeRed4" // R:139 G:37 B:0 Orchid = "orchid" // R:218 G:112 B:214 Orchid1 = "orchid1" // R:255 G:131 B:250 Orchid2 = "orchid2" // R:238 G:122 B:233 Orchid3 = "orchid3" // R:205 G:105 B:201 Orchid4 = "orchid4" // R:139 G:71 B:137 PaleGoldenrod = "PaleGoldenrod" // R:238 G:232 B:170 PaleGreen = "PaleGreen" // R:152 G:251 B:152 PaleGreen1 = "PaleGreen1" // R:154 G:255 B:154 PaleGreen2 = "PaleGreen2" // R:144 G:238 B:144 PaleGreen3 = "PaleGreen3" // R:124 G:205 B:124 PaleGreen4 = "PaleGreen4" // R:84 G:139 B:84 PaleTurquoise = "PaleTurquoise" // R:175 G:238 B:238 PaleTurquoise1 = "PaleTurquoise1" // R:187 G:255 B:255 PaleTurquoise2 = "PaleTurquoise2" // R:174 G:238 B:238 PaleTurquoise3 = "PaleTurquoise3" // R:150 G:205 B:205 PaleTurquoise4 = "PaleTurquoise4" // R:102 G:139 B:139 PaleVioletRed = "PaleVioletRed" // R:219 G:112 B:147 PaleVioletRed1 = "PaleVioletRed1" // R:255 G:130 B:171 PaleVioletRed2 = "PaleVioletRed2" // R:238 G:121 B:159 PaleVioletRed3 = "PaleVioletRed3" // R:205 G:104 B:127 PaleVioletRed4 = "PaleVioletRed4" // R:139 G:71 B:93 PapayaWhip = "PapayaWhip" // R:255 G:239 B:213 PeachPuff = "PeachPuff" // R:255 G:218 B:185 PeachPuff1 = "PeachPuff1" // R:255 G:218 B:185 PeachPuff2 = "PeachPuff2" // R:238 G:203 B:173 PeachPuff3 = "PeachPuff3" // R:205 G:175 B:149 PeachPuff4 = "PeachPuff4" // R:139 G:119 B:101 Peru = "peru" // R:205 G:133 B:63 Pink = "pink" // R:255 G:192 B:203 Pink1 = "pink1" // R:255 G:181 B:197 Pink2 = "pink2" // R:238 G:169 B:184 Pink3 = "pink3" // R:205 G:145 B:158 Pink4 = "pink4" // R:139 G:99 B:108 Plum = "plum" // R:221 G:160 B:221 Plum1 = "plum1" // R:255 G:187 B:255 Plum2 = "plum2" // R:238 G:174 B:238 Plum3 = "plum3" // R:205 G:150 B:205 Plum4 = "plum4" // R:139 G:102 B:139 PowderBlue = "PowderBlue" // R:176 G:224 B:230 Purple = "purple" // R:128 G:0 B:128 Purple1 = "purple1" // R:155 G:48 B:255 Purple2 = "purple2" // R:145 G:44 B:238 Purple3 = "purple3" // R:125 G:38 B:205 Purple4 = "purple4" // R:85 G:26 B:139 Red = "red" // R:255 G:0 B:0 Red1 = "red1" // R:255 G:0 B:0 Red2 = "red2" // R:238 G:0 B:0 Red3 = "red3" // R:205 G:0 B:0 Red4 = "red4" // R:139 G:0 B:0 RosyBrown = "RosyBrown" // R:188 G:143 B:143 RosyBrown1 = "RosyBrown1" // R:255 G:193 B:193 RosyBrown2 = "RosyBrown2" // R:238 G:180 B:180 RosyBrown3 = "RosyBrown3" // R:205 G:155 B:155 RosyBrown4 = "RosyBrown4" // R:139 G:105 B:105 RoyalBlue = "RoyalBlue" // R:65 G:105 B:225 RoyalBlue1 = "RoyalBlue1" // R:72 G:118 B:255 RoyalBlue2 = "RoyalBlue2" // R:67 G:110 B:238 RoyalBlue3 = "RoyalBlue3" // R:58 G:95 B:205 RoyalBlue4 = "RoyalBlue4" // R:39 G:64 B:139 SaddleBrown = "SaddleBrown" // R:139 G:69 B:19 Salmon = "salmon" // R:250 G:128 B:114 Salmon1 = "salmon1" // R:255 G:140 B:105 Salmon2 = "salmon2" // R:238 G:130 B:98 Salmon3 = "salmon3" // R:205 G:112 B:84 Salmon4 = "salmon4" // R:139 G:76 B:57 SandyBrown = "SandyBrown" // R:244 G:164 B:96 SeaGreen = "SeaGreen" // R:46 G:139 B:87 SeaGreen1 = "SeaGreen1" // R:84 G:255 B:159 SeaGreen2 = "SeaGreen2" // R:78 G:238 B:148 SeaGreen3 = "SeaGreen3" // R:67 G:205 B:128 SeaGreen4 = "SeaGreen4" // R:46 G:139 B:87 Seashell = "seashell" // R:255 G:245 B:238 Seashell1 = "seashell1" // R:255 G:245 B:238 Seashell2 = "seashell2" // R:238 G:229 B:222 Seashell3 = "seashell3" // R:205 G:197 B:191 Seashell4 = "seashell4" // R:139 G:134 B:130 Sienna = "sienna" // R:160 G:82 B:45 Sienna1 = "sienna1" // R:255 G:130 B:71 Sienna2 = "sienna2" // R:238 G:121 B:66 Sienna3 = "sienna3" // R:205 G:104 B:57 Sienna4 = "sienna4" // R:139 G:71 B:38 Silver = "silver" // R:192 G:192 B:192 SkyBlue = "SkyBlue" // R:135 G:206 B:235 SkyBlue1 = "SkyBlue1" // R:135 G:206 B:255 SkyBlue2 = "SkyBlue2" // R:126 G:192 B:238 SkyBlue3 = "SkyBlue3" // R:108 G:166 B:205 SkyBlue4 = "SkyBlue4" // R:74 G:112 B:139 SlateBlue = "SlateBlue" // R:106 G:90 B:205 SlateBlue1 = "SlateBlue1" // R:131 G:111 B:255 SlateBlue2 = "SlateBlue2" // R:122 G:103 B:238 SlateBlue3 = "SlateBlue3" // R:105 G:89 B:205 SlateBlue4 = "SlateBlue4" // R:71 G:60 B:139 SlateGray = "SlateGray" // R:112 G:128 B:144 SlateGray1 = "SlateGray1" // R:198 G:226 B:255 SlateGray2 = "SlateGray2" // R:185 G:211 B:238 SlateGray3 = "SlateGray3" // R:159 G:182 B:205 SlateGray4 = "SlateGray4" // R:108 G:123 B:139 SlateGrey = "SlateGrey" // R:112 G:128 B:144 Snow = "snow" // R:255 G:250 B:250 Snow1 = "snow1" // R:255 G:250 B:250 Snow2 = "snow2" // R:238 G:233 B:233 Snow3 = "snow3" // R:205 G:201 B:201 Snow4 = "snow4" // R:139 G:137 B:137 SpringGreen = "SpringGreen" // R:0 G:255 B:127 SpringGreen1 = "SpringGreen1" // R:0 G:255 B:127 SpringGreen2 = "SpringGreen2" // R:0 G:238 B:118 SpringGreen3 = "SpringGreen3" // R:0 G:205 B:102 SpringGreen4 = "SpringGreen4" // R:0 G:139 B:69 SteelBlue = "SteelBlue" // R:70 G:130 B:180 SteelBlue1 = "SteelBlue1" // R:99 G:184 B:255 SteelBlue2 = "SteelBlue2" // R:92 G:172 B:238 SteelBlue3 = "SteelBlue3" // R:79 G:148 B:205 SteelBlue4 = "SteelBlue4" // R:54 G:100 B:139 Tan = "tan" // R:210 G:180 B:140 Tan1 = "tan1" // R:255 G:165 B:79 Tan2 = "tan2" // R:238 G:154 B:73 Tan3 = "tan3" // R:205 G:133 B:63 Tan4 = "tan4" // R:139 G:90 B:43 Teal = "teal" // R:0 G:128 B:128 Thistle = "thistle" // R:216 G:191 B:216 Thistle1 = "thistle1" // R:255 G:225 B:255 Thistle2 = "thistle2" // R:238 G:210 B:238 Thistle3 = "thistle3" // R:205 G:181 B:205 Thistle4 = "thistle4" // R:139 G:123 B:139 Tomato = "tomato" // R:255 G:99 B:71 Tomato1 = "tomato1" // R:255 G:99 B:71 Tomato2 = "tomato2" // R:238 G:92 B:66 Tomato3 = "tomato3" // R:205 G:79 B:57 Tomato4 = "tomato4" // R:139 G:54 B:38 Turquoise = "turquoise" // R:64 G:224 B:208 Turquoise1 = "turquoise1" // R:0 G:245 B:255 Turquoise2 = "turquoise2" // R:0 G:229 B:238 Turquoise3 = "turquoise3" // R:0 G:197 B:205 Turquoise4 = "turquoise4" // R:0 G:134 B:139 Violet = "violet" // R:238 G:130 B:238 VioletRed = "VioletRed" // R:208 G:32 B:144 VioletRed1 = "VioletRed1" // R:255 G:62 B:150 VioletRed2 = "VioletRed2" // R:238 G:58 B:140 VioletRed3 = "VioletRed3" // R:205 G:50 B:120 VioletRed4 = "VioletRed4" // R:139 G:34 B:82 Wheat = "wheat" // R:245 G:222 B:179 Wheat1 = "wheat1" // R:255 G:231 B:186 Wheat2 = "wheat2" // R:238 G:216 B:174 Wheat3 = "wheat3" // R:205 G:186 B:150 Wheat4 = "wheat4" // R:139 G:126 B:102 White = "white" // R:255 G:255 B:255 WhiteSmoke = "WhiteSmoke" // R:245 G:245 B:245 Yellow = "yellow" // R:255 G:255 B:0 Yellow1 = "yellow1" // R:255 G:255 B:0 Yellow2 = "yellow2" // R:238 G:238 B:0 Yellow3 = "yellow3" // R:205 G:205 B:0 Yellow4 = "yellow4" // R:139 G:139 B:0 YellowGreen = "YellowGreen" // R:154 G:205 B:50 ) Named colors. Writing, for example, 'Background(Agua)' is the same as writing 'Background("agua")' but the compiler can catch any typos in the color name. View Source const ( SystemActiveAreaFill = "systemActiveAreaFill" SystemAlertBackgroundActive = "systemAlertBackgroundActive" SystemAlertBackgroundInactive = "systemAlertBackgroundInactive" SystemAlternatePrimaryHighlightColor = "systemAlternatePrimaryHighlightColor" SystemAppleGuideCoachmark = "systemAppleGuideCoachmark" SystemBevelActiveDark = "systemBevelActiveDark" SystemBevelActiveLight = "systemBevelActiveLight" SystemBevelInactiveDark = "systemBevelInactiveDark" SystemBevelInactiveLight = "systemBevelInactiveLight" SystemBlack = "systemBlack" SystemButtonActiveDarkHighlight = "systemButtonActiveDarkHighlight" SystemButtonActiveDarkShadow = "systemButtonActiveDarkShadow" SystemButtonActiveLightHighlight = "systemButtonActiveLightHighlight" SystemButtonActiveLightShadow = "systemButtonActiveLightShadow" SystemButtonFaceActive = "systemButtonFaceActive" SystemButtonFaceInactive = "systemButtonFaceInactive" SystemButtonFacePressed = "systemButtonFacePressed" SystemButtonFrame = "systemButtonFrame" SystemButtonFrameActive = "systemButtonFrameActive" SystemButtonFrameInactive = "systemButtonFrameInactive" SystemButtonInactiveDarkHighlight = "systemButtonInactiveDarkHighlight" SystemButtonInactiveDarkShadow = "systemButtonInactiveDarkShadow" SystemButtonInactiveLightHighlight = "systemButtonInactiveLightHighlight" SystemButtonInactiveLightShadow = "systemButtonInactiveLightShadow" SystemButtonPressedDarkHighlight = "systemButtonPressedDarkHighlight" SystemButtonPressedDarkShadow = "systemButtonPressedDarkShadow" SystemButtonPressedLightHighlight = "systemButtonPressedLightHighlight" SystemButtonPressedLightShadow = "systemButtonPressedLightShadow" SystemChasingArrows = "systemChasingArrows" SystemControlAccentColor = "systemControlAccentColor" SystemControlTextColor = "systemControlTextColor" SystemDialogBackgroundActive = "systemDialogBackgroundActive" SystemDialogBackgroundInactive = "systemDialogBackgroundInactive" SystemDisabledControlTextColor = "systemDisabledControlTextColor" SystemDocumentWindowBackground = "systemDocumentWindowBackground" SystemDragHilite = "systemDragHilite" SystemDrawerBackground = "systemDrawerBackground" SystemFinderWindowBackground = "systemFinderWindowBackground" SystemFocusHighlight = "systemFocusHighlight" SystemHighlightAlternate = "systemHighlightAlternate" SystemHighlightSecondary = "systemHighlightSecondary" SystemIconLabelBackground = "systemIconLabelBackground" SystemIconLabelBackgroundSelected = "systemIconLabelBackgroundSelected" SystemLabelColor = "systemLabelColor" SystemLinkColor = "systemLinkColor" SystemListViewBackground = "systemListViewBackground" SystemListViewColumnDivider = "systemListViewColumnDivider" SystemListViewEvenRowBackground = "systemListViewEvenRowBackground" SystemListViewOddRowBackground = "systemListViewOddRowBackground" SystemListViewSeparator = "systemListViewSeparator" SystemListViewSortColumnBackground = "systemListViewSortColumnBackground" SystemMenuActive = "systemMenuActive" SystemMenuBackground = "systemMenuBackground" SystemMenuBackgroundSelected = "systemMenuBackgroundSelected" SystemModelessDialogBackgroundActive = "systemModelessDialogBackgroundActive" SystemModelessDialogBackgroundInactive = "systemModelessDialogBackgroundInactive" SystemMovableModalBackground = "systemMovableModalBackground" SystemNotificationWindowBackground = "systemNotificationWindowBackground" SystemPlaceholderTextColor = "systemPlaceholderTextColor" SystemPopupArrowActive = "systemPopupArrowActive" SystemPopupArrowInactive = "systemPopupArrowInactive" SystemPopupArrowPressed = "systemPopupArrowPressed" SystemPrimaryHighlightColor = "systemPrimaryHighlightColor" SystemScrollBarDelimiterActive = "systemScrollBarDelimiterActive" SystemScrollBarDelimiterInactive = "systemScrollBarDelimiterInactive" SystemSecondaryHighlightColor = "systemSecondaryHighlightColor" SystemSelectedTabTextColor = "systemSelectedTabTextColor" SystemSelectedTextBackgroundColor = "systemSelectedTextBackgroundColor" SystemSelectedTextColor = "systemSelectedTextColor" SystemSeparatorColor = "systemSeparatorColor" SystemSheetBackground = "systemSheetBackground" SystemSheetBackgroundOpaque = "systemSheetBackgroundOpaque" SystemSheetBackgroundTransparent = "systemSheetBackgroundTransparent" SystemStaticAreaFill = "systemStaticAreaFill" SystemTextBackgroundColor = "systemTextBackgroundColor" SystemTextColor = "systemTextColor" SystemToolbarBackground = "systemToolbarBackground" SystemTransparent = "systemTransparent" SystemUtilityWindowBackgroundActive = "systemUtilityWindowBackgroundActive" SystemUtilityWindowBackgroundInactive = "systemUtilityWindowBackgroundInactive" SystemWhite = "systemWhite" SystemWindowBackgroundColor = "systemWindowBackgroundColor" SystemWindowBackgroundColor1 = "systemWindowBackgroundColor1" SystemWindowBackgroundColor2 = "systemWindowBackgroundColor2" SystemWindowBackgroundColor3 = "systemWindowBackgroundColor3" SystemWindowBackgroundColor4 = "systemWindowBackgroundColor4" SystemWindowBackgroundColor5 = "systemWindowBackgroundColor5" SystemWindowBackgroundColor6 = "systemWindowBackgroundColor6" SystemWindowBackgroundColor7 = "systemWindowBackgroundColor7" SystemWindowBody = "systemWindowBody" ) Additional system colors available on macOS. View Source const ( System3dDarkShadow = "system3dDarkShadow" System3dLight = "system3dLight" SystemActiveBorder = "systemActiveBorder" SystemActiveCaption = "systemActiveCaption" SystemAppWorkspace = "systemAppWorkspace" SystemBackground = "systemBackground" SystemButtonHighlight = "systemButtonHighlight" SystemButtonShadow = "systemButtonShadow" SystemButtonText = "systemButtonText" SystemCaptionText = "systemCaptionText" SystemDisabledText = "systemDisabledText" SystemGrayText = "systemGrayText" SystemHighlightText = "systemHighlightText" SystemInactiveBorder = "systemInactiveBorder" SystemInactiveCaption = "systemInactiveCaption" SystemInactiveCaptionText = "systemInactiveCaptionText" SystemInfoBackground = "systemInfoBackground" SystemInfoText = "systemInfoText" SystemMenuText = "systemMenuText" SystemScrollbar = "systemScrollbar" SystemWindow = "systemWindow" SystemWindowFrame = "systemWindowFrame" SystemWindowText = "systemWindowText" ) Additional system colors available on Windows. Note that the actual color values depend on the currently active OS theme. View Source const ( SystemButtonFace = "systemButtonFace" SystemHighlight = "systemHighlight" SystemMenu = "systemMenu" ) Additional system colors available both on macOS and Windows. View Source const ( // ThemeEnvVar, if non-blank and containing a valid built-in theme // name, is used to set the default application theme. Calling // StyleThemeUse() will override the default. ThemeEnvVar = "TK9_THEME" // ScaleEnvVar, if a valid (floating point) number, sets the TkScaling // value at package initialization to NativeScaling*TK9_SCALE. ScaleEnvVar = "TK9_SCALE" ) View Source const ( // Errors will panic with a stack trace. PanicOnError = iota // Errors will be recorded into the Error variable using errors.Join CollectErrors ) Error modes View Source const ( Wait = cursor("wait") ) Additional macOS and Windows cursors. Variables P View Source var ( // Themes register Tk themes. User code must not directly mutate Themes. Themes = map[ThemeKey]Theme{} AlreadyActivated = errors.New("Already activated") AlreadyRegistered = errors.New("Already registered") Finalized = errors.New("Finalized") NotActivated = errors.New("Not activated") NotFound = errors.New("Not found") ) View Source var App = &Window{} App is the main/root application window. View Source var Error error Error records errors when CollectErrors is true. View Source var ErrorMode int ErrorMode selects the action taken on errors. View Source var NativeScaling float64 NativeScaling is the value returned by TKScaling in package initialization before it is possibly changed using the ScaleEnvVar value. Functions P func ActivateTheme P added in v0.53.0 func ActivateTheme(name string) (err error) ActivateTheme searches Themes to find first theme named like 'name' and call its Activate method. The search is case insensitive, using strings.ToLower, and white space is normalized. If there's no match, ActivateTheme returns NotFound. func Bell P added in v0.4.8 func Bell(options ...Opt) * Description Bell -- Ring a display's bell Description P This command rings the bell on the display for window and returns an empty string. If the -displayof option is omitted, the display of the application's main window is used by default. The command uses the current bell-related settings for the display, which may be modified with programs such as xset. If -nice is not specified, this command also resets the screen saver for the screen. Some screen savers will ignore this, but others will reset so that the screen becomes visible again. * Displayof window * Nice More information might be available at the Tcl/Tk bell page. func Bind P added in v0.4.10 func Bind(options ...any) * Description bind -- Arrange for X events to invoke functions Description P Bind tag options... The bind command associates commands with X events. If all three arguments are specified, bind will arrange for script (a Tcl script called the "binding script") to be evaluated whenever the event(s) given by sequence occur in the window(s) identified by tag. If script is prefixed with a "+", then it is appended to any existing binding for sequence; otherwise script replaces any existing binding. If script is an empty string then the current binding for sequence is destroyed, leaving sequence unbound. In all of the cases where a script argument is provided, bind returns an empty string. If sequence is specified without a script, then the script currently bound to sequence is returned, or an empty string is returned if there is no binding for sequence. If neither sequence nor script is specified, then the return value is a list whose elements are all the sequences for which there exist bindings for tag. The tag argument determines which window(s) the binding applies to. If tag begins with a dot, as in .a.b.c, then it must be the path name for a window; otherwise it may be an arbitrary string. Each window has an associated list of tags, and a binding applies to a particular window if its tag is among those specified for the window. Although the bindtags command may be used to assign an arbitrary set of binding tags to a window, the default binding tags provide the following behavior: * If a tag is the name of an internal window the binding applies to that window. * If the tag is the name of a class of widgets, such as Button, the binding applies to all widgets in that class. * If the tag is the name of a toplevel window the binding applies to the toplevel window and all its internal windows. * If tag has the value all, the binding applies to all windows in the application. Example usage in _examples/events.go. Additional information might be available at the Tcl/Tk bind page. func ChooseColor P added in v0.5.18 func ChooseColor(options ...Opt) string * Description ChooseColor -- pops up a dialog box for the user to select a color. Description P ChooseColor pops up a dialog box for the user to select a color. The following option-value pairs are possible as command line arguments: * Initialcolor color Specifies the color to display in the color dialog when it pops up. color must be in a form acceptable to the Tk_GetColor function. * Parent window Makes window the logical parent of the color dialog. The color dialog is displayed on top of its parent window. * Title titleString Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title will be displayed. If the user selects a color, ChooseColor will return the name of the color in a form acceptable to Tk_GetColor. If the user cancels the operation, both commands will return the empty string. More information might be available at the Tcl/Tk choosecolor page. func ChooseDirectory P added in v0.5.18 func ChooseDirectory(options ...Opt) string * Description ChooseDirectory -- pops up a dialog box for the user to select a directory. Description P The procedure tk_chooseDirectory pops up a dialog box for the user to select a directory. The following option-value pairs are possible as command line arguments: * Initialdir dirname Specifies that the directories in directory should be displayed when the dialog pops up. If this parameter is not specified, the initial directory defaults to the current working directory on non-Windows systems and on Windows systems prior to Vista. On Vista and later systems, the initial directory defaults to the last user-selected directory for the application. If the parameter specifies a relative path, the return value will convert the relative path to an absolute path. * Message string Specifies a message to include in the client area of the dialog. This is only available on Mac OS X. * Mustexist boolean Specifies whether the user may specify non-existent directories. If this parameter is true, then the user may only select directories that already exist. The default value is false. * Parent window Makes window the logical parent of the dialog. The dialog is displayed on top of its parent window. On Mac OS X, this turns the file dialog into a sheet attached to the parent window. * Title titleString Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title will be displayed. More information might be available at the Tcl/Tk chooseDirectory page. func ClipboardAppend P added in v0.5.18 func ClipboardAppend(data string, options ...Opt) * Description ClipboardAppend -- Manipulate Tk clipboard Description P This command provides a Tcl interface to the Tk clipboard, which stores data for later retrieval using the selection mechanism (via the -selection CLIPBOARD option). In order to copy data into the clipboard, clipboard clear must be called, followed by a sequence of one or more calls to clipboard append. To ensure that the clipboard is updated atomically, all appends should be completed before returning to the event loop. ClipboardAppend appends 'data' to the clipboard on window's display in the form given by type with the representation given by format and claims ownership of the clipboard on window's display. * Displayof window * Format format The format argument specifies the representation that should be used to transmit the selection to the requester (the second column of Table 2 of the ICCCM), and defaults to STRING. If format is STRING, the selection is transmitted as 8-bit ASCII characters. If format is ATOM, then the data is divided into fields separated by white space; each field is converted to its atom value, and the 32-bit atom value is transmitted instead of the atom name. For any other format, data is divided into fields separated by white space and each field is converted to a 32-bit integer; an array of integers is transmitted to the selection requester. Note that strings passed to clipboard append are concatenated before conversion, so the caller must take care to ensure appropriate spacing across string boundaries. All items appended to the clipboard with the same type must have the same format. The format argument is needed only for compatibility with clipboard requesters that do not use Tk. If the Tk toolkit is being used to retrieve the CLIPBOARD selection then the value is converted back to a string at the requesting end, so format is irrelevant. * Type type Type specifies the form in which the selection is to be returned (the desired "target" for conversion, in ICCCM terminology), and should be an atom name such as STRING or FILE_NAME; see the Inter-Client Communication Conventions Manual for complete details. Type defaults to STRING. More information might be available at the Tcl/Tk clipboard page. func ClipboardClear P added in v0.5.18 func ClipboardClear(options ...Opt) * Description ClipboardClear -- Manipulate Tk clipboard Description P Claims ownership of the clipboard on window's display and removes any previous contents. Window defaults to App. Returns an empty string. More information might be available at the Tcl/Tk clipboard page. func ClipboardGet P added in v0.5.18 func ClipboardGet(options ...Opt) string * Description ClipboardGet -- Manipulate Tk clipboard Description P Retrieve data from the clipboard on window's display. Window defaults to App. * Displayof window * Type type Type specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING. This command is equivalent to [SelectionGet](Selection ("CLIPBOARD"). Note that on modern X11 systems, the most useful type to retrieve for transferred strings is not STRING, but rather UTF8_STRING. More information might be available at the Tcl/Tk clipboard page. func CourierFont P added in v0.19.1 func CourierFont() string CourierFont returns "{courier new}" on Windows and "courier" elsewhere. func CurrentThemeName P added in v0.53.0 func CurrentThemeName() (r string) CurrentThemeName returns the name of the currently activated theme, if any. func Destroy P added in v0.4.8 func Destroy(options ...Opt) * Description Destroy -- Destroy one or more windows Description P This command deletes the windows given by the window arguments, plus all of their descendants. If a window "." (App) is deleted then all windows will be destroyed and the application will (normally) exit. The windows are destroyed in order, and if an error occurs in destroying a window the command aborts without destroying the remaining windows. No error is returned if window does not exist. func Finalize P added in v0.1.2 func Finalize() (err error) Finalize releases all resources held, if any. This may include temporary files. Finalize is intended to be called on process shutdown only. func Focus P added in v0.4.10 func Focus(options ...Opt) string * Description * Quirks Focus -- Manage the input focus Description P The focus command is used to manage the Tk input focus. At any given time, one window on each display is designated as the focus window; any key press or key release events for the display are sent to that window. It is normally up to the window manager to redirect the focus among the top-level windows of a display. For example, some window managers automatically set the input focus to a top-level window whenever the mouse enters it; others redirect the input focus only when the user clicks on a window. Usually the window manager will set the focus only to top-level windows, leaving it up to the application to redirect the focus among the children of the top-level. Tk remembers one focus window for each top-level (the most recent descendant of that top-level to receive the focus); when the window manager gives the focus to a top-level, Tk automatically redirects it to the remembered window. Within a top-level Tk uses an explicit focus model by default. Moving the mouse within a top-level does not normally change the focus; the focus changes only when a widget decides explicitly to claim the focus (e.g., because of a button click), or when the user types a key such as Tab that moves the focus. The Tcl procedure tk_focusFollowsMouse may be invoked to create an implicit focus model: it reconfigures Tk so that the focus is set to a window whenever the mouse enters it. The Tcl procedures tk_focusNext and tk_focusPrev implement a focus order among the windows of a top-level; they are used in the default bindings for Tab and Shift-Tab, among other things. The focus command can take any of the following forms: Focus() Returns the path name of the focus window on the display containing the application's main window, or an empty string if no window in this application has the focus on that display. Note: it is better to specify the display explicitly using -displayof (see below) so that the code will work in applications using multiple displays. Focus(window) If the application currently has the input focus on window's display, this command resets the input focus for window's display to window and returns an empty string. If the application does not currently have the input focus on window's display, window will be remembered as the focus for its top-level; the next time the focus arrives at the top-level, Tk will redirect it to window. If window is an empty string then the command does nothing. Focus(Displayof(window)) Returns the name of the focus window on the display containing window. If the focus window for window's display is not in this application, the return value is an empty string. Focus(Force(window)) Sets the focus of window's display to window, even if the application does not currently have the input focus for the display. This command should be used sparingly, if at all. In normal usage, an application should not claim the focus for itself; instead, it should wait for the window manager to give it the focus. If window is an empty string then the command does nothing. Focus(Lastfor(window)) Returns the name of the most recent window to have the input focus among all the windows in the same top-level as window. If no window in that top-level has ever had the input focus, or if the most recent focus window has been deleted, then the name of the top-level is returned. The return value is the window that will receive the input focus the next time the window manager gives the focus to the top-level. Quirks P When an internal window receives the input focus, Tk does not actually set the X focus to that window; as far as X is concerned, the focus will stay on the top-level window containing the window with the focus. However, Tk generates FocusIn and FocusOut events just as if the X focus were on the internal window. This approach gets around a number of problems that would occur if the X focus were actually moved; the fact that the X focus is on the top-level is invisible unless you use C code to query the X server directly. More information might be available at the Tcl/Tk focus page. func FontConfigure P added in v0.34.0 func FontConfigure(name string, options ...any) []string * Description font -- Create and inspect fonts. Description P Query or modify the desired attributes for the named font called fontname. If no option is specified, returns a list describing all the options and their values for fontname. If a single option is specified with no value, then returns the current value of that attribute. If one or more option-value pairs are specified, then the command modifies the given named font to have the given values; in this case, all widgets using that font will redisplay themselves using the new attributes for the font. See FONT OPTIONS below for a list of the possible attributes. Note that on Aqua/macOS, the system fonts (see PLATFORM SPECIFIC FONTS below) may not be actually altered because they are implemented by the system theme. To achieve the effect of modification, use font actual to get their configuration and font create to synthesize a copy of the font which can be modified. More information might be available at the Tcl/Tk font page. func FontFamilies P added in v0.5.18 func FontFamilies(options ...Opt) []string * Description FontFamilies -- Create and inspect fonts. Description P The return value is a list of the case-insensitive names of all font families that exist on window's display. If the Displayof argument is omitted, it defaults to the main window. * Displayof window Additional information might be available at the Tcl/Tk font page. func Fontchooser P added in v0.5.18 func Fontchooser(options ...Opt) * Description Fontchooser -- control font selection dialog Description P The tk fontchooser command controls the Tk font selection dialog. It uses the native platform font selection dialog where available, or a dialog implemented in Tcl otherwise. Unlike most of the other Tk dialog commands, tk fontchooser does not return an immediate result, as on some platforms (Mac OS X) the standard font dialog is modeless while on others (Windows) it is modal. To get the user-selected font use FontchooserFont() from a handler assigned via Command. Set one or more of the configurations options below (analogous to Tk widget configuration). * Parent Specifies/returns the logical parent window of the font selection dialog (similar to the -parent option to other dialogs). The font selection dialog is hidden if it is visible when the parent window is destroyed. * Title Specifies/returns the title of the dialog. Has no effect on platforms where the font selection dialog does not support titles. * FontFace Specifies/returns the font that is currently selected in the dialog if it is visible, or that will be initially selected when the dialog is shown (if supported by the platform). Can be set to the empty string to indicate that no font should be selected. Fonts can be specified in any form given by the "FONT DESCRIPTION" section in the font manual page. * Command Specifies the command called when a font selection has been made by the user. To obtain the font description, call FontchooserFont from the handler. Additional information might be available at the Tcl/Tk fontchooser page. func FontchooserFont P added in v0.5.18 func FontchooserFont() []string * Description FontchooserFont -- control font selection dialog Description P Returns the selected font description in the form family size style... Additional information might be available at the Tcl/Tk fontchooser page. func FontchooserHide P added in v0.5.18 func FontchooserHide() * Description FontchooserHide -- control font selection dialog Description P Hide the font selection dialog if it is visible and cause any pending tk fontchooser show command to return. Additional information might be available at the Tcl/Tk fontchooser page. func FontchooserShow P added in v0.5.18 func FontchooserShow() * Description FontchooserShow -- control font selection dialog Description P Show the font selection dialog. Depending on the platform, may return immediately or only once the dialog has been withdrawn. Additional information might be available at the Tcl/Tk fontchooser page. func GetOpenFile P added in v0.5.18 func GetOpenFile(options ...Opt) (r []string) * Description GetOpenFile -- pop up a dialog box for the user to select a file to open. Description P GetOpenFile pops up a dialog box for the user to select a file to open. The function is usually associated with the Open command in the File menu. Its purpose is for the user to select an existing file only. If the user enters a non-existent file, the dialog box gives the user an error prompt and requires the user to give an alternative selection. If an application allows the user to create new files, it should do so by providing a separate New menu command. * Defaultextension extension Specifies a string that will be appended to the filename if the user enters a filename without an extension. The default value is the empty string, which means no extension will be appended to the filename in any case. This option is ignored on Mac OS X, which does not require extensions to filenames, and the UNIX implementation guesses reasonable values for this from the -filetypes option when this is not supplied. * Filetypes filePatternList ([]FileType) If a File types listbox exists in the file dialog on the particular platform, this option gives the filetypes in this listbox. When the user choose a filetype in the listbox, only the files of that type are listed. If this option is unspecified, or if it is set to the empty list, or if the File types listbox is not supported by the particular platform then all files are listed regardless of their types. See the section SPECIFYING FILE PATTERNS below for a discussion on the contents of filePatternList. * Initialdir directory Specifies that the files in directory should be displayed when the dialog pops up. If this parameter is not specified, the initial directory defaults to the current working directory on non-Windows systems and on Windows systems prior to Vista. On Vista and later systems, the initial directory defaults to the last user-selected directory for the application. If the parameter specifies a relative path, the return value will convert the relative path to an absolute path. * Initialfile filename Specifies a filename to be displayed in the dialog when it pops up. * Multiple boolean Allows the user to choose multiple files from the Open dialog. * Parent window Makes window the logical parent of the file dialog. The file dialog is displayed on top of its parent window. On Mac OS X, this turns the file dialog into a sheet attached to the parent window. * Title titleString Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title is displayed. Additional information might be available at the Tcl/Tk getopenfile page. func GetSaveFile P added in v0.5.18 func GetSaveFile(options ...Opt) string * Description GetSaveFile -- pop up a dialog box for the user to select a file to save. Description P GetSaveFile pops up a dialog box for the user to select a file to save. The functio is usually associated with the Save as command in the File menu. If the user enters a file that already exists, the dialog box prompts the user for confirmation whether the existing file should be overwritten or not. * Confirmoverwrite boolean Configures how the Save dialog reacts when the selected file already exists, and saving would overwrite it. A true value requests a confirmation dialog be presented to the user. A false value requests that the overwrite take place without confirmation. Default value is true. * Defaultextension extension Specifies a string that will be appended to the filename if the user enters a filename without an extension. The default value is the empty string, which means no extension will be appended to the filename in any case. This option is ignored on Mac OS X, which does not require extensions to filenames, and the UNIX implementation guesses reasonable values for this from the -filetypes option when this is not supplied. * Filetypes filePatternList ([]FileType) If a File types listbox exists in the file dialog on the particular platform, this option gives the filetypes in this listbox. When the user choose a filetype in the listbox, only the files of that type are listed. If this option is unspecified, or if it is set to the empty list, or if the File types listbox is not supported by the particular platform then all files are listed regardless of their types. See the section SPECIFYING FILE PATTERNS below for a discussion on the contents of filePatternList. * Initialdir directory Specifies that the files in directory should be displayed when the dialog pops up. If this parameter is not specified, the initial directory defaults to the current working directory on non-Windows systems and on Windows systems prior to Vista. On Vista and later systems, the initial directory defaults to the last user-selected directory for the application. If the parameter specifies a relative path, the return value will convert the relative path to an absolute path. * Initialfile filename Specifies a filename to be displayed in the dialog when it pops up. * Parent window Makes window the logical parent of the file dialog. The file dialog is displayed on top of its parent window. On Mac OS X, this turns the file dialog into a sheet attached to the parent window. * Title titleString Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title is displayed. Additional information might be available at the Tcl/Tk getopenfile page. func Grid P added in v0.5.18 func Grid(w Widget, options ...Opt) * Description Grid -- Geometry manager that arranges widgets in a grid Description P The arguments consist of the names of one or more content windows followed by pairs of arguments that specify how to manage the content. The characters -, x and ^, can be specified instead of a window name to alter the default location of a window, as described in the RELATIVE PLACEMENT section, below. The following options are supported: * Column n Insert the window so that it occupies the nth column in the grid. Column numbers start with 0. If this option is not supplied, then the window is arranged just to the right of previous window specified on this call to grid, or column "0" if it is the first window. For each x that immediately precedes the window, the column position is incremented by one. Thus the x represents a blank column for this row in the grid. * Columnspan n Insert the window so that it occupies n columns in the grid. The default is one column, unless the window name is followed by a -, in which case the columnspan is incremented once for each immediately following -. * In container Insert the window(s) in the container window given by container. The default is the first window's parent window. * Ipadx amount The amount specifies how much horizontal internal padding to leave on each side of the content. This is space is added inside the content border. The amount must be a valid screen distance, such as 2 or .5c. It defaults to 0. * Ipady amount The amount specifies how much vertical internal padding to leave on the top and bottom of the content. This space is added inside the content border. The amount defaults to 0. * Padx amount The amount specifies how much horizontal external padding to leave on each side of the content, in screen units. Amount may be a list of two values to specify padding for left and right separately. The amount defaults to 0. This space is added outside the content border. * Pady amount The amount specifies how much vertical external padding to leave on the top and bottom of the content, in screen units. Amount may be a list of two values to specify padding for top and bottom separately. The amount defaults to 0. This space is added outside the content border. * Row n Insert the content so that it occupies the nth row in the grid. Row numbers start with 0. If this option is not supplied, then the content is arranged on the same row as the previous content specified on this call to grid, or the next row after the highest occupied row if this is the first content. * Rowspan n Insert the content so that it occupies n rows in the grid. The default is one row. If the next grid command contains ^ characters instead of content that line up with the columns of this content, then the rowspan of this content is extended by one. * Sticky style If a content's cell is larger than its requested dimensions, this option may be used to position (or stretch) the content within its cell. Style is a string that contains zero or more of the characters n, s, e or w. The string can optionally contain spaces or commas, but they are ignored. Each letter refers to a side (north, south, east, or west) that the content will "stick" to. If both n and s (or e and w) are specified, the content will be stretched to fill the entire height (or width) of its cavity. The -sticky option subsumes the combination of -anchor and -fill that is used by pack. The default is "", which causes the content to be centered in its cavity, at its requested size. If any of the content is already managed by the geometry manager then any unspecified options for them retain their previous values rather than receiving default values. More information might be available at the Tcl/Tk grid page. func GridAnchor P added in v0.33.0 func GridAnchor(w *Window, anchor string) string * Description Grid -- Geometry manager that arranges widgets in a grid Description P The anchor value controls how to place the grid within the container window when no row/column has any weight. See THE GRID ALGORITHM below for further details. The default anchor is nw. More information might be available at the Tcl/Tk grid page. func GridColumnConfigure P added in v0.16.2 func GridColumnConfigure(w Widget, index int, options ...Opt) * Description Grid -- Geometry manager that arranges widgets in a grid Description P Query or set the column properties of the index column of the geometry container, window. The valid options are -minsize, -weight, -uniform and -pad. If one or more options are provided, then index may be given as a list of column indices to which the configuration options will operate on. Indices may be integers, window names or the keyword all. For all the options apply to all columns currently occupied be content windows. For a window name, that window must be a content of this container and the options apply to all columns currently occupied be the content. The -minsize option sets the minimum size, in screen units, that will be permitted for this column. The -weight option (an integer value) sets the relative weight for apportioning any extra spaces among columns. A weight of zero (0) indicates the column will not deviate from its requested size. A column whose weight is two will grow at twice the rate as a column of weight one when extra space is allocated to the layout. The -uniform option, when a non-empty value is supplied, places the column in a uniform group with other columns that have the same value for -uniform. The space for columns belonging to a uniform group is allocated so that their sizes are always in strict proportion to their -weight values. See THE GRID ALGORITHM below for further details. The -pad option specifies the number of screen units that will be added to the largest window contained completely in that column when the grid geometry manager requests a size from the containing window. If only an option is specified, with no value, the current value of that option is returned. If only the container window and index is specified, all the current settings are returned in a list of "-option value" pairs. More information might be available at the Tcl/Tk grid page. func GridRowConfigure P added in v0.16.2 func GridRowConfigure(w Widget, index int, options ...Opt) * Description Grid -- Geometry manager that arranges widgets in a grid Description P Query or set the row properties of the index row of the geometry container, window. The valid options are -minsize, -weight, -uniform and -pad. If one or more options are provided, then index may be given as a list of row indices to which the configuration options will operate on. Indices may be integers, window names or the keyword all. For all the options apply to all rows currently occupied by content windows. For a window name, that window must be a content window of this container and the options apply to all rows currently occupied by the container window. The -minsize option sets the minimum size, in screen units, that will be permitted for this row. The -weight option (an integer value) sets the relative weight for apportioning any extra spaces among rows. A weight of zero (0) indicates the row will not deviate from its requested size. A row whose weight is two will grow at twice the rate as a row of weight one when extra space is allocated to the layout. The -uniform option, when a non-empty value is supplied, places the row in a uniform group with other rows that have the same value for -uniform. The space for rows belonging to a uniform group is allocated so that their sizes are always in strict proportion to their -weight values. See THE GRID ALGORITHM below for further details. The -pad option specifies the number of screen units that will be added to the largest window contained completely in that row when the grid geometry manager requests a size from the containing window. If only an option is specified, with no value, the current value of that option is returned. If only the container window and index is specified, all the current settings are returned in a list of "-option value" pairs. More information might be available at the Tcl/Tk grid page. func Initialize P added in v0.1.2 func Initialize() Initalize enforces the parts of package initialization that are otherwise done lazily. The function may panic if ErrorMode is PanicOnError. func MessageBox P added in v0.5.18 func MessageBox(options ...Opt) string * Description tk_messageBox -- pops up a message window and waits for user response. Description P This procedure creates and displays a message window with an application-specified message, an icon and a set of buttons. Each of the buttons in the message window is identified by a unique symbolic name (see the -type options). After the message window is popped up, tk_messageBox waits for the user to select one of the buttons. Then it returns the symbolic name of the selected button. The following optins are supported: * Command handler Specifies the handler to invoke when the user closes the dialog. The actual command consists of string followed by a space and the name of the button clicked by the user to close the dialog. This is only available on Mac OS X. * Default name Name gives the symbolic name of the default button for this message window ( "ok", "cancel", and so on). See -type for a list of the symbolic names. If this option is not specified, the first button in the dialog will be made the default. * Detail string Specifies an auxiliary message to the main message given by the -message option. The message detail will be presented beneath the main message and, where supported by the OS, in a less emphasized font than the main message. * Icon iconImage Specifies an icon to display. IconImage must be one of the following: error, info, question or warning. If this option is not specified, then the info icon will be displayed. * Message string Specifies the message to display in this message box. The default value is an empty string. * Parent window Makes window the logical parent of the message box. The message box is displayed on top of its parent window. * Title titleString Specifies a string to display as the title of the message box. The default value is an empty string. * Type predefinedType Arranges for a predefined set of buttons to be displayed. The following values are possible for predefinedType: * abortretryignore - Displays three buttons whose symbolic names are abort, retry and ignore. * ok - Displays one button whose symbolic name is ok. * okcancel - Displays two buttons whose symbolic names are ok and cancel. * retrycancel - Displays two buttons whose symbolic names are retry and cancel. * yesno - Displays two buttons whose symbolic names are yes and no. * yesnocancel - Displays three buttons whose symbolic names are yes, no and cancel. More information might be available at the Tcl/Tk messageBox page. func Pack P added in v0.4.10 func Pack(options ...Opt) * Description Pack -- Geometry manager that packs around edges of cavity Description P The options consist of one or more content windows followed by options that specify how to manage the content. See THE PACKER ALGORITHM for details on how the options are used by the packer. The first argument must be a *Window. The following options are supported: * After other Other must the name of another window. Use its container as the container for the content, and insert the content just after other in the packing order. * Anchor anchor Anchor must be a valid anchor position such as n or sw; it specifies where to position each content in its parcel. Defaults to center. * Before other Other must the name of another window. Use its container as the container for the content, and insert the content just before other in the packing order. * Expand boolean Specifies whether the content should be expanded to consume extra space in their container. Boolean may have any proper boolean value, such as 1 or no. Defaults to 0. * Fill style If a content's parcel is larger than its requested dimensions, this option may be used to stretch the content. Style must have one of the following values: * "none" - Give the content its requested dimensions plus any internal padding requested with -ipadx or -ipady. This is the default. * "x" - Stretch the content horizontally to fill the entire width of its parcel (except leave external padding as specified by -padx). * "y" - Stretch the content vertically to fill the entire height of its parcel (except leave external padding as specified by -pady). * "both": Stretch the content both horizontally and vertically. . * In container Insert the window at the end of the packing order for the container window given by container. * Ipadx amount Amount specifies how much horizontal internal padding to leave on each side of the content. Amount must be a valid screen distance, such as 2 or .5c. It defaults to 0. * Ipady amount Amount specifies how much vertical internal padding to leave on each side of the content. Amount defaults to 0. * Padx amount Amount specifies how much horizontal external padding to leave on each side of the content. Amount may be a list of two values to specify padding for left and right separately. Amount defaults to 0. * Pady amount Amount specifies how much vertical external padding to leave on each side of the content. Amount may be a list of two values to specify padding for top and bottom separately. Amount defaults to 0. * Side side Specifies which side of the container the content will be packed against. Must be "left", "right", "top", or "bottom". Defaults to top. If no -in, -after or -before option is specified then each of the content will be inserted at the end of the packing list for its parent unless it is already managed by the packer (in which case it will be left where it is). If one of these options is specified then all the content will be inserted at the specified point. If any of the content are already managed by the geometry manager then any unspecified options for them retain their previous values rather than receiving default values. Additional information might be available at the Tcl/Tk pack page. func Place P added in v0.4.10 func Place(options ...Opt) * Description Place -- Geometry manager for fixed or rubber-sheet placement Description P The placer is a geometry manager for Tk. It provides simple fixed placement of windows, where you specify the exact size and location of one window, called the content, within another window, called the container. The placer also provides rubber-sheet placement, where you specify the size and location of the content in terms of the dimensions of the container, so that the content changes size and location in response to changes in the size of the container. Lastly, the placer allows you to mix these styles of placement so that, for example, the content has a fixed width and height but is centered inside the container. The first argument must be a *Window. The following options are supported: * Anchor where Where specifies which point of window is to be positioned at the (x,y) location selected by the -x, -y, -relx, and -rely options. The anchor point is in terms of the outer area of window including its border, if any. Thus if where is se then the lower-right corner of window's border will appear at the given (x,y) location in the container. The anchor position defaults to nw. * Bordermode mode Mode determines the degree to which borders within the container are used in determining the placement of the content. The default and most common value is inside. In this case the placer considers the area of the container to be the innermost area of the container, inside any border: an option of -x 0 corresponds to an x-coordinate just inside the border and an option of -relwidth 1.0 means window will fill the area inside the container's border. If mode is outside then the placer considers the area of the container to include its border; this mode is typically used when placing window outside its container, as with the options -x 0 -y 0 -anchor ne. Lastly, mode may be specified as ignore, in which case borders are ignored: the area of the container is considered to be its official X area, which includes any internal border but no external border. A bordermode of ignore is probably not very useful. * Height size Size specifies the height for window in screen units (i.e. any of the forms accepted by Tk_GetPixels). The height will be the outer dimension of window including its border, if any. If size is an empty string, or if no -height or -relheight option is specified, then the height requested internally by the window will be used. * In container Container specifies the path name of the window relative to which window is to be placed. Container must either be window's parent or a descendant of window's parent. In addition, container and window must both be descendants of the same top-level window. These restrictions are necessary to guarantee that window is visible whenever container is visible. If this option is not specified then the other window defaults to window's parent. * Relheight size Size specifies the height for window. In this case the height is specified as a floating-point number relative to the height of the container: 0.5 means window will be half as high as the container, 1.0 means window will have the same height as the container, and so on. If both -height and -relheight are specified for a content, their values are summed. For example, -relheight 1.0 -height -2 makes the content 2 pixels shorter than the container. * Relwidth size Size specifies the width for window. In this case the width is specified as a floating-point number relative to the width of the container: 0.5 means window will be half as wide as the container, 1.0 means window will have the same width as the container, and so on. If both -width and -relwidth are specified for a content, their values are summed. For example, -relwidth 1.0 -width 5 makes the content 5 pixels wider than the container. * Relx location Location specifies the x-coordinate within the container window of the anchor point for window. In this case the location is specified in a relative fashion as a floating-point number: 0.0 corresponds to the left edge of the container and 1.0 corresponds to the right edge of the container. Location need not be in the range 0.0-1.0. If both -x and -relx are specified for a content then their values are summed. For example, -relx 0.5 -x -2 positions the left edge of the content 2 pixels to the left of the center of its container. * Rely location Location specifies the y-coordinate within the container window of the anchor point for window. In this case the value is specified in a relative fashion as a floating-point number: 0.0 corresponds to the top edge of the container and 1.0 corresponds to the bottom edge of the container. Location need not be in the range 0.0-1.0. If both -y and -rely are specified for a content then their values are summed. For example, -rely 0.5 -x 3 positions the top edge of the content 3 pixels below the center of its container. * Width size Size specifies the width for window in screen units (i.e. any of the forms accepted by Tk_GetPixels). The width will be the outer width of window including its border, if any. If size is an empty string, or if no -width or -relwidth option is specified, then the width requested internally by the window will be used. * X location Location specifies the x-coordinate within the container window of the anchor point for window. The location is specified in screen units (i.e. any of the forms accepted by Tk_GetPixels) and need not lie within the bounds of the container window. * Y location Location specifies the y-coordinate within the container window of the anchor point for window. The location is specified in screen units (i.e. any of the forms accepted by Tk_GetPixels) and need not lie within the bounds of the container window. If the same value is specified separately with two different options, such as -x and -relx, then the most recent option is used and the older one is ignored. Additional information might be available at the Tcl/Tk place page. func StyleConfigure P added in v0.19.3 func StyleConfigure(style string, options ...any) []string * Description ttk::style -- Manipulate style database Description P Sets the default value of the specified option(s) in style. If style does not exist, it is created. Example: StyleConfigure(".", Font("times"), Background(LightBlue)) If only style and -option are specified, get the default value for option -option of style style. Example: StyleConfigure(".", Font) If only style is specified, get the default value for all options of style style. Example: StyleConfigure(".") Additional information might be available at the Tcl/Tk style page. There's also a Styles and Themes tutorial at tkdoc.com. func StyleElementCreate P added in v0.19.5 func StyleElementCreate(elementName, typ string, options ...any) string * Description ttk::style -- Manipulate style database Description P Creates a new element in the current theme of type type. The only cross-platform built-in element type is image (see ttk_image(n)) but themes may define other element types (see Ttk_RegisterElementFactory). On suitable versions of Windows an element factory is registered to create Windows theme elements (see ttk_vsapi(n)). Examples: StyleElementCreate("TSpinbox.uparrow", "from", "default") // Inherit the existing element from theme 'default'. StyleElementCreate("Red.Corner.TButton.indicator", "image", NewPhoto(File("red_corner.png")), Width(10)) imageN := NewPhoto(...) StyleElementCreate("TCheckbutton.indicator", "image", image5, "disabled selected", image6, "disabled alternate", image8, "disabled", image9, "alternate", image7, "!selected", image4, Width(20), Border(4), Sticky("w")) After the type "image" comes a list of one or more images. Every image is optionally followed by a space separated list of states the image applies to. An exclamation mark before the state is a negation. Additional information might be available at the Tcl/Tk modifying a button and Tcl/Tk style pages. There's also a Styles and Themes tutorial at tkdoc.com. func StyleElementNames P added in v0.19.5 func StyleElementNames() []string * Description ttk::style -- Manipulate style database Description P Returns the list of elements defined in the current theme. Additional information might be available at the Tcl/Tk style page. There's also a Styles and Themes tutorial at tkdoc.com. func StyleElementOptions P added in v0.19.5 func StyleElementOptions(element string) []string * Description ttk::style -- Manipulate style database Description P Returns the list of element's options. Additional information might be available at the Tcl/Tk style page. There's also a Styles and Themes tutorial at tkdoc.com. func StyleLayout P added in v0.19.5 func StyleLayout(style string, options ...any) string * Description ttk::style -- Manipulate style database Description P Define the widget layout for style style. See LAYOUTS below for the format of layoutSpec. If layoutSpec is omitted, return the layout specification for style style. Example: StyleLayout("Red.Corner.Button", "Button.border", Sticky("nswe"), Border(1), Children( "Button.focus", Sticky("nswe"), Children( "Button.padding", Sticky("nswe"), Children( "Button.label", Sticky("nswe"), "Red.Corner.TButton.indicator", Side("right"), Sticky("ne"))))) Additional information might be available at the Tcl/Tk modifying a button and Tcl/Tk style pages. There's also a Styles and Themes tutorial at tkdoc.com. func StyleLookup P added in v0.26.1 func StyleLookup(style string, options ...any) string * Description ttk::style -- Manipulate style database Description P Returns the value specified for -option in style style in state state, using the standard lookup rules for element options. state is a list of state names; if omitted, it defaults to all bits off (the "normal" state). If the default argument is present, it is used as a fallback value in case no specification for -option is found. If style does not exist, it is created. For example, StyleLookup("TButton", Font) may return "TkDefaultFont", depending on the operating system, theme in use and the configured style options. Additional information might be available at the Tcl/Tk style page. There's also a Styles and Themes tutorial at tkdoc.com. func StyleMap P added in v0.26.1 func StyleMap(style string, options ...any) string * Description * Widget states ttk::style -- Manipulate style database Description P Sets dynamic (state dependent) values of the specified option(s) in style. Each statespec / value pair is examined in order; the value corresponding to the first matching statespec is used. If style does not exist, it is created. If only style and -option are specified, get the dynamic values for option -option of style style. If only style is specified, get the dynamic values for all options of style 'style'. With no options the function returns the currently configured style map for 'style'. For example, StyleMap("TButton") may return "-relief {{!disabled pressed} sunken}", depending on the operating system, theme in use and the configured style options. Setting a style map is done by providing a list of options, each option is followed by a list of states and a value. For example: StyleMap("TButton", Background, "disabled", "#112233", "active", "#445566", Foreground, "disabled", "#778899", Relief, "pressed", "!disabled", "sunken") Widget states P The widget state is a bitmap of independent state flags. * active - The mouse cursor is over the widget and pressing a mouse button will cause some action to occur * alternate - A widget-specific alternate display format * background - Windows and Mac have a notion of an "active" or foreground window. The background state is set for widgets in a background window, and cleared for those in the foreground window * disabled - Widget is disabled under program control * focus - Widget has keyboard focus * invalid - The widget's value is invalid * pressed - Widget is being pressed * readonly - Widget should not allow user modification * selected - "On", "true", or "current" for things like Checkbuttons and radiobuttons A state specification is a sequence of state names, optionally prefixed with an exclamation point indicating that the bit is off. Additional information might be available at the Tcl/Tk style page. There's also a Styles and Themes tutorial at tkdoc.com. func StyleThemeNames P added in v0.17.1 func StyleThemeNames() []string * Description ttk::style -- Manipulate style database Description P Returns a list of all known themes. Additional information might be available at the Tcl/Tk style page. func StyleThemeStyles P added in v0.17.1 func StyleThemeStyles(themeName ...string) []string * Description ttk::style -- Manipulate style database Description P Returns a list of all styles in themeName. If themeName is omitted, the current theme is used. Additional information might be available at the Tcl/Tk style page. func StyleThemeUse P added in v0.17.1 func StyleThemeUse(themeName ...string) string * Description ttk::style -- Manipulate style database Description P Without a argument the result is the name of the current theme. Otherwise this command sets the current theme to themeName, and refreshes all widgets. Additional information might be available at the Tcl/Tk style page. There's also a Styles and Themes tutorial at tkdoc.com. func TeX P added in v0.18.0 func TeX(src string, scale float64) (png []byte) TeX is like Tex2 but report errors using ErrorMode and Error. func TeX2 P added in v0.31.0 func TeX2(src string, scale float64) (png []byte, err error) TeX2 renders TeX 'src' as a png file that shows the TeX "snippet" in a fixed 600 dpi resolution. The result is afterwards resized using the 'scale' factor. Scale factor 1.0 means no resize. Only plain Tex and a subset of some of the default Computer Modern fonts are supported. Many small fonts are not available. func TeXImg P added in v0.30.0 func TeXImg(src string, scale float64) (img image.Image) TeXImg renders is line TeX but returns an image.Image. func TeXImg2 P added in v0.31.0 func TeXImg2(src string, scale float64) (img image.Image, err error) TeXImg2 renders is line TeX2 but returns an image.Image. func TkScaling P added in v0.18.0 func TkScaling(options ...any) float64 * Description tk -- Manipulate Tk internal state Description P Sets and queries the current scaling factor used by Tk to convert between physical units (for example, points, inches, or millimeters) and pixels. The number argument is a floating point number that specifies the number of pixels per point on window's display. If the window argument is omitted, it defaults to the main window. If the number argument is omitted, the current value of the scaling factor is returned. A "point" is a unit of measurement equal to 1/72 inch. A scaling factor of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard 72 dpi monitor. A scaling factor of 1.25 would mean 1.25 pixels per point, which is the setting for a 90 dpi monitor; setting the scaling factor to 1.25 on a 72 dpi monitor would cause everything in the application to be displayed 1.25 times as large as normal. The initial value for the scaling factor is set when the application starts, based on properties of the installed monitor, but it can be changed at any time. Measurements made after the scaling factor is changed will use the new scaling factor, but it is undefined whether existing widgets will resize themselves dynamically to accommodate the new scaling factor. - Displayof window - Number Additional information might be available at the Tcl/Tk tk page. func TooltipClear P added in v0.49.0 func TooltipClear(pattern string) * Description tooltip -- Tooltip management Description P Prevents the specified widgets from showing tooltips. pattern is a glob pattern and defaults to matching all widgets. More information might be available at the Tklib tooltip page. func TooltipConfigure P added in v0.49.0 func TooltipConfigure(options ...any) string * Description tooltip -- Tooltip management Description P Queries or modifies the configuration options of the tooltip. The supported options are -backgroud, -foreground and -font. If one option is specified with no value, returns the value of that option. Otherwise, sets the given options to the corresponding values. More information might be available at the Tklib tooltip page. func TooltipDelay P added in v0.49.0 func TooltipDelay(delay time.Duration) string * Description tooltip -- Tooltip management Description P Query or set the hover delay. This is the interval that the pointer must remain over the widget before the tooltip is displayed. The delay is specified in milliseconds and must be greater than or equal to 50 ms. With a negative argument the current delay is returned. More information might be available at the Tklib tooltip page. func TooltipFade P added in v0.49.0 func TooltipFade(v bool) string * Description tooltip -- Tooltip management Description P Enable or disable fading of the tooltip. The fading is enabled by default on Win32 and Aqua. The tooltip will fade away on Leave events instead disappearing. More information might be available at the Tklib tooltip page. func TooltipOff P added in v0.49.0 func TooltipOff(v bool) string * Description * Disable all tooltips tooltip -- Tooltip management Description P Disable all tooltips P More information might be available at the Tklib tooltip page. func TooltipOn P added in v0.49.0 func TooltipOn(v bool) string * Description tooltip -- Tooltip management Description P Enables tooltips for defined widgets. More information might be available at the Tklib tooltip page. func Update P added in v0.5.18 func Update() Update -- Process pending events and idle callbacks More information might be available at the Tcl/Tk update page. func WinfoHeight P added in v0.43.0 func WinfoHeight(w *Window) string * Description winfo -- Return window-related information Description P Returns a decimal string giving window's height in pixels. When a window is first created its height will be 1 pixel; the height will eventually be changed by a geometry manager to fulfil the window's needs. If you need the true height immediately after creating a widget, invoke update to force the geometry manager to arrange it, or use winfo reqheight to get the window's requested height instead of its actual height. More information might be available at the Tcl/Tk winfo page. func WinfoScreenHeight P added in v0.53.0 func WinfoScreenHeight(w *Window) string * Description winfo -- Return window-related information Description P Returns a decimal string giving the height of window's screen, in pixels. More information might be available at the Tcl/Tk winfo page. func WinfoScreenWidth P added in v0.53.0 func WinfoScreenWidth(w *Window) string * Description winfo -- Return window-related information Description P Returns a decimal string giving the width of window's screen, in pixels. More information might be available at the Tcl/Tk winfo page. func WinfoWidth P added in v0.43.0 func WinfoWidth(w *Window) string * Description winfo -- Return window-related information Description P Returns a decimal string giving window's width in pixels. When a window is first created its width will be 1 pixel; the width will eventually be changed by a geometry manager to fulfil the window's needs. If you need the true width immediately after creating a widget, invoke update to force the geometry manager to arrange it, or use winfo reqwidth to get the window's requested width instead of its actual width. More information might be available at the Tcl/Tk winfo page. func WmGeometry P added in v0.53.0 func WmGeometry(w *Window, geometry string) string * Description wm -- Communicate with window manager Description P If newGeometry is specified, then the geometry of window is changed and an empty string is returned. Otherwise the current geometry for window is returned (this is the most recent geometry specified either by manual resizing or in a wm geometry command). NewGeometry has the form =widthxheight+-x+-y, where any of =, widthxheight, or +-x+-y may be omitted. Width and height are positive integers specifying the desired dimensions of window. If window is gridded (see GRIDDED GEOMETRY MANAGEMENT below) then the dimensions are specified in grid units; otherwise they are specified in pixel units. X and y specify the desired location of window on the screen, in pixels. If x is preceded by +, it specifies the number of pixels between the left edge of the screen and the left edge of window's border; if preceded by - then x specifies the number of pixels between the right edge of the screen and the right edge of window's border. If y is preceded by + then it specifies the number of pixels between the top of the screen and the top of window's border; if y is preceded by - then it specifies the number of pixels between the bottom of window's border and the bottom of the screen. If newGeometry is specified as an empty string then any existing user-specified geometry for window is cancelled, and the window will revert to the size requested internally by its widgets. Note that this is related to winfo geometry, but not the same. That can only query the geometry, and always reflects Tk's current understanding of the actual size and location of window, whereas wm geometry allows both setting and querying of the window manager's understanding of the size and location of the window. This can vary significantly, for example to reflect the addition of decorative elements to window such as title bars, and window managers are not required to precisely follow the requests made through this command. More information might be available at the Tcl/Tk wm page. func WmMaxSize P added in v0.26.3 func WmMaxSize(w *Window) (width, height int) * Description wm -- Communicate with window manager Description P Returns the maximum width and height currently in effect. The maximum size defaults to the size of the screen. See the sections on geometry management below for more information. More information might be available at the Tcl/Tk wm page. func WmMinSize P added in v0.53.0 func WmMinSize(w *Window, widthHeight ...any) (r string) * Description wm -- Communicate with window manager Description P If width and height are specified, they give the minimum permissible dimensions for window. For gridded windows the dimensions are specified in grid units; otherwise they are specified in pixel units. The window manager will restrict the window's dimensions to be greater than or equal to width and height. If width and height are specified, then the command returns an empty string. Otherwise it returns a Tcl list with two elements, which are the minimum width and height currently in effect. The minimum size defaults to one pixel in each dimension. See the sections on geometry management below for more information. More information might be available at the Tcl/Tk wm page. func WmProtocol P added in v0.42.0 func WmProtocol(w *Window, name string, command any) string * Description wm -- Communicate with window manager Description P This command is used to manage window manager protocols. The name argument in the wm protocol command is the name of an atom corresponding to a window manager protocol. Examples include WM_DELETE_WINDOW or WM_SAVE_YOURSELF or WM_TAKE_FOCUS. A window manager protocol is a class of messages sent from a window manager to a Tk application outside of the normal event processing system. The main example is the WM_DELETE_WINDOW protocol; these messages are sent when the user clicks the close widget in the title bar of a window. Handlers for window manager protocols are installed with the wm protocol command. As a rule, if no handler has been installed for a protocol by the wm protocol command then all messages of that protocol are ignored. The WM_DELETE_WINDOW protocol is an exception to this rule. At start-up Tk installs a handler for this protocol, which responds by destroying the window. The wm protocol command can be used to replace this default handler by one which responds differently. The list of available window manager protocols depends on the window manager, but all window managers supported by Tk provide WM_DELETE_WINDOW. On the Windows platform, a WM_SAVE_YOURSELF message is sent on user logout or system restart. If both name and command are specified, then command becomes the handler for the protocol specified by name. The atom for name will be added to window's WM_PROTOCOLS property to tell the window manager that the application has a handler for the protocol specified by name, and command will be invoked in the future whenever the window manager sends a message of that protocol to the Tk application. In this case the wm protocol command returns an empty string. If name is specified but command is not (is nil), then the current handler for name is returned, or an empty string if there is no handler defined for name (as a special case, the default handler for WM_DELETE_WINDOW is not returned). If command is specified as an empty string then the atom for name is removed from the WM_PROTOCOLS property of window and the handler is destroyed; an empty string is returned. Lastly, if neither name nor command is specified, the wm protocol command returns a list of all of the protocols for which handlers are currently defined for window. More information might be available at the Tcl/Tk wm page. func WmSetMaxSize P added in v0.26.3 func WmSetMaxSize(w *Window, width, height int) * Description wm -- Communicate with window manager Description P Width and height give the maximum permissible dimensions for window. For gridded windows the dimensions are specified in grid units; otherwise they are specified in pixel units. The window manager will restrict the window's dimensions to be less than or equal to width and height. If width and height are specified, then the command returns an empty string. Otherwise it returns a Tcl list with two elements, which are the maximum width and height currently in effect. The maximum size defaults to the size of the screen. See the sections on geometry management below for more information. More information might be available at the Tcl/Tk wm page. Types P type ButtonWidget P added in v0.11.0 type ButtonWidget struct { *Window } ButtonWidget represents the Tcl/Tk button widget/window func Button P added in v0.2.0 func Button(options ...Opt) *ButtonWidget * Description * Standard options * Widget specific options Button -- Create and manipulate 'button' action widgets Description P The button command creates a new window (given by the pathName argument) and makes it into a button widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the button such as its colors, font, text, and initial relief. The button command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A button is a widget that displays a textual string, bitmap or image. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the -wraplength option) and one of the characters may optionally be underlined using the It can display itself in either of three different ways, according to the -state option; it can be made to appear raised, sunken, or flat; and it can be made to flash. When a user invokes the button (by pressing mouse button 1 with the cursor over the button), then the Tcl command specified in the -command option is invoked. Use Window.Button to create a Button with a particular parent. More information might be available at the Tcl/Tk button page. Standard options P * Activebackground * Activeforeground * Anchor * Background * Bitmap * Borderwidth * Compound * Cursor * Disabledforeground * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Image * Justify * Padx * Pady * Relief * Repeatdelay * Repeatinterval * Takefocus * Textvariable * Txt * Underline * Wraplength Widget specific options P Command Specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button window. Default Specifies one of three states for the default ring: normal, active, or disabled. In active state, the button is drawn with the platform specific appearance for a default button. In normal state, the button is drawn with the platform specific appearance for a non-default button, leaving enough space to draw the default button appearance. The normal and active states will result in buttons of the same size. In disabled state, the button is drawn with the non-default button appearance without leaving space for the default appearance. The disabled state may result in a smaller button than the active state. Height Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. Overrelief Specifies an alternative relief for the button, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring -relief flat -overrelief raised. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the button. The empty string is the default value. State Specifies one of three states for the button: normal, active, or disabled. In normal state the button is displayed using the -foreground and -background options. The active state is typically used when the pointer is over the button. In active state the button is displayed using the -activeforeground and -activebackground options. Disabled state means that the button should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the -disabledforeground and -background options determine how the button is displayed. Width Specifies a desired width for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For a text button (no image or with -compound none) then the width specifies how much space in characters to allocate for the text label. If the width is negative then this specifies a minimum width. If this option is not specified, the button's desired width is computed from the size of the image or bitmap or text being displayed in it. func Exit P added in v0.5.18 func Exit(options ...Opt) *ButtonWidget Exit provides a canned Button with default Txt "Exit", bound to the ExitHandler. Use Window.Exit to create a Exit with a particular parent. func (*ButtonWidget) Invoke P added in v0.44.0 func (w *ButtonWidget) Invoke() string * Description button -- Create and manipulate 'button' action widgets Description P Invoke the Tcl command associated with the button, if there is one. The return value is the return value from the Tcl command, or an empty string if there is no command associated with the button. This command is ignored if the button's state is disabled. Additional information might be available at the Tcl/Tk button page. type CanvasWidget P added in v0.11.0 type CanvasWidget struct { *Window } CanvasWidget represents the Tcl/Tk canvas widget/window func Canvas P added in v0.2.0 func Canvas(options ...Opt) *CanvasWidget * Standard options * Widget specific options Canvas -- Create and manipulate 'canvas' hypergraphics drawing surface widgets Use Window.Canvas to create a Canvas with a particular parent. More information might be available at the Tcl/Tk canvas page. Standard options P * Background * Borderwidth * Cursor * Highlightbackground * Highlightcolor * Highlightthickness * Insertbackground * Insertborderwidth * Insertofftime * Insertontime * Insertwidth * Relief * Selectbackground * Selectborderwidth * Selectforeground * Takefocus * Xscrollcommand * Yscrollcommand Widget specific options P Closeenough Specifies a floating-point value indicating how close the mouse cursor must be to an item before it is considered to be the item. Defaults to 1.0. Confine Specifies a boolean value that indicates whether or not it should be allowable to set the canvas's view outside the region defined by the scrollRegion argument. Defaults to true, which means that the view will be constrained within the scroll region. Height Specifies a desired window height that the canvas widget should request from its geometry manager. The value may be specified in any of the forms described in the COORDINATES section below. Scrollregion Specifies a list with four coordinates describing the left, top, right, and bottom coordinates of a rectangular region. This region is used for scrolling purposes and is considered to be the boundary of the information in the canvas. Each of the coordinates may be specified in any of the forms given in the COORDINATES section below. State Modifies the default state of the canvas where state may be set to one of: normal, disabled, or hidden. Individual canvas objects all have their own state option which may override the default state. Many options can take separate specifications such that the appearance of the item can be different in different situations. The options that start with active control the appearance when the mouse pointer is over it, while the option starting with disabled controls the appearance when the state is disabled. Canvas items which are disabled will not react to canvas bindings. Width Specifies a desired window width that the canvas widget should request from its geometry manager. The value may be specified in any of the forms described in the COORDINATES section below. Xscrollincrement Specifies an increment for horizontal scrolling, in any of the usual forms permitted for screen distances. If the value of this option is greater than zero, the horizontal view in the window will be constrained so that the canvas x coordinate at the left edge of the window is always an even multiple of xScrollIncrement; furthermore, the units for scrolling (e.g., the change in view when the left and right arrows of a scrollbar are selected) will also be xScrollIncrement. If the value of this option is negative or zero, then horizontal scrolling is unconstrained. Yscrollincrement Specifies an increment for vertical scrolling, in any of the usual forms permitted for screen distances. If the value of this option is greater than zero, the vertical view in the window will be constrained so that the canvas y coordinate at the top edge of the window is always an even multiple of yScrollIncrement; furthermore, the units for scrolling (e.g., the change in view when the top and bottom arrows of a scrollbar are selected) will also be yScrollIncrement. If the value of this option is negative or zero, then vertical scrolling is unconstrained. func (*CanvasWidget) Graph P added in v0.11.0 func (w *CanvasWidget) Graph(script string) *CanvasWidget Graph -- use gnuplot to draw on a canvas. Graph returns 'w'. The 'script' argument is passed to a gnuplot executable, which must be installed on the machine. See the gnuplot site for documentation about producing graphs. The script must not use the 'set term ' command. type CheckbuttonWidget P added in v0.11.0 type CheckbuttonWidget struct { *Window } CheckbuttonWidget represents the Tcl/Tk checkbutton widget/window func Checkbutton P added in v0.2.0 func Checkbutton(options ...Opt) *CheckbuttonWidget * Description * Standard options * Widget specific options Checkbutton -- Create and manipulate 'checkbutton' boolean selection widgets Description P The checkbutton command creates a new window (given by the pathName argument) and makes it into a checkbutton widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the checkbutton such as its colors, font, text, and initial relief. The checkbutton command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A checkbutton is a widget that displays a textual string, bitmap or image and a square called an indicator. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the -wraplength option) and one of the characters may optionally be underlined using the A checkbutton has all of the behavior of a simple button, including the following: it can display itself in either of three different ways, according to the -state option; it can be made to appear raised, sunken, or flat; it can be made to flash; and it invokes a Tcl command whenever mouse button 1 is clicked over the checkbutton. In addition, checkbuttons can be selected. If a checkbutton is selected then the indicator is normally drawn with a selected appearance, and a Tcl variable associated with the checkbutton is set to a particular value (normally 1). The indicator is drawn with a check mark inside. If the checkbutton is not selected, then the indicator is drawn with a deselected appearance, and the associated variable is set to a different value (typically 0). The indicator is drawn without a check mark inside. In the special case where the variable (if specified) has a value that matches the tristatevalue, the indicator is drawn with a tri-state appearance and is in the tri-state mode indicating mixed or multiple values. (This is used when the check box represents the state of multiple items.) The indicator is drawn in a platform dependent manner. Under Unix and Windows, the background interior of the box is grayed . Under Mac, the indicator is drawn with a dash mark inside. By default, the name of the variable associated with a checkbutton is the same as the name used to create the checkbutton. The variable name, and the on , off and tristate values stored in it, may be modified with options on the command line or in the option database. Configuration options may also be used to modify the way the indicator is displayed (or whether it is displayed at all). By default a checkbutton is configured to select and deselect itself on alternate button clicks. In addition, each checkbutton monitors its associated variable and automatically selects and deselects itself when the variables value changes to and from the button's on , off and tristate values. Use Window.Checkbutton to create a Checkbutton with a particular parent. More information might be available at the Tcl/Tk checkbutton page. Standard options P * Activebackground * Activeforeground * Anchor * Background * Bitmap * Borderwidth * Compound * Cursor * Disabledforeground * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Image * Justify * Padx * Pady * Relief * Takefocus * Textvariable * Txt * Underline * Wraplength Widget specific options P Command Specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button window. The button's global variable (-variable option) will be updated before the command is invoked. Height Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. Indicatoron Specifies whether or not the indicator should be drawn. Must be a proper boolean value. If false, the -relief option is ignored and the widget's relief is always sunken if the widget is selected and raised otherwise. Offrelief Specifies the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is By setting this option to and setting -indicatoron to false and -overrelief to the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Bold, Italic, and Underline checkbuttons on the toolbar of a word-processor, for example. Offvalue Specifies value to store in the button's associated variable whenever this button is deselected. Defaults to Onvalue Specifies value to store in the button's associated variable whenever this button is selected. Defaults to Overrelief Specifies an alternative relief for the checkbutton, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring -relief flat -overrelief raised. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the checkbutton. The empty string is the default value. Selectcolor Specifies a background color to use when the button is selected. If indicatorOn is true then the color is used as the background for the indicator regardless of the select state. If indicatorOn is false, this color is used as the background for the entire widget, in place of background or activeBackground, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected. Selectimage Specifies an image to display (in place of the -image option) when the checkbutton is selected. This option is ignored unless the -image option has been specified. State Specifies one of three states for the checkbutton: normal, active, or disabled. In normal state the checkbutton is displayed using the -foreground and -background options. The active state is typically used when the pointer is over the checkbutton. In active state the checkbutton is displayed using the -activeforeground and -activebackground options. Disabled state means that the checkbutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the -disabledforeground and -background options determine how the checkbutton is displayed. Tristateimage Specifies an image to display (in place of the -image option) when the checkbutton is in tri-state mode. This option is ignored unless the -image option has been specified. Tristatevalue Specifies the value that causes the checkbutton to display the multi-value selection, also known as the tri-state mode. Defaults to Variable Specifies the name of a global variable to set to indicate whether or not this button is selected. Defaults to the name of the button within its parent (i.e. the last element of the button window's path name). Width Specifies a desired width for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option is not specified, the button's desired width is computed from the size of the image or bitmap or text being displayed in it. func (*CheckbuttonWidget) Deselect P added in v0.32.0 func (w *CheckbuttonWidget) Deselect() * Description checkbutton -- Create and manipulate 'checkbutton' boolean selection widgets Description P Deselects the checkbutton and sets the associated variable to its "off" value. More information might be available at the Tcl/Tk checkbutton page. func (*CheckbuttonWidget) Invoke P added in v0.52.0 func (w *CheckbuttonWidget) Invoke() string * Description checkbutton -- Create and manipulate 'checkbutton' boolean selection widgets Description P Does just what would have happened if the user invoked the checkbutton with the mouse: toggle the selection state of the button and invoke the Tcl command associated with the checkbutton, if there is one. The return value is the return value from the Tcl command, or an empty string if there is no command associated with the checkbutton. This command is ignored if the checkbutton's state is disabled. More information might be available at the Tcl/Tk checkbutton page. func (*CheckbuttonWidget) Select P added in v0.32.0 func (w *CheckbuttonWidget) Select() * Description checkbutton -- Create and manipulate 'checkbutton' boolean selection widgets Description P Selects the checkbutton and sets the associated variable to its "on" value. More information might be available at the Tcl/Tk checkbutton page. type EntryWidget P added in v0.11.0 type EntryWidget struct { *Window } EntryWidget represents the Tcl/Tk entry widget/window func Entry P added in v0.2.0 func Entry(options ...Opt) *EntryWidget * Description * Standard options * Widget specific options Entry -- Create and manipulate 'entry' one-line text entry widgets Description P The entry command creates a new window (given by the pathName argument) and makes it into an entry widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the entry such as its colors, font, and relief. The entry command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. An entry is a widget that displays a one-line text string and allows that string to be edited using widget commands described below, which are typically bound to keystrokes and mouse actions. When first created, an entry's string is empty. A portion of the entry may be selected as described below. If an entry is exporting its selection (see the -exportselection option), then it will observe the standard X11 protocols for handling the selection; entry selections are available as type STRING. Entries also observe the standard Tk rules for dealing with the input focus. When an entry has the input focus it displays an insertion cursor to indicate where new characters will be inserted. Entries are capable of displaying strings that are too long to fit entirely within the widget's window. In this case, only a portion of the string will be displayed; commands described below may be used to change the view in the window. Entries use the standard -xscrollcommand mechanism for interacting with scrollbars (see the description of the -xscrollcommand option for details). They also support scanning, as described below. Use Window.Entry to create a Entry with a particular parent. More information might be available at the Tcl/Tk entry page. Standard options P * Background * Borderwidth * Cursor * Exportselection * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Insertbackground * Insertborderwidth * Insertofftime * Insertontime * Insertwidth * Justify * Placeholder * Placeholderforeground * Relief * Selectbackground * Selectborderwidth * Selectforeground * Takefocus * Textvariable * Xscrollcommand Widget specific options P Disabledbackground Specifies the background color to use when the entry is disabled. If this option is the empty string, the normal background color is used. Disabledforeground Specifies the foreground color to use when the entry is disabled. If this option is the empty string, the normal foreground color is used. Invalidcommand Specifies a script to eval when -validatecommand returns 0. Setting it to {} disables this feature (the default). The best use of this option is to set it to bell. See VALIDATION below for more information. Readonlybackground Specifies the background color to use when the entry is readonly. If this option is the empty string, the normal background color is used. Show If this option is specified, then the true contents of the entry are not displayed in the window. Instead, each character in the entry's value will be displayed as the first character in the value of this option, such as This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry. State Specifies one of three states for the entry: normal, disabled, or readonly. If the entry is readonly, then the value may not be changed using widget commands and no insertion cursor will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the entry is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the entry may be displayed in a different color, depending on the values of the -disabledforeground and -disabledbackground options. Validate Specifies the mode in which validation should operate: none, focus, focusin, focusout, key, or all. It defaults to none. When you want validation, you must explicitly state which mode you wish to use. See VALIDATION below for more. Validatecommand Specifies a script to eval when you want to validate the input into the entry widget. Setting it to {} disables this feature (the default). This command must return a valid Tcl boolean value. If it returns 0 (or the valid Tcl boolean equivalent) then it means you reject the new edition and it will not occur and the -invalidcommand will be evaluated if it is set. If it returns 1, then the new edition occurs. See VALIDATION below for more information. Width Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. If the value is negative or zero, the widget picks a size just large enough to hold its current text. type Event P added in v0.17.0 type Event struct { // Event handlers should set Err on failure. Err error // Result can be optionally set by the handler. The field is returned by // certain methods, for example [TCheckbuttonWidget.Invoke]. Result string // Event source, if any. This field is set when the event handler was // created. W *Window // The window to which the event was reported (the window field from // the event). Valid for all event types. This field is set when the // event is handled. EventWindow *Window // The keysym corresponding to the event, substituted as a textual string. // Valid only for Key and KeyRelease events. Keysym string // The number of the last client request processed by the server (the serial // field from the event). Valid for all event types. Serial int64 // contains filtered or unexported fields } Event communicates information with an event handler. All handlers can use the Err field. Simple handlers, like in Button(..., Command(func(e *Event) {...})) can use the 'W' field, if applicable. All other fields are valid only in handlers bound using Bind. func (*Event) ScrollSet P added in v0.17.0 func (e *Event) ScrollSet(w Widget) ScrollSet communicates events to scrollbars. Example: var scroll *TScrollbarWidget // tcl: text .text -yscrollcommand ".scroll set" t := Text(..., Yscrollcommand(func(e *Event) { e.ScrollSet(scroll) })) func (*Event) SetReturnCodeBreak P added in v0.46.0 func (e *Event) SetReturnCodeBreak() SetReturnCodeBreak sets return code of 'e' to TCL_BREAK. func (*Event) SetReturnCodeContinue P added in v0.46.0 func (e *Event) SetReturnCodeContinue() SetReturnCodeContinue sets return code of 'e' to TCL_CONTINUE. func (*Event) SetReturnCodeError P added in v0.46.0 func (e *Event) SetReturnCodeError() SetReturnCodeError sets return code of 'e' to TCL_ERROR. func (*Event) SetReturnCodeOK P added in v0.46.0 func (e *Event) SetReturnCodeOK() SetReturnCodeOK sets return code of 'e' to TCL_OK. func (*Event) SetReturnCodeReturn P added in v0.46.0 func (e *Event) SetReturnCodeReturn() SetReturnCodeReturn sets return code of 'e' to TCL_RETURN. func (*Event) Xview P added in v0.17.0 func (e *Event) Xview(w Widget) Xview communicates events to views. Example: var scroll *TScrollbarWidget t := Text(...) // tcl: ttk::scrollbar .scroll -command ".text xview" scroll = TScrollbar(Command(func(e *Event) { e.Xview(t)})) func (*Event) Yview P added in v0.17.0 func (e *Event) Yview(w Widget) Yview communicates events to views. Example: var scroll *TScrollbarWidget t := Text(...) // tcl: ttk::scrollbar .scroll -command ".text yview" scroll = TScrollbar(Command(func(e *Event) { e.Yview(t)})) type EventHandler P added in v0.3.0 type EventHandler func(*Event) EventHandler is the type used by call backs. type FileType P added in v0.4.10 type FileType struct { TypeName string // Eg. "Go files" Extensions []string // Eg. []string{".go"} MacType string // Eg. "TEXT" } FileType specifies a single file type for the Filetypes option. type FontFace P added in v0.19.3 type FontFace struct { // contains filtered or unexported fields } FontFace represents a Tk font. func NewFont P added in v0.5.18 func NewFont(options ...Opt) *FontFace * Description NewFont -- Create and inspect fonts. Description P Creates a new font. The following options are supported on all platforms, and are used when creating/specifying a font: * Family name The case-insensitive font family name. Tk guarantees to support the font families named Courier (a monospaced "typewriter" font), Times (a serifed "newspaper" font), and Helvetica (a sans-serif "European" font). The most closely matching native font family will automatically be substituted when one of the above font families is used. The name may also be the name of a native, platform-specific font family; in that case it will work as desired on one platform but may not display correctly on other platforms. If the family is unspecified or unrecognized, a platform-specific default font will be chosen. * Size size The desired size of the font. If the size argument is a positive number, it is interpreted as a size in points. If size is a negative number, its absolute value is interpreted as a size in pixels. If a font cannot be displayed at the specified size, a nearby size will be chosen. If size is unspecified or zero, a platform-dependent default size will be chosen. Sizes should normally be specified in points so the application will remain the same ruler size on the screen, even when changing screen resolutions or moving scripts across platforms. However, specifying pixels is useful in certain circumstances such as when a piece of text must line up with respect to a fixed-size bitmap. The mapping between points and pixels is set when the application starts, based on properties of the installed monitor, but it can be overridden by calling the tk scaling command. * Weight weight The nominal thickness of the characters in the font. The value normal specifies a normal weight font, while bold specifies a bold font. The closest available weight to the one specified will be chosen. The default weight is normal. * Slant slant The amount the characters in the font are slanted away from the vertical. Valid values for slant are roman and italic. A roman font is the normal, upright appearance of a font, while an italic font is one that is tilted some number of degrees from upright. The closest available slant to the one specified will be chosen. The default slant is roman. * Underline boolean The value is a boolean flag that specifies whether characters in this font should be underlined. The default value for underline is false. * Overstrike boolean The value is a boolean flag that specifies whether a horizontal line should be drawn through the middle of characters in this font. The default value for overstrike is false. Additional information might be available at the Tcl/Tk font page. func (*FontFace) Delete P added in v0.19.3 func (f *FontFace) Delete() * Description Delete -- Manipulate fonts. Description P Delete the font. If there are widgets using the named font, the named font will not actually be deleted until all the instances are released. Those widgets will continue to display using the last known values for the named font. If a deleted named font is subsequently recreated with another call to font create, the widgets will use the new named font and redisplay themselves using the new attributes of that font. Additional information might be available at the Tcl/Tk font page. func (*FontFace) String P added in v0.19.3 func (f *FontFace) String() string String implements fmt.Stringer. type FrameWidget P added in v0.11.0 type FrameWidget struct { *Window } FrameWidget represents the Tcl/Tk frame widget/window func Frame P added in v0.2.0 func Frame(options ...Opt) *FrameWidget * Description * Standard options * Widget specific options Frame -- Create and manipulate 'frame' simple container widgets Description P The frame command creates a new window (given by the pathName argument) and makes it into a frame widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the frame such as its background color and relief. The frame command returns the path name of the new window. A frame is a simple widget. Its primary purpose is to act as a spacer or container for complex window layouts. The only features of a frame are its background and an optional 3-D border to make the frame appear raised or sunken. Use Window.Frame to create a Frame with a particular parent. More information might be available at the Tcl/Tk frame page. Standard options P * Borderwidth * Cursor * Highlightbackground * Highlightcolor * Highlightthickness * Padx * Pady * Relief * Takefocus Widget specific options P Background This option is the same as the standard -background option except that its value may also be specified as an empty string. In this case, the widget will display no background or border, and no colors will be consumed from its colormap for its background and border. An empty background will disable drawing the background image. Backgroundimage This specifies an image to display on the frame's background within the border of the frame (i.e., the image will be clipped by the frame's highlight ring and border, if either are present); subwidgets of the frame will be drawn on top. The image must have been created with the image create command. If specified as the empty string, no image will be displayed. Class Specifies a class for the window. This class will be used when querying the option database for the window's other options, and it will also be used later for other purposes such as bindings. The -class option may not be changed with the configure widget command. Colormap Specifies a colormap to use for the window. The value may be either new, in which case a new colormap is created for the window and its children, or the name of another window (which must be on the same screen and have the same visual as pathName), in which case the new window will use the colormap from the specified window. If the -colormap option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the configure widget command. Container The value must be a boolean. If true, it means that this window will be used as a container in which some other application will be embedded (for example, a Tk toplevel can be embedded using the -use option). The window will support the appropriate window manager protocols for things like geometry requests. The window should not have any children of its own in this application. This option may not be changed with the configure widget command. Note that -borderwidth, -padx and -pady are ignored when configured as a container since a container has no border. Height Specifies the desired height for the window in any of the forms acceptable to Tk_GetPixels. If this option is negative or zero then the window will not request any size at all. Note that this sets the total height of the frame, any -borderwidth or similar is not added. Normally -height should not be used if a propagating geometry manager, such as grid or pack, is used within the frame since the geometry manager will override the height of the frame. Tile This specifies how to draw the background image (see -backgroundimage) on the frame. If true (according to Tcl_GetBoolean), the image will be tiled to fill the whole frame, with the origin of the first copy of the image being the top left of the interior of the frame. If false (the default), the image will be centered within the frame. Visual Specifies visual information for the new window in any of the forms accepted by Tk_GetVisual. If this option is not specified, the new window will use the same visual as its parent. The -visual option may not be modified with the configure widget command. Width Specifies the desired width for the window in any of the forms acceptable to Tk_GetPixels. If this option is negative or zero then the window will not request any size at all. Note that this sets the total width of the frame, any -borderwidth or similar is not added. Normally -width should not be used if a propagating geometry manager, such as grid or pack, is used within the frame since the geometry manager will override the width of the frame. type Img P added in v0.4.10 type Img struct { // contains filtered or unexported fields } Img represents a Tk image. func NewBitmap P added in v0.5.18 func NewBitmap(options ...Opt) *Img * Description Bitmap -- Images that display two colors Description P A bitmap is an image whose pixels can display either of two colors or be transparent. A bitmap image is defined by four things: a background color, a foreground color, and two bitmaps, called the source and the mask. Each of the bitmaps specifies 0/1 values for a rectangular array of pixels, and the two bitmaps must have the same dimensions. For pixels where the mask is zero, the image displays nothing, producing a transparent effect. For other pixels, the image displays the foreground color if the source data is one and the background color if the source data is zero. Additional information might be available at the Tcl/Tk bitmap page. * Background color Specifies a background color for the image in any of the standard ways accepted by Tk. If this option is set to an empty string then the background pixels will be transparent. This effect is achieved by using the source bitmap as the mask bitmap, ignoring any -maskdata or -maskfile options. * Data string Specifies the contents of the source bitmap as a string. The string must adhere to X11 bitmap format (e.g., as generated by the bitmap program). If both the -data and -file options are specified, the -data option takes precedence. * File name name gives the name of a file whose contents define the source bitmap. The file must adhere to X11 bitmap format (e.g., as generated by the bitmap program). * Foreground color Specifies a foreground color for the image in any of the standard ways accepted by Tk. * Maskdata string Specifies the contents of the mask as a string. The string must adhere to X11 bitmap format (e.g., as generated by the bitmap program). If both the -maskdata and -maskfile options are specified, the -maskdata option takes precedence. * Maskfile name name gives the name of a file whose contents define the mask. The file must adhere to X11 bitmap format (e.g., as generated by the bitmap program). func NewPhoto P added in v0.5.18 func NewPhoto(options ...Opt) *Img Photo -- Full-color images A photo is an image whose pixels can display any color with a varying degree of transparency (the alpha channel). A photo image is stored internally in full color (32 bits per pixel), and is displayed using dithering if necessary. Image data for a photo image can be obtained from a file or a string, or it can be supplied from C code through a procedural interface. At present, only PNG, GIF, PPM/PGM, and (read-only) SVG formats are supported, but an interface exists to allow additional image file formats to be added easily. A photo image is (semi)transparent if the image data it was obtained from had transparency information. In regions where no image data has been supplied, it is fully transparent. Transparency may also be modified with the transparency set subcommand. * Data string Specifies the contents of the image as a string. The string should contain binary data or, for some formats, base64-encoded data (this is currently guaranteed to be supported for PNG and GIF images). The format of the string must be one of those for which there is an image file format handler that will accept string data. If both the -data and -file options are specified, the -file option takes precedence. * Format format-name Specifies the name of the file format for the data specified with the -data or -file option. * File name name gives the name of a file that is to be read to supply data for the photo image. The file format must be one of those for which there is an image file format handler that can read data. * Gamma value Specifies that the colors allocated for displaying this image in a window should be corrected for a non-linear display with the specified gamma exponent value. (The intensity produced by most CRT displays is a power function of the input value, to a good approximation; gamma is the exponent and is typically around 2). The value specified must be greater than zero. The default value is one (no correction). In general, values greater than one will make the image lighter, and values less than one will make it darker. * Height number Specifies the height of the image, in pixels. This option is useful primarily in situations where the user wishes to build up the contents of the image piece by piece. A value of zero (the default) allows the image to expand or shrink vertically to fit the data stored in it. * Palette palette-spec Specifies the resolution of the color cube to be allocated for displaying this image, and thus the number of colors used from the colormaps of the windows where it is displayed. The palette-spec string may be either a single decimal number, specifying the number of shades of gray to use, or three decimal numbers separated by slashes (/), specifying the number of shades of red, green and blue to use, respectively. If the first form (a single number) is used, the image will be displayed in monochrome (i.e., grayscale). * Width number Specifies the width of the image, in pixels. This option is useful primarily in situations where the user wishes to build up the contents of the image piece by piece. A value of zero (the default) allows the image to expand or shrink horizontally to fit the data stored in it. Additional information might be available at the Tcl/Tk photo page. func (*Img) Copy P added in v0.20.0 func (m *Img) Copy(src *Img, options ...Opt) (r *Img) photo -- Full-color images Copies a region from the image called sourceImage (which must be a photo image) to the image called imageName, possibly with pixel zooming and/or subsampling. If no options are specified, this command copies the whole of sourceImage into imageName, starting at coordinates (0,0) in imageName. The following options may be specified: * From x1 y1 x2 y2 Specifies a rectangular sub-region of the source image to be copied. (x1,y1) and (x2,y2) specify diagonally opposite corners of the rectangle. If x2 and y2 are not specified, the default value is the bottom-right corner of the source image. The pixels copied will include the left and top edges of the specified rectangle but not the bottom or right edges. If the -from option is not given, the default is the whole source image. * To x1 y1 x2 y2 Specifies a rectangular sub-region of the destination image to be affected. (x1,y1) and (x2,y2) specify diagonally opposite corners of the rectangle. If x2 and y2 are not specified, the default value is (x1,y1) plus the size of the source region (after subsampling and zooming, if specified). If x2 and y2 are specified, the source region will be replicated if necessary to fill the destination region in a tiled fashion. The function returns 'm'. Additional information might be available at the Tcl/Tk photo page. func (*Img) Delete P added in v0.31.0 func (m *Img) Delete() * Description image -- Create and manipulate images Description P Deletes 'm!. If there are instances of the image displayed in widgets, the image will not actually be deleted until all of the instances are released. However, the association between the instances and the image manager will be dropped. Existing instances will retain their sizes but redisplay as empty areas. If a deleted image is recreated with another call to image create, the existing instances will use the new image. func (*Img) Graph P added in v0.9.1 func (m *Img) Graph(script string) *Img Graph -- use gnuplot to draw on a photo. Graph returns 'm' The 'script' argument is passed to a gnuplot executable, which must be installed on the machine. See the gnuplot site for documentation about producing graphs. The script must not use the 'set term ' command. The content of 'm' is replaced, including its internal name. func (*Img) Height P added in v0.9.0 func (m *Img) Height() string Height -- Get the configured option value. Additional information might be available at the Tcl/Tk photo page. func (*Img) String P added in v0.5.18 func (m *Img) String() string String implements fmt.Stringer. func (*Img) Width P added in v0.9.0 func (m *Img) Width() string Width -- Get the configured option value. Additional information might be available at the Tcl/Tk photo page. type LC P added in v0.5.18 type LC struct { Line int // 1-based line number within the text content. Char int // 0-based char number within the line. } LC encodes a text index consisting of a line and char number. func (LC) String P added in v0.5.18 func (lc LC) String() string String implements fmt.Stringer. type LabelWidget P added in v0.11.0 type LabelWidget struct { *Window } LabelWidget represents the Tcl/Tk label widget/window func Label P added in v0.2.0 func Label(options ...Opt) *LabelWidget * Description * Standard options * Widget specific options Label -- Create and manipulate 'label' non-interactive text or image widgets Description P The label command creates a new window (given by the pathName argument) and makes it into a label widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the label such as its colors, font, text, and initial relief. The label command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A label is a widget that displays a textual string, bitmap or image. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the -wraplength option) and one of the characters may optionally be underlined using the The label can be manipulated in a few simple ways, such as changing its relief or text, using the commands described below. Use Window.Label to create a Label with a particular parent. More information might be available at the Tcl/Tk label page. Standard options P * Activebackground * Activeforeground * Anchor * Background * Bitmap * Borderwidth * Compound * Cursor * Disabledforeground * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Image * Justify * Padx * Pady * Relief * Takefocus * Textvariable * Txt * Underline * Wraplength Widget specific options P Height Specifies a desired height for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option is not specified, the label's desired height is computed from the size of the image or bitmap or text being displayed in it. State Specifies one of three states for the label: normal, active, or disabled. In normal state the button is displayed using the -foreground and -background options. In active state the label is displayed using the -activeforeground and -activebackground options. In the disabled state the -disabledforeground and -background options determine how the button is displayed. Width Specifies a desired width for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option is not specified, the label's desired width is computed from the size of the image or bitmap or text being displayed in it. type LabelframeWidget P added in v0.11.0 type LabelframeWidget struct { *Window } LabelframeWidget represents the Tcl/Tk labelframe widget/window func Labelframe P added in v0.2.0 func Labelframe(options ...Opt) *LabelframeWidget * Description * Standard options * Widget specific options Labelframe -- Create and manipulate 'labelframe' labelled container widgets Description P The labelframe command creates a new window (given by the pathName argument) and makes it into a labelframe widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the labelframe such as its background color and relief. The labelframe command returns the path name of the new window. A labelframe is a simple widget. Its primary purpose is to act as a spacer or container for complex window layouts. It has the features of a frame plus the ability to display a label. Use Window.Labelframe to create a Labelframe with a particular parent. More information might be available at the Tcl/Tk labelframe page. Standard options P * Borderwidth * Cursor * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Padx * Pady * Relief * Takefocus * Txt Widget specific options P Background This option is the same as the standard -background option except that its value may also be specified as an empty string. In this case, the widget will display no background or border, and no colors will be consumed from its colormap for its background and border. Class Specifies a class for the window. This class will be used when querying the option database for the window's other options, and it will also be used later for other purposes such as bindings. The -class option may not be changed with the configure widget command. Colormap Specifies a colormap to use for the window. The value may be either new, in which case a new colormap is created for the window and its children, or the name of another window (which must be on the same screen and have the same visual as pathName), in which case the new window will use the colormap from the specified window. If the -colormap option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the configure widget command. Height Specifies the desired height for the window in any of the forms acceptable to Tk_GetPixels. If this option is negative or zero then the window will not request any size at all. Labelanchor Specifies where to place the label. A label is only displayed if the -text option is not the empty string. Valid values for this option are (listing them clockwise) nw, n, ne, en, e, es, se, s,sw, ws, w and wn. The default value is nw. Labelwidget Specifies a widget to use as label. This overrides any -text option. The widget must exist before being used as -labelwidget and if it is not a descendant of this window, it will be raised above it in the stacking order. Visual Specifies visual information for the new window in any of the forms accepted by Tk_GetVisual. If this option is not specified, the new window will use the same visual as its parent. The -visual option may not be modified with the configure widget command. Width Specifies the desired width for the window in any of the forms acceptable to Tk_GetPixels. If this option is negative or zero then the window will not request any size at all. type ListboxWidget P added in v0.11.0 type ListboxWidget struct { *Window } ListboxWidget represents the Tcl/Tk listbox widget/window func Listbox P added in v0.2.0 func Listbox(options ...Opt) *ListboxWidget * Description * Standard options * Widget specific options Listbox -- Create and manipulate 'listbox' item list widgets Description P The listbox command creates a new window (given by the pathName argument) and makes it into a listbox widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the listbox such as its colors, font, text, and relief. The listbox command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A listbox is a widget that displays a list of strings, one per line. When first created, a new listbox has no elements. Elements may be added or deleted using widget commands described below. In addition, one or more elements may be selected as described below. If a listbox is exporting its selection (see -exportselection option), then it will observe the standard X11 protocols for handling the selection. Listbox selections are available as type STRING; the value of the selection will be the text of the selected elements, with newlines separating the elements. It is not necessary for all the elements to be displayed in the listbox window at once; commands described below may be used to change the view in the window. Listboxes allow scrolling in both directions using the standard -xscrollcommand and -yscrollcommand options. They also support scanning, as described below. Use Window.Listbox to create a Listbox with a particular parent. More information might be available at the Tcl/Tk listbox page. Standard options P * Background * Borderwidth * Cursor * Disabledforeground * Exportselection * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Justify * Relief * Selectbackground * Selectborderwidth * Selectforeground * Setgrid * Takefocus * Xscrollcommand * Yscrollcommand Widget specific options P Activestyle Specifies the style in which to draw the active element. This must be one of dotbox (show a focus ring around the active element), none (no special indication of active element) or underline (underline the active element). The default is underline on Windows, and dotbox elsewhere. Height Specifies the desired height for the window, in lines. If zero or less, then the desired height for the window is made just large enough to hold all the elements in the listbox. Listvariable Specifies the name of a global variable. The value of the variable is a list to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. Attempts to assign a variable with an invalid list value to -listvariable will cause an error. Attempts to unset a variable in use as a -listvariable will fail but will not generate an error. Selectmode Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, browse, multiple, or extended; the default value is browse. State Specifies one of two states for the listbox: normal or disabled. If the listbox is disabled then items may not be inserted or deleted, items are drawn in the -disabledforeground color, and selection cannot be modified and is not shown (though selection information is retained). Width Specifies the desired width for the window in characters. If the font does not have a uniform width then the width of the character is used in translating from character units to screen units. If zero or less, then the desired width for the window is made just large enough to hold all the elements in the listbox. type MenuItem P added in v0.47.0 type MenuItem struct { // contains filtered or unexported fields } MenuItem represents an entry on a menu. func (*MenuItem) String P added in v0.47.0 func (m *MenuItem) String() string String implements fmt.Stringer. type MenuWidget P added in v0.11.0 type MenuWidget struct { *Window } MenuWidget represents the Tcl/Tk menu widget/window func Menu P added in v0.2.0 func Menu(options ...Opt) *MenuWidget * Standard options * Widget specific options Menu -- Create and manipulate 'menu' widgets and menubars Use Window.Menu to create a Menu with a particular parent. More information might be available at the Tcl/Tk menu page. Standard options P * Activebackground * Activeborderwidth * Activeforeground * Activerelief * Background * Borderwidth * Cursor * Disabledforeground * Foreground * Relief * Takefocus Widget specific options P Postcommand If this option is specified then it provides a Tcl command to execute each time the menu is posted. The command is invoked by the post widget command before posting the menu. Note that in Tk 8.0 on Macintosh and Windows, all post-commands in a system of menus are executed before any of those menus are posted. This is due to the limitations in the individual platforms' menu managers. Selectcolor For menu entries that are check buttons or radio buttons, this option specifies the color to display in the indicator when the check button or radio button is selected. Tearoff This option must have a proper boolean value (default is false), which specifies whether or not the menu should include a tear-off entry at the top. If so, it will exist as entry 0 of the menu and the other entries will number starting at 1. The default menu bindings arrange for the menu to be torn off when the tear-off entry is invoked. This option is ignored under Aqua/macOS, where menus cannot be torn off. Tearoffcommand If this option has a non-empty value, then it specifies a Tcl command to invoke whenever the menu is torn off. The actual command will consist of the value of this option, followed by a space, followed by the name of the menu window, followed by a space, followed by the name of the name of the torn off menu window. For example, if the option's value is and menu .x.y is torn off to create a new menu .x.tearoff1, then the command will be invoked. This option is ignored under Aqua/macOS, where menus cannot be torn off. Title The string will be used to title the window created when this menu is torn off. If the title is NULL, then the window will have the title of the menubutton or the text of the cascade item from which this menu was invoked. Type This option can be one of menubar, tearoff, or normal, and is set when the menu is created. While the string returned by the configuration database will change if this option is changed, this does not affect the menu widget's behavior. This is used by the cloning mechanism and is not normally set outside of the Tk library. func (*MenuWidget) AddCascade P added in v0.15.0 func (w *MenuWidget) AddCascade(options ...Opt) *MenuItem * Description Menu -- Create and manipulate 'menu' widgets and menubars Description P Add a new cascade entry to the end of the menu. Additional information might be available at the Tcl/Tk menu page. func (*MenuWidget) AddCheckbutton P added in v0.41.0 func (w *MenuWidget) AddCheckbutton(options ...Opt) *MenuItem * Description Menu -- Create and manipulate 'menu' widgets and menubars Description P Add a new checkbutton entry to the bottom of the menu. Additional information might be available at the Tcl/Tk menu page. func (*MenuWidget) AddCommand P added in v0.15.0 func (w *MenuWidget) AddCommand(options ...Opt) *MenuItem * Description Menu -- Create and manipulate 'menu' widgets and menubars Description P Add a new command entry to the bottom of the menu. Additional information might be available at the Tcl/Tk menu page. func (*MenuWidget) AddRadiobutton P added in v0.41.0 func (w *MenuWidget) AddRadiobutton(options ...Opt) *MenuItem * Description Menu -- Create and manipulate 'menu' widgets and menubars Description P Add a new radiobutton entry to the bottom of the menu. Additional information might be available at the Tcl/Tk menu page. func (*MenuWidget) AddSeparator P added in v0.15.0 func (w *MenuWidget) AddSeparator(options ...Opt) *MenuItem * Description Menu -- Create and manipulate 'menu' widgets and menubars Description P Add a new separator entry to the bottom of the menu. Additional information might be available at the Tcl/Tk menu page. func (*MenuWidget) EntryConfigure P added in v0.47.0 func (w *MenuWidget) EntryConfigure(index uint, options ...Opt) * Description Menu -- Create and manipulate 'menu' widgets and menubars Description P This command is similar to the configure command, except that it applies to the options for an individual entry, whereas configure applies to the options for the menu as a whole. Options may have any of the values described in the MENU ENTRY OPTIONS section below. If options are specified, options are modified as indicated in the command and the command returns an empty string. If no options are specified, returns a list describing the current options for entry index (see Tk_ConfigureInfo for information on the format of this list). Additional information might be available at the Tcl/Tk menu page. func (*MenuWidget) Invoke P added in v0.15.0 func (w *MenuWidget) Invoke(index uint) * Description Menu -- Create and manipulate 'menu' widgets and menubars Description P Invoke the action of the menu entry. See the sections on the individual entries above for details on what happens. If the menu entry is disabled then nothing happens. If the entry has a command associated with it then the result of that command is returned as the result of the invoke widget command. Otherwise the result is an empty string. Note: invoking a menu entry does not automatically unpost the menu; the default bindings normally take care of this before invoking the invoke widget command. Additional information might be available at the Tcl/Tk menu page. type MenubuttonWidget P added in v0.11.0 type MenubuttonWidget struct { *Window } MenubuttonWidget represents the Tcl/Tk menubutton widget/window func Menubutton P added in v0.2.0 func Menubutton(options ...Opt) *MenubuttonWidget * Standard options * Widget specific options Menubutton -- Create and manipulate 'menubutton' pop-up menu indicator widgets Use Window.Menubutton to create a Menubutton with a particular parent. More information might be available at the Tcl/Tk menubutton page. Standard options P * Activebackground * Activeforeground * Anchor * Background * Bitmap * Borderwidth * Compound * Cursor * Disabledforeground * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Image * Justify * Padx * Pady * Relief * Takefocus * Textvariable * Txt * Underline * Wraplength Widget specific options P Direction Specifies where the menu is going to be popup up. above tries to pop the menu above the menubutton. below tries to pop the menu below the menubutton. left tries to pop the menu to the left of the menubutton. right tries to pop the menu to the right of the menu button. flush pops the menu directly over the menubutton. In the case of above or below, the direction will be reversed if the menu would show offscreen. Height Specifies a desired height for the menubutton. If an image or bitmap is being displayed in the menubutton then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option is not specified, the menubutton's desired height is computed from the size of the image or bitmap or text being displayed in it. Indicatoron The value must be a proper boolean value. If it is true then a small indicator rectangle will be displayed on the right side of the menubutton and the default menu bindings will treat this as an option menubutton. If false then no indicator will be displayed. Mnu Specifies the path name of the menu associated with this menubutton. The menu must be a child of the menubutton. State Specifies one of three states for the menubutton: normal, active, or disabled. In normal state the menubutton is displayed using the foreground and background options. The active state is typically used when the pointer is over the menubutton. In active state the menubutton is displayed using the -activeforeground and -activebackground options. Disabled state means that the menubutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the -disabledforeground and -background options determine how the button is displayed. Width Specifies a desired width for the menubutton. If an image or bitmap is being displayed in the menubutton then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option is not specified, the menubutton's desired width is computed from the size of the image or bitmap or text being displayed in it. type MessageWidget P added in v0.11.0 type MessageWidget struct { *Window } MessageWidget represents the Tcl/Tk message widget/window func Message P added in v0.2.0 func Message(options ...Opt) *MessageWidget * Description * Standard options * Widget specific options Message -- Create and manipulate 'message' non-interactive text widgets Description P The message command creates a new window (given by the pathName argument) and makes it into a message widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the message such as its colors, font, text, and initial relief. The message command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A message is a widget that displays a textual string. A message widget has three special features that differentiate it from a label widget. First, it breaks up its string into lines in order to produce a given aspect ratio for the window. The line breaks are chosen at word boundaries wherever possible (if not even a single word would fit on a line, then the word will be split across lines). Newline characters in the string will force line breaks; they can be used, for example, to leave blank lines in the display. The second feature of a message widget is justification. The text may be displayed left-justified (each line starts at the left side of the window), centered on a line-by-line basis, or right-justified (each line ends at the right side of the window). The third feature of a message widget is that it handles control characters and non-printing characters specially. Tab characters are replaced with enough blank space to line up on the next 8-character boundary. Newlines cause line breaks. Other control characters (ASCII code less than 0x20) and characters not defined in the font are displayed as a four-character sequence \exhh where hh is the two-digit hexadecimal number corresponding to the character. In the unusual case where the font does not contain all of the characters in 0123456789abcdef\ex then control characters and undefined characters are not displayed at all. Use Window.Message to create a Message with a particular parent. More information might be available at the Tcl/Tk message page. Standard options P * Anchor * Background * Borderwidth * Cursor * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Padx * Pady * Relief * Takefocus * Textvariable * Txt Widget specific options P Aspect Specifies a non-negative integer value indicating desired aspect ratio for the text. The aspect ratio is specified as 100*width/ height. 100 means the text should be as wide as it is tall, 200 means the text should be twice as wide as it is tall, 50 means the text should be twice as tall as it is wide, and so on. Used to choose line length for text if -width option is not specified. Defaults to 150. Justify Specifies how to justify lines of text. Must be one of left, center, or right. Defaults to left. This option works together with the -anchor, -aspect, -padx, -pady, and -width options to provide a variety of arrangements of the text within the window. The -aspect and -width options determine the amount of screen space needed to display the text. The -anchor, -padx, and -pady options determine where this rectangular area is displayed within the widget's window, and the -justify option determines how each line is displayed within that rectangular region. For example, suppose -anchor is e and -justify is left, and that the message window is much larger than needed for the text. The text will be displayed so that the left edges of all the lines line up and the right edge of the longest line is -padx from the right side of the window; the entire text block will be centered in the vertical span of the window. Width Specifies the length of lines in the window. The value may have any of the forms acceptable to Tk_GetPixels. If this option has a value greater than zero then the -aspect option is ignored and the -width option determines the line length. If this option value is negative or zero, then the -aspect option determines the line length. type Opt P added in v0.2.0 type Opt interface { // contains filtered or unexported methods } Opt represents an optional argument. func Accelerator P added in v0.4.10 func Accelerator(val any) Opt Accelerator option. Known uses: * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) func Activebackground P added in v0.2.0 func Activebackground(val any) Opt Activebackground option. Specifies background color to use when drawing active elements. An element (a widget or portion of a widget) is active if the mouse cursor is positioned over the element and pressing a mouse button will cause some action to occur. If strict Motif compliance has been requested by setting the tk_strictMotif variable, this option will normally be ignored; the normal background color will be used instead. For some elements on Windows and Macintosh systems, the active color will only be used while mouse button 1 is pressed over the element. Known uses: * Button * Checkbutton * Label * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menu * Menubutton * Radiobutton * Scale * Scrollbar * Spinbox func Activeborderwidth P added in v0.2.0 func Activeborderwidth(val any) Opt Activeborderwidth option. Specifies a non-negative value indicating the width of the 3-D border drawn around active elements. See above for definition of active elements. The value may have any of the forms acceptable to Tk_GetPixels. This option is typically only available in widgets displaying more than one element at a time (e.g. menus but not buttons). Known uses: * Menu func Activeforeground P added in v0.2.0 func Activeforeground(val any) Opt Activeforeground option. Specifies foreground color to use when drawing active elements. See above for definition of active elements. Known uses: * Button * Checkbutton * Label * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menu * Menubutton * Radiobutton func Activerelief P added in v0.2.0 func Activerelief(val any) Opt Activerelief option. Specifies the 3-D effect desired for the active item of the widget. See the -relief option for details. Known uses: * Menu * Scrollbar (widget specific) func Activestyle P added in v0.3.0 func Activestyle(val any) Opt Activestyle option. Known uses: * Listbox (widget specific) func After P added in v0.4.10 func After(val any) Opt After option. Known uses: * Pack (command specific) func Align P added in v0.4.10 func Align(val any) Opt Align option. Known uses: * Text (widget specific, applies to embedded images) func Anchor P added in v0.2.0 func Anchor(val any) Opt Anchor option. Specifies how the information in a widget (e.g. text or a bitmap) is to be displayed in the widget. Must be one of the values n, ne, e, se, s, sw, w, nw, or center. For example, nw means display the information such that its top-left corner is at the top-left corner of the widget. Known uses: * Button * Checkbutton * Label * Menubutton * Message * Pack (command specific) * Place (command specific) * Radiobutton * TLabel * TProgressbar func Arrowcolor P added in v0.25.1 func Arrowcolor(val any) Opt Arrowcolor -- Styling widgets Arrowcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Arrowsize P added in v0.25.1 func Arrowsize(val any) Opt Arrowsize -- Styling widgets Arrowsize is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Aspect P added in v0.3.0 func Aspect(val any) Opt Aspect option. Known uses: * Message (widget specific) func Autoseparators P added in v0.3.0 func Autoseparators(val any) Opt Autoseparators option. Known uses: * Text (widget specific) func Background P added in v0.2.0 func Background(val any) Opt Background option. Specifies the normal background color to use when displaying the widget. Known uses: * Button * Canvas * Checkbutton * Entry * Frame (widget specific) * Label * Labelframe (widget specific) * Listbox * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menu * Menubutton * Message * NewBitmap (command specific) * Panedwindow * Radiobutton * Scale * Scrollbar * Spinbox * TLabel (widget specific) * TextWidget.TagConfigure (command specific) * Text * Toplevel (widget specific) func Backgroundimage P added in v0.3.0 func Backgroundimage(val any) Opt Backgroundimage option. Known uses: * Frame (widget specific) * Toplevel (widget specific) func Backward P added in v0.44.0 func Backward() Opt Backward option. Known uses: * Text (widget specific, applies to Search) func Before P added in v0.4.10 func Before(val any) Opt Before option. Known uses: * Pack (command specific) func Bgstipple P added in v0.4.10 func Bgstipple(val any) Opt Bgstipple option. Known uses: * TextWidget.TagConfigure (command specific) func Bigincrement P added in v0.3.0 func Bigincrement(val any) Opt Bigincrement option. Known uses: * Scale (widget specific) func Bitmap P added in v0.2.0 func Bitmap(val any) Opt Bitmap option. Specifies a bitmap to display in the widget, in any of the forms acceptable to Tk_GetBitmap. The exact way in which the bitmap is displayed may be affected by other options such as -anchor or -justify. Typically, if this option is specified then it overrides other options that specify a textual value to display in the widget but this is controlled by the -compound option; the -bitmap option may be reset to an empty string to re-enable a text display. In widgets that support both -bitmap and -image options, -image will usually override -bitmap. Known uses: * Button * Checkbutton * Label * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menubutton * Radiobutton func Blockcursor P added in v0.3.0 func Blockcursor(val any) Opt Blockcursor option. Known uses: * Text (widget specific) func Border P added in v0.4.10 func Border(val any) Opt Border option. Known uses: * StyleLayout func Bordercolor P added in v0.25.1 func Bordercolor(val any) Opt Bordercolor -- Styling widgets Bordercolor is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Bordermode P added in v0.4.10 func Bordermode(val any) Opt Bordermode option. Known uses: * Place (command specific) func Borderwidth P added in v0.2.0 func Borderwidth(val any) Opt Borderwidth option. Specifies a non-negative value indicating the width of the 3-D border to draw around the outside of the widget (if such a border is being drawn; the -relief option typically determines this). The value may also be used when drawing 3-D effects in the interior of the widget. The value may have any of the forms acceptable to Tk_GetPixels. Known uses: * Button * Canvas * Checkbutton * Entry * Frame * Label * Labelframe * Listbox * Menu * Menubutton * Message * Panedwindow * Radiobutton * Scale * Scrollbar * Spinbox * TFrame (widget specific) * TextWidget.TagConfigure (command specific) * Text * Toplevel func Buttonbackground P added in v0.3.0 func Buttonbackground(val any) Opt Buttonbackground option. Known uses: * Spinbox (widget specific) func Buttoncursor P added in v0.3.0 func Buttoncursor(val any) Opt Buttoncursor option. Known uses: * Spinbox (widget specific) func Buttondownrelief P added in v0.3.0 func Buttondownrelief(val any) Opt Buttondownrelief option. Known uses: * Spinbox (widget specific) func Buttonuprelief P added in v0.3.0 func Buttonuprelief(val any) Opt Buttonuprelief option. Known uses: * Spinbox (widget specific) func Chars P added in v0.48.0 func Chars() Opt Chars option. Known uses: * TextWidget (command specific) func Children P added in v0.4.10 func Children(list ...any) Opt Children option. Known uses: * StyleLayout Children describes children of a style layout. func Class P added in v0.3.0 func Class(val any) Opt Class option. Specifies the window class. The class is used when querying the option database for the window's other options, to determine the default bindtags for the window, and to select the widget's default layout and style. This is a read-only option: it may only be specified when the window is created, and may not be changed with the configure widget command. Known uses: * Frame (widget specific) * Labelframe (widget specific) * TButton * TCheckbutton * TCombobox * TEntry * TFrame * TLabel * TLabelframe * TMenubutton * TNotebook * TPanedwindow * TProgressbar * TRadiobutton * TScale * TScrollbar * TSeparator * TSizegrip * TSpinbox * TTreeview * Toplevel (widget specific) func Closeenough P added in v0.3.0 func Closeenough(val any) Opt Closeenough option. Known uses: * Canvas (widget specific) func Colormap P added in v0.3.0 func Colormap(val any) Opt Colormap option. Known uses: * Frame (widget specific) * Labelframe (widget specific) * Toplevel (widget specific) func Column P added in v0.4.10 func Column(val any) Opt Column option. Known uses: * Grid (command specific) func Columnbreak P added in v0.4.10 func Columnbreak(val any) Opt Columnbreak option. Known uses: * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) func Columns P added in v0.3.0 func Columns(val any) Opt Columns option. Known uses: * TTreeview (widget specific) func Columnseparatorwidth P added in v0.25.1 func Columnseparatorwidth(val any) Opt Columnseparatorwidth -- Styling widgets Columnseparatorwidth is a styling option of a ttk::treeview. More information might be available at the Tcl/Tk ttk_treeview page. func Columnspan P added in v0.4.10 func Columnspan(val any) Opt Columnspan option. Known uses: * Grid (command specific) func Command P added in v0.3.0 func Command(handler any) Opt Command option. See also Event handlers. Known uses: * Button (widget specific) * Checkbutton (widget specific) * Fontchooser (command specific) * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * MessageBox (command specific) * Radiobutton (widget specific) * Scale (widget specific) * Scrollbar (widget specific) * Spinbox (widget specific) * TButton (widget specific) * TCheckbutton (widget specific) * TRadiobutton (widget specific) * TScale (widget specific) * TScrollbar (widget specific) * TSpinbox (widget specific) func Compound P added in v0.2.0 func Compound(val any) Opt Compound option. Specifies if the widget should display text and bitmaps/images at the same time, and if so, where the bitmap/image should be placed relative to the text. Must be one of the values none, bottom, top, left, right, or center. For example, the (default) value none specifies that the bitmap or image should (if defined) be displayed instead of the text, the value left specifies that the bitmap or image should be displayed to the left of the text, and the value center specifies that the bitmap or image should be displayed on top of the text. Known uses: * Button * Checkbutton * Label * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menubutton * Radiobutton * TButton * TCheckbutton * TLabel * TMenubutton * TNotebook (widget specific) * TRadiobutton func Confine P added in v0.3.0 func Confine(val any) Opt Confine option. Known uses: * Canvas (widget specific) func Confirmoverwrite P added in v0.4.10 func Confirmoverwrite(val any) Opt Confirmoverwrite option. Known uses: * GetSaveFile (command specific) func Container P added in v0.3.0 func Container(val any) Opt Container option. Known uses: * Frame (widget specific) * Toplevel (widget specific) func Cursor P added in v0.2.0 func Cursor(val any) Opt Cursor option. Specifies the mouse cursor to be used for the widget. The value may have any of the forms acceptable to Tk_GetCursor. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification. Known uses: * Button * Canvas * Checkbutton * Entry * Frame * Label * Labelframe * Listbox * Menu * Menubutton * Message * Panedwindow * Radiobutton * Scale * Scrollbar * Spinbox * TButton * TCheckbutton * TCombobox * TEntry * TFrame * TLabel * TLabelframe * TMenubutton * TNotebook * TPanedwindow * TProgressbar * TRadiobutton * TScale * TScrollbar * TSeparator * TSizegrip * TSpinbox * TTreeview * Text * Toplevel * Window.Busy (command specific) func Darkcolor P added in v0.25.1 func Darkcolor(val any) Opt Darkcolor -- Styling widgets Darkcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Data P added in v0.4.10 func Data(val any) Opt Data option. Known uses: * NewBitmap (command specific) * NewPhoto (command specific) func Default P added in v0.3.0 func Default(val any) Opt Default option. Known uses: * Button (widget specific) * MessageBox (command specific) * TButton (widget specific) func Defaultextension P added in v0.4.10 func Defaultextension(val any) Opt Defaultextension option. Known uses: * GetOpenFile (command specific) * GetSaveFile (command specific) func Detail P added in v0.4.10 func Detail(val any) Opt Detail option. Known uses: * MessageBox (command specific) func Digits P added in v0.3.0 func Digits(val any) Opt Digits option. Known uses: * Scale (widget specific) func Direction P added in v0.3.0 func Direction(val any) Opt Direction option. Known uses: * Menubutton (widget specific) * TMenubutton (widget specific) func Disabledbackground P added in v0.3.0 func Disabledbackground(val any) Opt Disabledbackground option. Known uses: * Entry (widget specific) * Spinbox (widget specific) func Disabledforeground P added in v0.2.0 func Disabledforeground(val any) Opt Disabledforeground option. Specifies foreground color to use when drawing a disabled element. If the option is specified as an empty string (which is typically the case on monochrome displays), disabled elements are drawn with the normal foreground color but they are dimmed by drawing them with a stippled fill pattern. Known uses: * Button * Checkbutton * Entry (widget specific) * Label * Listbox * Menu * Menubutton * Radiobutton * Spinbox (widget specific) func Displaychars P added in v0.48.0 func Displaychars() Opt Displaychars option. Known uses: * TextWidget (command specific) func Displaycolumns P added in v0.3.0 func Displaycolumns(val any) Opt Displaycolumns option. Known uses: * TTreeview (widget specific) func Displayindices P added in v0.48.0 func Displayindices() Opt Displayindices option. Known uses: * TextWidget (command specific) func Displaylines P added in v0.48.0 func Displaylines() Opt Displaylines option. Known uses: * TextWidget (command specific) func Displayof P added in v0.4.8 func Displayof(val any) Opt Displayof option. Known uses: * Bell (command specific) * ClipboardAppend (command specific) * ClipboardClear (command specific) * ClipboardGet (command specific) * Focus (command specific) * FontFamilies (command specific) func Elementborderwidth P added in v0.3.0 func Elementborderwidth(val any) Opt Elementborderwidth option. Known uses: * Scrollbar (widget specific) func Elide P added in v0.4.10 func Elide(val any) Opt Elide option. Known uses: * TextWidget.TagConfigure (command specific) func Endline P added in v0.3.0 func Endline(val any) Opt Endline option. Known uses: * Text (widget specific) func ExitHandler P added in v0.5.18 func ExitHandler() Opt ExitHandler returns a canned Command that destroys the App. func Expand P added in v0.4.10 func Expand(val any) Opt Expand option. Known uses: * Pack (command specific) func Exportselection P added in v0.2.0 func Exportselection(val any) Opt Exportselection option. Specifies whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by Tcl_GetBoolean, such as true, false, 0, 1, yes, or no. If the selection is exported, then selecting in the widget deselects the current X selection, selecting outside the widget deselects any widget selection, and the widget will respond to selection retrieval requests when it has a selection. The default is usually for widgets to export selections. Known uses: * Entry * Listbox * Spinbox * TCombobox (widget specific) * TEntry (widget specific) * Text func Family P added in v0.4.10 func Family(val any) Opt Family option. Known uses: * NewFont (command specific) func Fgstipple P added in v0.4.10 func Fgstipple(val any) Opt Fgstipple option. Known uses: * TextWidget.TagConfigure (command specific) func Fieldbackground P added in v0.25.1 func Fieldbackground(val any) Opt Fieldbackground -- Styling widgets Fieldbackground is a styling option of one or more widgets. Please see Changing Widget Colors for details. func File P added in v0.4.10 func File(val any) Opt File option. Known uses: * NewBitmap (command specific) * NewPhoto (command specific) func Filetypes P added in v0.4.10 func Filetypes(val any) Opt Filetypes option. Known uses: * GetOpenFile (command specific) * GetSaveFile (command specific) func Fill P added in v0.4.10 func Fill(val any) Opt Fill option. Known uses: * Pack (command specific) func Focuscolor P added in v0.29.0 func Focuscolor(val any) Opt Focuscolor option. Known uses: * StyleConfigure func Focusfill P added in v0.25.1 func Focusfill(val any) Opt Focusfill -- Styling widgets Focusfill is a styling option of a ttk::combobox. More information might be available at the Tcl/Tk ttk_combobox page. func Focussolid P added in v0.29.0 func Focussolid(val any) Opt Focussolid option. Known uses: * StyleConfigure func Focusthickness P added in v0.29.0 func Focusthickness(val any) Opt Focusthickness option. Known uses: * StyleConfigure func Font P added in v0.2.0 func Font(list ...any) Opt Font option. Specifies the font to use when drawing text inside the widget. The value may have any of the forms described in the font manual page under FONT DESCRIPTION. Known uses: * Button * Checkbutton * Entry * Fontchooser (command specific) * Label * Labelframe * Listbox * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menu * Menubutton * Message * Radiobutton * Scale * Spinbox * TEntry * TLabel * TProgressbar * TextWidget.TagConfigure (command specific) * Text func Force P added in v0.5.18 func Force(val any) Opt Force option. Known uses: * Focus (command specific) func Foreground P added in v0.2.0 func Foreground(val any) Opt Foreground option. Specifies the normal foreground color to use when displaying the widget. Known uses: * Button * Checkbutton * Entry * Label * Labelframe * Listbox * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menu * Menubutton * Message * NewBitmap (command specific) * Radiobutton * Scale * Spinbox * TEntry * TLabel * TProgressbar * TextWidget.TagConfigure (command specific) * Text func Format P added in v0.3.0 func Format(val any) Opt Format option. Known uses: * ClipboardAppend (command specific) * NewPhoto (command specific) * Spinbox (widget specific) * TSpinbox (widget specific) func Forward P added in v0.44.0 func Forward() Opt Forward option. Known uses: * Text (widget specific, applies to Search) func From P added in v0.3.0 func From(val ...any) Opt From option. Known uses: * Img.Copy * Scale (widget specific) * Spinbox (widget specific) * TScale (widget specific) * TSpinbox (widget specific) func Gamma P added in v0.4.10 func Gamma(val any) Opt Gamma option. Known uses: * NewPhoto (command specific) func Gripsize P added in v0.25.1 func Gripsize(val any) Opt Gripsize -- Styling widgets Gripsize is a styling option of a ttk::panedwindow and ttk::scrollbar. More information might be available at the Tcl/Tk ttk_panedwindow or Tcl/Tk ttk_scrollbar page. func Groovewidth P added in v0.25.1 func Groovewidth(val any) Opt Groovewidth -- Styling widgets Groovewidth is a styling option of a ttk::scale. More information might be available at the Tcl/Tk ttk_scale page. func Handlepad P added in v0.3.0 func Handlepad(val any) Opt Handlepad option. Known uses: * Panedwindow (widget specific) func Handlesize P added in v0.3.0 func Handlesize(val any) Opt Handlesize option. Known uses: * Panedwindow (widget specific) func Heading P added in v0.49.0 func Heading(columnId string) Opt Heading option. Known uses: * Tooltip (command specific) func Height P added in v0.3.0 func Height(val any) Opt Height option. Known uses: * Button (widget specific) * Canvas (widget specific) * Checkbutton (widget specific) * Frame (widget specific) * Label (widget specific) * Labelframe (widget specific) * Listbox (widget specific) * Menubutton (widget specific) * NewPhoto (command specific) * Panedwindow (widget specific) * Place (command specific) * Radiobutton (widget specific) * TCombobox (widget specific) * TFrame (widget specific) * TLabelframe (widget specific) * TNotebook (widget specific) * TPanedwindow (widget specific) * TTreeview (widget specific) * Text (widget specific) * Toplevel (widget specific) func Hidemargin P added in v0.4.10 func Hidemargin(val any) Opt Hidemargin option. Known uses: * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) func Highlightbackground P added in v0.2.0 func Highlightbackground(val any) Opt Highlightbackground option. Specifies the color to display in the traversal highlight region when the widget does not have the input focus. Known uses: * Button * Canvas * Checkbutton * Entry * Frame * Label * Labelframe * Listbox * Menubutton * Message * Radiobutton * Scale * Scrollbar * Spinbox * Text * Toplevel func Highlightcolor P added in v0.2.0 func Highlightcolor(val any) Opt Highlightcolor option. Specifies the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus. Known uses: * Button * Canvas * Checkbutton * Entry * Frame * Label * Labelframe * Listbox * Menubutton * Message * Radiobutton * Scale * Scrollbar * Spinbox * Text * Toplevel func Highlightthickness P added in v0.2.0 func Highlightthickness(val any) Opt Highlightthickness option. Specifies a non-negative value indicating the width of the highlight rectangle to draw around the outside of the widget when it has the input focus. The value may have any of the forms acceptable to Tk_GetPixels. If the value is zero, no focus highlight is drawn around the widget. Known uses: * Button * Canvas * Checkbutton * Entry * Frame * Label * Labelframe * Listbox * Menubutton * Message * Radiobutton * Scale * Scrollbar * Spinbox * Text * Toplevel func Icon P added in v0.4.10 func Icon(val any) Opt Icon option. Known uses: * MessageBox (command specific) func Id P added in v0.4.10 func Id(val any) Opt Id option. Known uses: * TTreeviewWidget (command specific) More information might be available at the Tcl/Tk treeview page. func Image P added in v0.2.0 func Image(val any) Opt Image option. Specifies an image to display in the widget, which must have been created with the image create command. Typically, if the -image option is specified then it overrides other options that specify a bitmap or textual value to display in the widget, though this is controlled by the -compound option; the -image option may be reset to an empty string to re-enable a bitmap or text display. Known uses: * Button * Checkbutton * Label * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menubutton * Radiobutton * TButton * TCheckbutton * TLabel * TMenubutton * TNotebook (widget specific) * TRadiobutton func In P added in v0.4.10 func In(val any) Opt In option. Known uses: * Grid (command specific) * Pack (command specific) * Place (command specific) func Inactiveselectbackground P added in v0.3.0 func Inactiveselectbackground(val any) Opt Inactiveselectbackground option. Known uses: * Text (widget specific) func Increment P added in v0.3.0 func Increment(val any) Opt Increment option. Known uses: * Spinbox (widget specific) * TSpinbox (widget specific) func Indent P added in v0.25.1 func Indent(val any) Opt Indent -- Styling widgets Indent is a styling option of a ttk::treeview. More information might be available at the Tcl/Tk ttk_treeview page. func Index P added in v0.49.0 func Index(index any) Opt Index option. Known uses: * Tooltip (command specific) func Indicatorbackground P added in v0.25.1 func Indicatorbackground(val any) Opt Indicatorbackground -- Styling widgets Indicatorbackground is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Indicatorcolor P added in v0.25.1 func Indicatorcolor(val any) Opt Indicatorcolor -- Styling widgets Indicatorcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Indicatormargin P added in v0.25.1 func Indicatormargin(val any) Opt Indicatormargin -- Styling widgets Indicatormargin is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Indicatormargins P added in v0.25.1 func Indicatormargins(val any) Opt Indicatormargins -- Styling widgets Indicatormargins is a styling option of a ttk::treeview. More information might be available at the Tcl/Tk ttk_treeview page. func Indicatoron P added in v0.3.0 func Indicatoron(val any) Opt Indicatoron option. Known uses: * Checkbutton (widget specific) * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menubutton (widget specific) * Radiobutton (widget specific) func Indicatorrelief P added in v0.25.1 func Indicatorrelief(val any) Opt Indicatorrelief -- Styling widgets Indicatorrelief is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Indicatorsize P added in v0.25.1 func Indicatorsize(val any) Opt Indicatorsize -- Styling widgets Indicatorsize is a styling option of a ttk::treeview. More information might be available at the Tcl/Tk ttk_treeview page. func Indices P added in v0.48.0 func Indices() Opt Indices option. Known uses: * TextWidget (command specific) func Info P added in v0.49.0 func Info(info string) Opt Info option. Known uses: * Tooltip (command specific) func Initialcolor P added in v0.4.10 func Initialcolor(val any) Opt Initialcolor option. Known uses: * ChooseColor (command specific) func Initialdir P added in v0.4.10 func Initialdir(val any) Opt Initialdir option. Known uses: * ChooseDirectory (command specific) * GetOpenFile (command specific) * GetSaveFile (command specific) func Initialfile P added in v0.4.10 func Initialfile(val any) Opt Initialfile option. Known uses: * GetOpenFile (command specific) * GetSaveFile (command specific) func Insertbackground P added in v0.2.0 func Insertbackground(val any) Opt Insertbackground option. Specifies the color to use as background in the area covered by the insertion cursor. This color will normally override either the normal background for the widget (or the selection background if the insertion cursor happens to fall in the selection). Known uses: * Canvas * Entry * Spinbox * Text func Insertborderwidth P added in v0.2.0 func Insertborderwidth(val any) Opt Insertborderwidth option. Specifies a non-negative value indicating the width of the 3-D border to draw around the insertion cursor. The value may have any of the forms acceptable to Tk_GetPixels. Known uses: * Canvas * Entry * Spinbox * Text func Insertcolor P added in v0.25.1 func Insertcolor(val any) Opt Insertcolor -- Styling widgets Insertcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Insertofftime P added in v0.2.0 func Insertofftime(val any) Opt Insertofftime option. Specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time. Known uses: * Canvas * Entry * Spinbox * Text func Insertontime P added in v0.2.0 func Insertontime(val any) Opt Insertontime option. Specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain in each blink cycle. Known uses: * Canvas * Entry * Spinbox * Text func Insertunfocussed P added in v0.3.0 func Insertunfocussed(val any) Opt Insertunfocussed option. Known uses: * Text (widget specific) func Insertwidth P added in v0.2.0 func Insertwidth(val any) Opt Insertwidth option. Specifies a non-negative value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to Tk_GetPixels. If a border has been specified for the insertion cursor (using the -insertborderwidth option), the border will be drawn inside the width specified by the -insertwidth option. Known uses: * Canvas * Entry * Spinbox * Text func Invalidcommand P added in v0.3.0 func Invalidcommand(handler any) Opt Invalidcommand option. See also Event handlers. Known uses: * Entry (widget specific) * Spinbox (widget specific) * TEntry (widget specific) func Ipadx P added in v0.4.10 func Ipadx(val any) Opt Ipadx option. Known uses: * Grid (command specific) * Pack (command specific) func Ipady P added in v0.4.10 func Ipady(val any) Opt Ipady option. Known uses: * Grid (command specific) * Pack (command specific) func Items P added in v0.49.0 func Items(items ...any) Opt Items option. Known uses: * Tooltip (command specific) func Jump P added in v0.2.0 func Jump(val any) Opt Jump option. For widgets with a slider that can be dragged to adjust a value, such as scrollbars, this option determines when notifications are made about changes in the value. The option's value must be a boolean of the form accepted by Tcl_GetBoolean. If the value is false, updates are made continuously as the slider is dragged. If the value is true, updates are delayed until the mouse button is released to end the drag; at that point a single notification is made (the value rather than changing smoothly). Known uses: * Scrollbar func Justify P added in v0.2.0 func Justify(val any) Opt Justify option. When there are multiple lines of text displayed in a widget, this option determines how the lines line up with each other. Must be one of left, center, or right. Left means that the lines' left edges all line up, center means that the lines' centers are aligned, and right means that the lines' right edges line up. Known uses: * Button * Checkbutton * Entry * Label * Listbox * Menubutton * Message (widget specific) * Radiobutton * Spinbox * TButton * TCombobox (widget specific) * TEntry (widget specific) * TLabel * TProgressbar * TextWidget.TagConfigure (command specific) func Labelanchor P added in v0.3.0 func Labelanchor(val any) Opt Labelanchor option. Known uses: * Labelframe (widget specific) * TLabelframe (widget specific) func Labelmargins P added in v0.25.1 func Labelmargins(val any) Opt Labelmargins -- Styling widgets Labelmargins is a styling option of a ttk::labelframe. More information might be available at the Tcl/Tk ttk_labelframe page. func Labeloutside P added in v0.25.1 func Labeloutside(val any) Opt Labeloutside -- Styling widgets Labeloutside is a styling option of a ttk::labelframe. More information might be available at the Tcl/Tk ttk_labelframe page. func Labelwidget P added in v0.3.0 func Labelwidget(val any) Opt Labelwidget option. Known uses: * Labelframe (widget specific) * TLabelframe (widget specific) func Lastfor P added in v0.5.18 func Lastfor(val any) Opt Lastfor option. Known uses: * Focus (command specific) func Lbl P added in v0.3.0 func Lbl(val any) Opt Lbl option. Known uses: * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Scale (widget specific) func Length P added in v0.3.0 func Length(val any) Opt Length option. Known uses: * Scale (widget specific) * TProgressbar (widget specific) * TScale (widget specific) func Lightcolor P added in v0.25.1 func Lightcolor(val any) Opt Lightcolor -- Styling widgets Lightcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Lines P added in v0.48.0 func Lines() Opt Lines option. Known uses: * TextWidget (command specific) func Listvariable P added in v0.3.0 func Listvariable(val any) Opt Listvariable option. Known uses: * Listbox (widget specific) func Lmargin1 P added in v0.4.10 func Lmargin1(val any) Opt Lmargin1 option. Known uses: * TextWidget.TagConfigure (command specific) func Lmargin2 P added in v0.4.10 func Lmargin2(val any) Opt Lmargin2 option. Known uses: * TextWidget.TagConfigure (command specific) func Lmargincolor P added in v0.4.10 func Lmargincolor(val any) Opt Lmargincolor option. Known uses: * TextWidget.TagConfigure (command specific) func Maskdata P added in v0.4.10 func Maskdata(val any) Opt Maskdata option. Known uses: * NewBitmap (command specific) func Maskfile P added in v0.4.10 func Maskfile(val any) Opt Maskfile option. Known uses: * NewBitmap (command specific) func Maximum P added in v0.3.0 func Maximum(val any) Opt Maximum option. Known uses: * TProgressbar (widget specific) func Maxphase P added in v0.25.1 func Maxphase(val any) Opt Maxphase -- Styling widgets Maxphase is a styling option of a ttk::progressbar. More information might be available at the Tcl/Tk ttk_progressbar page. func Maxundo P added in v0.3.0 func Maxundo(val any) Opt Maxundo option. Known uses: * Text (widget specific) func Metadata P added in v0.4.10 func Metadata(val any) Opt Metadata option. Known uses: * NewPhoto (command specific) func Minsize P added in v0.4.10 func Minsize(val ...any) Opt Minsize option. Known uses: * GridColumnConfigure * GridRowConfigure func Mnu P added in v0.3.0 func Mnu(val any) Opt Mnu option. Known uses: * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menubutton (widget specific) * TMenubutton (widget specific) * Toplevel (widget specific) func Mode P added in v0.3.0 func Mode(val any) Opt Mode option. Known uses: * TProgressbar (widget specific) func Msg P added in v0.4.10 func Msg(val any) Opt Msg option. Known uses: * ChooseDirectory (command specific) * MessageBox (command specific) func Multiple P added in v0.4.10 func Multiple(val any) Opt Multiple option. Known uses: * GetOpenFile (command specific) func Mustexist P added in v0.4.10 func Mustexist(val any) Opt Mustexist option. Known uses: * ChooseDirectory (command specific) func Nice P added in v0.4.8 func Nice(val any) Opt Nice option. Known uses: * Bell (command specific) func Nocase P added in v0.4.10 func Nocase() Opt Nocase option. Known uses: * Text (widget specific, applies to Search) func Offrelief P added in v0.3.0 func Offrelief(val any) Opt Offrelief option. Known uses: * Checkbutton (widget specific) * Radiobutton (widget specific) func Offset P added in v0.4.10 func Offset(val any) Opt Offset option. Known uses: * TextWidget.TagConfigure (command specific) func Offvalue P added in v0.3.0 func Offvalue(val any) Opt Offvalue option. Known uses: * Checkbutton (widget specific) * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * TCheckbutton (widget specific) func Onvalue P added in v0.3.0 func Onvalue(val any) Opt Onvalue option. Known uses: * Checkbutton (widget specific) * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * TCheckbutton (widget specific) func Opaqueresize P added in v0.3.0 func Opaqueresize(val any) Opt Opaqueresize option. Known uses: * Panedwindow (widget specific) func Open P added in v0.53.0 func Open(val bool) Opt Open option. Known uses: * TTreeviewWidget (command specific) More information might be available at the Tcl/Tk treeview page. func Orient P added in v0.2.0 func Orient(val any) Opt Orient option. For widgets that can lay themselves out with either a horizontal or vertical orientation, such as scrollbars, this option specifies which orientation should be used. Must be either horizontal or vertical or an abbreviation of one of these. Known uses: * Panedwindow * Scale * Scrollbar * TPanedwindow (widget specific) * TProgressbar (widget specific) * TScale (widget specific) * TScrollbar (widget specific) * TSeparator (widget specific) func Overrelief P added in v0.3.0 func Overrelief(val any) Opt Overrelief option. Known uses: * Button (widget specific) * Checkbutton (widget specific) * Radiobutton (widget specific) func Overstrike P added in v0.4.10 func Overstrike(val any) Opt Overstrike option. Known uses: * NewFont (command specific) * TextWidget.TagConfigure (command specific) func Overstrikefg P added in v0.4.10 func Overstrikefg(val any) Opt Overstrikefg option. Known uses: * TextWidget.TagConfigure (command specific) func Padding P added in v0.3.0 func Padding(val any) Opt Padding option. Specifies the internal padding for the widget. The padding is a list of up to four length specifications left top right bottom. If fewer than four elements are specified, bottom defaults to top, right defaults to left, and top defaults to left. In other words, a list of three numbers specify the left, vertical, and right padding; a list of two numbers specify the horizontal and the vertical padding; a single number specifies the same padding all the way around the widget. Known uses: * TFrame * TLabel * TLabelframe * TNotebook (widget specific) * TTreeview func Padx P added in v0.2.0 func Padx(val any) Opt Padx option. Specifies a non-negative value indicating how much extra space to request for the widget in the X-direction. The value may have any of the forms acceptable to Tk_GetPixels. When computing how large a window it needs, the widget will add this amount to the width it would normally need (as determined by the width of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space to the left and/or right of what it displays inside. Most widgets only use this option for padding text: if they are displaying a bitmap or image, then they usually ignore padding options. Known uses: * Button * Checkbutton * Frame * Grid (command specific) * Label * Labelframe * Menubutton * Message * Pack (command specific) * Radiobutton * Text * Toplevel func Pady P added in v0.2.0 func Pady(val any) Opt Pady option. Specifies a non-negative value indicating how much extra space to request for the widget in the Y-direction. The value may have any of the forms acceptable to Tk_GetPixels. When computing how large a window it needs, the widget will add this amount to the height it would normally need (as determined by the height of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space above and/ or below what it displays inside. Most widgets only use this option for padding text: if they are displaying a bitmap or image, then they usually ignore padding options. Known uses: * Button * Checkbutton * Frame * Grid (command specific) * Label * Labelframe * Menubutton * Message * Pack (command specific) * Radiobutton * Text * Toplevel func Palette P added in v0.4.10 func Palette(val any) Opt Palette option. Known uses: * NewPhoto (command specific) func Parent P added in v0.4.10 func Parent(val any) Opt Parent option. Known uses: * ChooseColor (command specific) * ChooseDirectory (command specific) * Fontchooser (command specific) * GetOpenFile (command specific) * GetSaveFile (command specific) * MessageBox (command specific) func Period P added in v0.25.1 func Period(val any) Opt Period -- Styling widgets Period is a styling option of a ttk::progressbar. More information might be available at the Tcl/Tk ttk_progressbar page. func Phase P added in v0.3.0 func Phase(val any) Opt Phase option. Known uses: * TProgressbar (widget specific) func Placeholder P added in v0.2.0 func Placeholder(val any) Opt Placeholder option. Specifies a help text string to display if no text is otherwise displayed, that is when the widget is empty. The placeholder text is displayed using the values of the -font and -justify options. Known uses: * Entry * Spinbox * TCombobox * TEntry * TSpinbox func Placeholderforeground P added in v0.2.0 func Placeholderforeground(val any) Opt Placeholderforeground option. Specifies the foreground color to use when the placeholder text is displayed. The default color is platform-specific. Known uses: * Entry * Spinbox * TCombobox * TEntry * TSpinbox func Postcommand P added in v0.3.0 func Postcommand(handler any) Opt Postcommand option. See also Event handlers. Known uses: * Menu (widget specific) * TCombobox (widget specific) func Postoffset P added in v0.25.1 func Postoffset(val any) Opt Postoffset -- Styling widgets Postoffset is a styling option of a ttk::combobox. More information might be available at the Tcl/Tk ttk_combobox page. func Proxybackground P added in v0.3.0 func Proxybackground(val any) Opt Proxybackground option. Known uses: * Panedwindow (widget specific) func Proxyborderwidth P added in v0.3.0 func Proxyborderwidth(val any) Opt Proxyborderwidth option. Known uses: * Panedwindow (widget specific) func Proxyrelief P added in v0.3.0 func Proxyrelief(val any) Opt Proxyrelief option. Known uses: * Panedwindow (widget specific) func Readonlybackground P added in v0.3.0 func Readonlybackground(val any) Opt Readonlybackground option. Known uses: * Entry (widget specific) * Spinbox (widget specific) func Regexp P added in v0.4.10 func Regexp() Opt Regexp option. Known uses: * Text (widget specific, applies to Search) func Relheight P added in v0.4.10 func Relheight(val any) Opt Relheight option. Known uses: * Place (command specific) func Relief P added in v0.2.0 func Relief(val any) Opt Relief option. Specifies the 3-D effect desired for the widget. Acceptable values are raised, sunken, flat, ridge, solid, and groove. The value indicates how the interior of the widget should appear relative to its exterior; for example, raised means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget. Known uses: * Button * Canvas * Checkbutton * Entry * Frame * Label * Labelframe * Listbox * Menu * Menubutton * Message * Panedwindow * Radiobutton * Scale * Scrollbar * Spinbox * TFrame (widget specific) * TLabel (widget specific) * TextWidget.TagConfigure (command specific) * Text * Toplevel func Relwidth P added in v0.4.10 func Relwidth(val any) Opt Relwidth option. Known uses: * Place (command specific) func Relx P added in v0.4.10 func Relx(val any) Opt Relx option. Known uses: * Place (command specific) func Rely P added in v0.4.10 func Rely(val any) Opt Rely option. Known uses: * Place (command specific) func Repeatdelay P added in v0.2.0 func Repeatdelay(val any) Opt Repeatdelay option. Specifies the number of milliseconds a button or key must be held down before it begins to auto-repeat. Used, for example, on the up- and down-arrows in scrollbars. Known uses: * Button * Scale * Scrollbar * Spinbox func Repeatinterval P added in v0.2.0 func Repeatinterval(val any) Opt Repeatinterval option. Used in conjunction with -repeatdelay: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats. Known uses: * Button * Scale * Scrollbar * Spinbox func Resolution P added in v0.3.0 func Resolution(val any) Opt Resolution option. Known uses: * Scale (widget specific) func Rmargin P added in v0.4.10 func Rmargin(val any) Opt Rmargin option. Known uses: * TextWidget.TagConfigure (command specific) func Rmargincolor P added in v0.4.10 func Rmargincolor(val any) Opt Rmargincolor option. Known uses: * TextWidget.TagConfigure (command specific) func Row P added in v0.4.10 func Row(val any) Opt Row option. Known uses: * Grid (command specific) func Rowheight P added in v0.25.1 func Rowheight(val any) Opt Rowheight -- Styling widgets Rowheight is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Rowspan P added in v0.4.10 func Rowspan(val any) Opt Rowspan option. Known uses: * Grid (command specific) func Sashcursor P added in v0.3.0 func Sashcursor(val any) Opt Sashcursor option. Known uses: * Panedwindow (widget specific) func Sashpad P added in v0.3.0 func Sashpad(val any) Opt Sashpad option. Known uses: * Panedwindow (widget specific) func Sashrelief P added in v0.3.0 func Sashrelief(val any) Opt Sashrelief option. Known uses: * Panedwindow (widget specific) func Sashthickness P added in v0.25.1 func Sashthickness(val any) Opt Sashthickness -- Styling widgets Sashthickness is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Sashwidth P added in v0.3.0 func Sashwidth(val any) Opt Sashwidth option. Known uses: * Panedwindow (widget specific) func Screen P added in v0.3.0 func Screen(val any) Opt Screen option. Known uses: * Toplevel (widget specific) func Scrollregion P added in v0.3.0 func Scrollregion(val any) Opt Scrollregion option. Known uses: * Canvas (widget specific) func Selectbackground P added in v0.2.0 func Selectbackground(val any) Opt Selectbackground option. Specifies the background color to use when displaying selected items. Known uses: * Canvas * Entry * Listbox * Spinbox * TextWidget.TagConfigure (command specific) * Text func Selectborderwidth P added in v0.2.0 func Selectborderwidth(val any) Opt Selectborderwidth option. Specifies a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to Tk_GetPixels. Known uses: * Canvas * Entry * Listbox * Spinbox * Text func Selectcolor P added in v0.3.0 func Selectcolor(val any) Opt Selectcolor option. Known uses: * Checkbutton (widget specific) * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menu (widget specific) * Radiobutton (widget specific) func Selectforeground P added in v0.2.0 func Selectforeground(val any) Opt Selectforeground option. Specifies the foreground color to use when displaying selected items. Known uses: * Canvas * Entry * Listbox * Spinbox * TextWidget.TagConfigure (command specific) * Text func Selectimage P added in v0.3.0 func Selectimage(val any) Opt Selectimage option. Known uses: * Checkbutton (widget specific) * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Radiobutton (widget specific) func Selectmode P added in v0.3.0 func Selectmode(val any) Opt Selectmode option. Known uses: * Listbox (widget specific) * TTreeview (widget specific) func Selecttype P added in v0.3.0 func Selecttype(val any) Opt Selecttype option. Known uses: * TTreeview (widget specific) func Setgrid P added in v0.2.0 func Setgrid(val any) Opt Setgrid option. Specifies a boolean value that determines whether this widget controls the resizing grid for its top-level window. This option is typically used in text widgets, where the information in the widget has a natural size (the size of a character) and it makes sense for the window's dimensions to be integral numbers of these units. These natural window sizes form a grid. If the -setgrid option is set to true then the widget will communicate with the window manager so that when the user interactively resizes the top-level window that contains the widget, the dimensions of the window will be displayed to the user in grid units and the window size will be constrained to integral numbers of grid units. See the section GRIDDED GEOMETRY MANAGEMENT in the wm manual entry for more details. Known uses: * Listbox * Text func Shiftrelief P added in v0.25.1 func Shiftrelief(val any) Opt * Description TButton -- Widget that issues a command when pressed Description P Shiftrelief specifies how far the button contents are shifted down and right in the pressed state. This action provides additional skeuomorphic feedback. func Show P added in v0.3.0 func Show(val any) Opt Show option. Known uses: * Entry (widget specific) * TEntry (widget specific) * TTreeview (widget specific) func Showhandle P added in v0.3.0 func Showhandle(val any) Opt Showhandle option. Known uses: * Panedwindow (widget specific) func Showvalue P added in v0.3.0 func Showvalue(val any) Opt Showvalue option. Known uses: * Scale (widget specific) func Side P added in v0.4.10 func Side(val any) Opt Side option. Known uses: * Pack (command specific) func Size P added in v0.4.10 func Size(val any) Opt Size option. Known uses: * NewFont (command specific) func Slant P added in v0.4.10 func Slant(val any) Opt Slant option. Known uses: * NewFont (command specific) func Sliderlength P added in v0.3.0 func Sliderlength(val any) Opt Sliderlength option. Known uses: * Scale (widget specific) func Sliderrelief P added in v0.3.0 func Sliderrelief(val any) Opt Sliderrelief option. Known uses: * Scale (widget specific) func Sliderwidth P added in v0.25.1 func Sliderwidth(val any) Opt Sliderwidth -- Styling widgets Sliderwidth is a styling option of a ttk::scale. More information might be available at the Tcl/Tk ttk_scale page. func Spacing1 P added in v0.3.0 func Spacing1(val any) Opt Spacing1 option. Known uses: * TextWidget.TagConfigure (command specific) * Text (widget specific) func Spacing2 P added in v0.3.0 func Spacing2(val any) Opt Spacing2 option. Known uses: * TextWidget.TagConfigure (command specific) * Text (widget specific) func Spacing3 P added in v0.3.0 func Spacing3(val any) Opt Spacing3 option. Known uses: * TextWidget.TagConfigure (command specific) * Text (widget specific) func Startline P added in v0.3.0 func Startline(val any) Opt Startline option. Known uses: * Text (widget specific) func State P added in v0.3.0 func State(val any) Opt State option. May be set to normal or disabled to control the disabled state bit. This is a write-only option: setting it changes the widget state, but the state widget command does not affect the -state option. Known uses: * Button (widget specific) * Canvas (widget specific) * Checkbutton (widget specific) * Entry (widget specific) * Label (widget specific) * Listbox (widget specific) * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menubutton (widget specific) * Radiobutton (widget specific) * Scale (widget specific) * Spinbox (widget specific) * TButton * TCheckbutton * TCombobox (widget specific) * TEntry (widget specific) * TLabel * TMenubutton * TNotebook (widget specific) * TRadiobutton * TSpinbox * Text (widget specific) func Sticky P added in v0.3.0 func Sticky(val any) Opt Sticky option. Known uses: * Grid (command specific) * TNotebook (widget specific) func Stretch P added in v0.4.10 func Stretch(when string) Opt * Description Stretch option. Description P Controls how extra space is allocated to each of the panes. When is one of always, first, last, middle, and never. The panedwindow will calculate the required size of all its panes. Any remaining (or deficit) space will be distributed to those panes marked for stretching. The space will be distributed based on each panes current ratio of the whole. The when values have the following definition: * always: This pane will always stretch. * first: Only if this pane is the first pane (left-most or top-most) will it stretch. * last: Only if this pane is the last pane (right-most or bottom-most) will it stretch. This is the default value. * middle: Only if this pane is not the first or last pane will it stretch. * never: This pane will never stretch. Known uses: * PanedwindowWidget (command specific) func Striped P added in v0.3.0 func Striped(val any) Opt Striped option. Known uses: * TTreeview (widget specific) func Stripedbackground P added in v0.25.1 func Stripedbackground(val any) Opt Stripedbackground -- Styling widgets Stripedbackground is a styling option of a ttk::treeview. More information might be available at the Tcl/Tk ttk_treeview page. func Style P added in v0.4.10 func Style(val any) Opt Style option. May be used to specify a custom widget style. Known uses: * TButton * TCheckbutton * TCombobox * TEntry * TFrame * TLabel * TLabelframe * TMenubutton * TNotebook * TPanedwindow * TProgressbar * TRadiobutton * TScale * TScrollbar * TSeparator * TSizegrip * TSpinbox * TTreeview func Tab P added in v0.49.0 func Tab(tabId any) Opt Tab option. Known uses: * Tooltip (command specific) func Tabmargins P added in v0.25.1 func Tabmargins(val any) Opt Tabmargins -- Styling widgets Tabmargins is a styling option of a ttk::notebook. More information might be available at the Tcl/Tk ttk_notebook page. func Tabposition P added in v0.25.1 func Tabposition(val any) Opt Tabposition -- Styling widgets Tabposition is a styling option of a ttk::notebook. More information might be available at the Tcl/Tk ttk_notebook page. func Tabs P added in v0.3.0 func Tabs(val any) Opt Tabs option. Known uses: * TextWidget.TagConfigure (command specific) * Text (widget specific) func Tabstyle P added in v0.3.0 func Tabstyle(val any) Opt Tabstyle option. Known uses: * TextWidget.TagConfigure (command specific) * Text (widget specific) func Tag P added in v0.4.10 func Tag(name string) Opt Tag option. Known uses: * Tooltip (command specific) func Takefocus P added in v0.2.0 func Takefocus(val any) Opt Takefocus option. Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the -takefocus option. A value of 0 means that the window should be skipped entirely during keyboard traversal. 1 means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return 0, 1, or an empty string: a 0 or 1 value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note that this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts. Known uses: * Button * Canvas * Checkbutton * Entry * Frame * Label * Labelframe * Listbox * Menu * Menubutton * Message * Radiobutton * Scale * Scrollbar * Spinbox * TButton * TCheckbutton * TCombobox * TEntry * TFrame * TLabel * TLabelframe * TMenubutton * TNotebook * TPanedwindow * TProgressbar * TRadiobutton * TScale * TScrollbar * TSeparator * TSizegrip * TSpinbox * TTreeview * Text * Toplevel func Tearoff P added in v0.3.0 func Tearoff(val any) Opt Tearoff option. Known uses: * Menu (widget specific) func Tearoffcommand P added in v0.3.0 func Tearoffcommand(handler any) Opt Tearoffcommand option. See also Event handlers. Known uses: * Menu (widget specific) func Textvariable P added in v0.2.0 func Textvariable(s string) Opt Textvariable option. Specifies the value to be displayed inside the widget. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as -anchor or -justify. Known uses: * Button * Checkbutton * Entry * Label * Menubutton * Message * Radiobutton * Spinbox * TButton * TCheckbutton * TCombobox (widget specific) * TEntry (widget specific) * TLabel * TMenubutton * TRadiobutton func Tickinterval P added in v0.3.0 func Tickinterval(val any) Opt Tickinterval option. Known uses: * Scale (widget specific) func Tile P added in v0.3.0 func Tile(val any) Opt Tile option. Known uses: * Frame (widget specific) * Toplevel (widget specific) func Title P added in v0.3.0 func Title(val any) Opt Title option. Known uses: * ChooseColor (command specific) * ChooseDirectory (command specific) * Fontchooser (command specific) * GetOpenFile (command specific) * GetSaveFile (command specific) * Menu (widget specific) * MessageBox (command specific) func Titlecolumns P added in v0.3.0 func Titlecolumns(val any) Opt Titlecolumns option. Known uses: * TTreeview (widget specific) func Titleitems P added in v0.3.0 func Titleitems(val any) Opt Titleitems option. Known uses: * TTreeview (widget specific) func To P added in v0.3.0 func To(val ...any) Opt To option. Known uses: * Img.Copy * Scale (widget specific) * Spinbox (widget specific) * TScale (widget specific) * TSpinbox (widget specific) func Tristateimage P added in v0.3.0 func Tristateimage(val any) Opt Tristateimage option. Known uses: * Checkbutton (widget specific) * Radiobutton (widget specific) func Tristatevalue P added in v0.3.0 func Tristatevalue(val any) Opt Tristatevalue option. Known uses: * Checkbutton (widget specific) * Radiobutton (widget specific) func Troughcolor P added in v0.2.0 func Troughcolor(val any) Opt Troughcolor option. Specifies the color to use for the rectangular trough areas in widgets such as scrollbars and scales. This option is ignored for scrollbars on Windows (native widget does not recognize this option). Known uses: * Scale * Scrollbar func Troughrelief P added in v0.25.1 func Troughrelief(val any) Opt Troughrelief -- Styling widgets Troughrelief is a styling option of one or more widgets. Please see Changing Widget Colors for details. func Txt P added in v0.2.0 func Txt(val any) Opt Txt option. Specifies a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as -anchor or -justify. Known uses: * Button * Checkbutton * Label * Labelframe * Menubutton * Message * Radiobutton * TButton * TCheckbutton * TLabel * TLabelframe (widget specific) * TMenubutton * TNotebook (widget specific) * TProgressbar * TRadiobutton func Type P added in v0.3.0 func Type(val any) Opt Type option. Known uses: * ClipboardAppend (command specific) * ClipboardGet (command specific) * Menu (widget specific) * MessageBox (command specific) func Underline P added in v0.2.0 func Underline(val any) Opt Underline option. Specifies the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on. end corresponds to the last character, end-1 to the before last character, and so on. Known uses: * Button * Checkbutton * Label * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Menubutton * NewFont (command specific) * Radiobutton * TButton * TCheckbutton * TLabel * TLabelframe (widget specific) * TMenubutton * TNotebook (widget specific) * TRadiobutton * TextWidget.TagConfigure (command specific) func Underlinefg P added in v0.4.10 func Underlinefg(val any) Opt Underlinefg option. Known uses: * TextWidget.TagConfigure (command specific) func Undo P added in v0.3.0 func Undo(val any) Opt Undo option. Known uses: * Text (widget specific) func Use P added in v0.3.0 func Use(val any) Opt Use option. Known uses: * Toplevel (widget specific) func Validate P added in v0.3.0 func Validate(val any) Opt Validate option. Known uses: * Entry (widget specific) * Spinbox (widget specific) * TEntry (widget specific) * TSpinbox func Validatecommand P added in v0.3.0 func Validatecommand(handler any) Opt Validatecommand option. See also Event handlers. Known uses: * Entry (widget specific) * Spinbox (widget specific) * TEntry (widget specific) * TSpinbox func Value P added in v0.3.0 func Value(val any) Opt Value option. Known uses: * MenuWidget.AddCascade (command specific) * MenuWidget.AddCommand (command specific) * MenuWidget.AddSeparator (command specific) * Radiobutton (widget specific) * TProgressbar (widget specific) * TRadiobutton (widget specific) * TScale (widget specific) func Values P added in v0.3.0 func Values(val any) Opt Values option. Known uses: * Spinbox (widget specific) * TCombobox (widget specific) * TSpinbox (widget specific) func Visual P added in v0.3.0 func Visual(val any) Opt Visual option. Known uses: * Frame (widget specific) * Labelframe (widget specific) * Toplevel (widget specific) func Weight P added in v0.3.0 func Weight(val any) Opt Weight option. Known uses: * NewFont (command specific) * TPanedwindow (widget specific) func Width P added in v0.3.0 func Width(val any) Opt Width option. If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used. Note that some themes may specify a non-zero -width in the style. Known uses: * Button (widget specific) * Canvas (widget specific) * Checkbutton (widget specific) * Entry (widget specific) * Frame (widget specific) * Label (widget specific) * Labelframe (widget specific) * Listbox (widget specific) * Menubutton (widget specific) * Message (widget specific) * NewPhoto (command specific) * Panedwindow (widget specific) * Place (command specific) * Radiobutton (widget specific) * Scale (widget specific) * Scrollbar (widget specific) * Spinbox (widget specific) * TButton * TCheckbutton * TCombobox (widget specific) * TEntry (widget specific) * TFrame (widget specific) * TLabel * TLabelframe (widget specific) * TMenubutton * TNotebook (widget specific) * TPanedwindow (widget specific) * TRadiobutton * Text (widget specific) * Toplevel (widget specific) func Win P added in v0.36.0 func Win(val any) Opt Win option. Known uses: * Text (widget specific, applies to embedded windows) func Wrap P added in v0.3.0 func Wrap(val any) Opt Wrap option. Known uses: * Spinbox (widget specific) * TSpinbox (widget specific) * TextWidget.TagConfigure (command specific) * Text (widget specific) func Wraplength P added in v0.2.0 func Wraplength(val any) Opt Wraplength option. For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is negative or zero then no wrapping is done: lines will break only at newline characters in the text. Known uses: * Button * Checkbutton * Label * Menubutton * Radiobutton * TLabel * TLabel (widget specific) * TProgressbar func X P added in v0.4.10 func X(val any) Opt X option. Known uses: * Place (command specific) func Xpixels P added in v0.48.0 func Xpixels() Opt Xpixels option. Known uses: * TextWidget (command specific) func Xscrollcommand P added in v0.2.0 func Xscrollcommand(handler any) Opt Xscrollcommand option. See also Event handlers. Specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the -xscrollcommand option consists of the path name of a scrollbar widget followed by e.g. this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed. Known uses: * Canvas * Entry * Listbox * Spinbox * TEntry * TSpinbox * TTreeview * Text func Xscrollincrement P added in v0.3.0 func Xscrollincrement(val any) Opt Xscrollincrement option. Known uses: * Canvas (widget specific) func Y P added in v0.4.10 func Y(val any) Opt Y option. Known uses: * Place (command specific) func Ypixels P added in v0.48.0 func Ypixels() Opt Ypixels option. Known uses: * TextWidget (command specific) func Yscrollcommand P added in v0.2.0 func Yscrollcommand(handler any) Opt Yscrollcommand option. See also Event handlers. Specifies the prefix for a command used to communicate with vertical scrollbars. This option is treated in the same way as the -xscrollcommand option, except that it is used for vertical scrollbars and is provided by widgets that support vertical scrolling. See the description of -xscrollcommand for details on how this option is used. Known uses: * Canvas * Listbox * TTreeview * Text func Yscrollincrement P added in v0.3.0 func Yscrollincrement(val any) Opt Yscrollincrement option. Known uses: * Canvas (widget specific) type OptionMenuWidget P added in v0.53.0 type OptionMenuWidget struct { *Window // contains filtered or unexported fields } OptionMenuWidget represents the Tcl/Tk option menu. More information might be available at the Tcl/Tk option menu page. func OptionMenu P added in v0.2.0 func OptionMenu(varName *VariableOpt, options ...any) (r *OptionMenuWidget) * Description tk_optionMenu -- Create an option menubutton and its menu Description P This procedure creates an option menubutton whose name is pathName, plus an associated menu. Together they allow the user to select one of the values given by the value arguments. The current value will be stored in the global variable whose name is given by varName and it will also be displayed as the label in the option menubutton. The user can click on the menubutton to display a menu containing all of the values and thereby select a new value. Once a new value is selected, it will be stored in the variable and appear in the option menubutton. The current value can also be changed by setting the variable. The return value from tk_optionMenu is the name of the menu associated with pathName, so that the caller can change its configuration options or manipulate it in other ways. More information might be available at the Tcl/Tk option menu page. func (*OptionMenuWidget) Name P added in v0.53.0 func (w *OptionMenuWidget) Name() string Name returns the menu name of 'w'. type Opts P added in v0.5.18 type Opts []Opt Opts is a list of options. It implements Opt. type PanedwindowWidget P added in v0.11.0 type PanedwindowWidget struct { *Window } PanedwindowWidget represents the Tcl/Tk panedwindow widget/window func Panedwindow P added in v0.2.0 func Panedwindow(options ...Opt) *PanedwindowWidget * Description * Standard options * Widget specific options Panedwindow -- Create and manipulate 'panedwindow' split container widgets Description P The panedwindow command creates a new window (given by the pathName argument) and makes it into a panedwindow widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the panedwindow such as its default background color and relief. The panedwindow command returns the path name of the new window. A panedwindow widget contains any number of panes, arranged horizontally or vertically, according to the value of the panes is separated by a moveable (via mouse movements) sash. Moving a sash causes the widgets on either side of the sash to be resized. Use Window.Panedwindow to create a Panedwindow with a particular parent. More information might be available at the Tcl/Tk panedwindow page. Standard options P * Background * Borderwidth * Cursor * Orient * Relief Widget specific options P Handlepad When sash handles are drawn, specifies the distance from the top or left end of the sash (depending on the orientation of the widget) at which to draw the handle. May be any value accepted by Tk_GetPixels. Handlesize Specifies the side length of a sash handle. Handles are always drawn as squares. May be any value accepted by Tk_GetPixels. Height Specifies a desired height for the overall panedwindow widget. May be any value accepted by Tk_GetPixels. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height. Opaqueresize Specifies whether panes should be resized as a sash is moved (true), or if resizing should be deferred until the sash is placed (false). In the latter case, a version of the sash is displayed during the resizing to show where the panes will be resized to when releasing the mouse button. This version of the sash is the proxy. It's rendering can be configured using the -proxybackground, -proxyborderwidth and -proxyrelief options. Proxybackground Background color to use when drawing the proxy. If an empty string, the value of the -background option will be used. Proxyborderwidth Specifies the borderwidth of the proxy. May be any value accepted by Tk_GetPixels. Proxyrelief Relief to use when drawing the proxy. May be any of the standard Tk relief values. If an empty string, the value of the -sashrelief option will be used. Sashcursor Mouse cursor to use when over a sash. If null, sb_h_double_arrow will be used for horizontal panedwindows, and sb_v_double_arrow will be used for vertical panedwindows. Sashpad Specifies the amount of padding to leave of each side of a sash. May be any value accepted by Tk_GetPixels. Sashrelief Relief to use when drawing a sash. May be any of the standard Tk relief values. Sashwidth Specifies the width of each sash. May be any value accepted by Tk_GetPixels. Showhandle Specifies whether sash handles should be shown. May be any valid Tcl boolean value. Width Specifies a desired width for the overall panedwindow widget. May be any value accepted by Tk_GetPixels. If an empty string, the widget will be made wide enough to allow all contained widgets to have their natural width. func (*PanedwindowWidget) Add P added in v0.41.0 func (w *PanedwindowWidget) Add(subwindow *Window, options ...Opt) * Description panedwindow -- Create and manipulate 'panedwindow' split container widgets Description P Add one or more windows to the panedwindow, each in a separate pane. The arguments consist of the names of one or more windows followed by pairs of arguments that specify how to manage the windows. Option may have any of the values accepted by the configure subcommand. More information might be available at the Tcl/Tk panedwindow page. func (*PanedwindowWidget) Panecget P added in v0.41.0 func (w *PanedwindowWidget) Panecget(subwindow *Window, opt any) string * Description panedwindow -- Create and manipulate 'panedwindow' split container widgets Description P Query a management option for window. Option may be any value allowed by the paneconfigure subcommand. More information might be available at the Tcl/Tk panedwindow page. func (*PanedwindowWidget) Paneconfigure P added in v0.41.0 func (w *PanedwindowWidget) Paneconfigure(subwindow *Window, options ...Opt) string * Description panedwindow -- Create and manipulate 'panedwindow' split container widgets Description P Query or modify the management options for window. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value (s); in this case the command returns an empty string. More information might be available at the Tcl/Tk panedwindow page. type RadiobuttonWidget P added in v0.11.0 type RadiobuttonWidget struct { *Window } RadiobuttonWidget represents the Tcl/Tk radiobutton widget/window func Radiobutton P added in v0.2.0 func Radiobutton(options ...Opt) *RadiobuttonWidget * Description * Standard options * Widget specific options Radiobutton -- Create and manipulate 'radiobutton' pick-one widgets Description P The radiobutton command creates a new window (given by the pathName argument) and makes it into a radiobutton widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the radiobutton such as its colors, font, text, and initial relief. The radiobutton command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A radiobutton is a widget that displays a textual string, bitmap or image and a diamond or circle called an indicator. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the -wraplength option) and one of the characters may optionally be underlined using the all of the behavior of a simple button: it can display itself in either of three different ways, according to the -state option; it can be made to appear raised, sunken, or flat; it can be made to flash; and it invokes a Tcl command whenever mouse button 1 is clicked over the check button. In addition, radiobuttons can be selected. If a radiobutton is selected, the indicator is normally drawn with a selected appearance, and a Tcl variable associated with the radiobutton is set to a particular value (normally 1). Under Unix, the indicator is drawn with a sunken relief and a special color. Under Windows, the indicator is drawn with a round mark inside. If the radiobutton is not selected, then the indicator is drawn with a deselected appearance, and the associated variable is set to a different value (typically 0). The indicator is drawn without a round mark inside. Typically, several radiobuttons share a single variable and the value of the variable indicates which radiobutton is to be selected. When a radiobutton is selected it sets the value of the variable to indicate that fact; each radiobutton also monitors the value of the variable and automatically selects and deselects itself when the variable's value changes. If the variable's value matches the -tristatevalue, then the radiobutton is drawn using the tri-state mode. This mode is used to indicate mixed or multiple values. (This is used when the radiobutton represents the state of multiple items.) By default the variable selectedButton is used; its contents give the name of the button that is selected, or the empty string if no button associated with that variable is selected. The name of the variable for a radiobutton, plus the variable to be stored into it, may be modified with options on the command line or in the option database. Configuration options may also be used to modify the way the indicator is displayed (or whether it is displayed at all). By default a radiobutton is configured to select itself on button clicks. Use Window.Radiobutton to create a Radiobutton with a particular parent. More information might be available at the Tcl/Tk radiobutton page. Standard options P * Activebackground * Activeforeground * Anchor * Background * Bitmap * Borderwidth * Compound * Cursor * Disabledforeground * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Image * Justify * Padx * Pady * Relief * Takefocus * Textvariable * Txt * Underline * Wraplength Widget specific options P Command Specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button window. The button's global variable (-variable option) will be updated before the command is invoked. Height Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. Indicatoron Specifies whether or not the indicator should be drawn. Must be a proper boolean value. If false, the -relief option is ignored and the widget's relief is always sunken if the widget is selected and raised otherwise. Offrelief Specifies the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is By setting this option to and setting -indicatoron to false and -overrelief to the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a word-processor, for example. Overrelief Specifies an alternative relief for the radiobutton, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring -relief flat -overrelief raised. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the radiobutton. The empty string is the default value. Selectcolor Specifies a background color to use when the button is selected. If indicatorOn is true then the color is used as the background for the indicator regardless of the select state. If -indicatoron is false, this color is used as the background for the entire widget, in place of -background or -activeBackground, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected. Selectimage Specifies an image to display (in place of the -image option) when the radiobutton is selected. This option is ignored unless the -image option has been specified. State Specifies one of three states for the radiobutton: normal, active, or disabled. In normal state the radiobutton is displayed using the -foreground and -background options. The active state is typically used when the pointer is over the radiobutton. In active state the radiobutton is displayed using the -activeforeground and -activebackground options. Disabled state means that the radiobutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the -disabledforeground and -background options determine how the radiobutton is displayed. Tristateimage Specifies an image to display (in place of the -image option) when the radiobutton is selected. This option is ignored unless the -image option has been specified. Tristatevalue Specifies the value that causes the radiobutton to display the multi-value selection, also known as the tri-state mode. Defaults to Value Specifies value to store in the button's associated variable whenever this button is selected. Variable Specifies the name of a global variable to set whenever this button is selected. Changes in this variable also cause the button to select or deselect itself. Defaults to the value selectedButton. Width Specifies a desired width for the button. If an image or bitmap is being displayed in the button, the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option is not specified, the button's desired width is computed from the size of the image or bitmap or text being displayed in it. type ScaleWidget P added in v0.11.0 type ScaleWidget struct { *Window } ScaleWidget represents the Tcl/Tk scale widget/window func Scale P added in v0.2.0 func Scale(options ...Opt) *ScaleWidget * Description * Standard options * Widget specific options Scale -- Create and manipulate 'scale' value-controlled slider widgets Description P The scale command creates a new window (given by the pathName argument) and makes it into a scale widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the scale such as its colors, orientation, and relief. The scale command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A scale is a widget that displays a rectangular trough and a small slider. The trough corresponds to a range of real values (determined by the -from, -to, and and the position of the slider selects a particular real value. The slider's position (and hence the scale's value) may be adjusted with the mouse or keyboard as described in the BINDINGS section below. Whenever the scale's value is changed, a Tcl command is invoked (using the -command option) to notify other interested widgets of the change. In addition, the value of the scale can be linked to a Tcl variable (using the -variable option), so that changes in either are reflected in the other. Three annotations may be displayed in a scale widget: a label appearing at the top right of the widget (top left for horizontal scales), a number displayed just to the left of the slider (just above the slider for horizontal scales), and a collection of numerical tick marks just to the left of the current value (just below the trough for horizontal scales). Each of these three annotations may be enabled or disabled using the configuration options. Use Window.Scale to create a Scale with a particular parent. More information might be available at the Tcl/Tk scale page. Standard options P * Activebackground * Background * Borderwidth * Cursor * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Orient * Relief * Repeatdelay * Repeatinterval * Takefocus * Troughcolor Widget specific options P Bigincrement Some interactions with the scale cause its value to change by increments; this option specifies the size of the large increments. If specified as 0, the large increments default to 1/10 the range of the scale. Command Specifies the prefix of a Tcl command to invoke whenever the scale's value is changed via a widget command. The actual command consists of this option followed by a space and a real number indicating the new value of the scale. Digits An integer specifying how many significant digits should be retained when converting the value of the scale to a string. If the number is negative or zero, then the scale picks the smallest value that guarantees that every possible slider position prints as a different string. From A real value corresponding to the left or top end of the scale. Lbl A string to display as a label for the scale. For vertical scales the label is displayed just to the right of the top end of the scale. For horizontal scales the label is displayed just above the left end of the scale. If the option is specified as an empty string, no label is displayed. Length Specifies the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical scales this is the scale's height; for horizontal scales it is the scale's width. Resolution A real value specifying the resolution for the scale. If this value is greater than zero then the scale's value will always be rounded to an even multiple of this value, as will the endpoints of the scale. If the value is negative then no rounding occurs. Defaults to 1 (i.e., the value will be integral). Showvalue Specifies a boolean value indicating whether or not the current value of the scale is to be displayed. Sliderlength Specifies the size of the slider, measured in screen units along the slider's long dimension. The value may be specified in any of the forms acceptable to Tk_GetPixels. Sliderrelief Specifies the relief to use when drawing the slider, such as raised or sunken. State Specifies one of three states for the scale: normal, active, or disabled. If the scale is disabled then the value may not be changed and the scale will not activate. If the scale is active, the slider is displayed using the color specified by the -activebackground option. Tickinterval Must be a real value. Determines the spacing between numerical tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval. If 0, no tick marks will be displayed. To Specifies a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the -from option. Variable Specifies the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale's new value. Width Specifies the desired narrow dimension of the scale in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical scales this is the scale's width; for horizontal scales this is the scale's height. type ScrollbarWidget P added in v0.11.0 type ScrollbarWidget struct { *Window } ScrollbarWidget represents the Tcl/Tk scrollbar widget/window func Scrollbar P added in v0.2.0 func Scrollbar(options ...Opt) *ScrollbarWidget * Description * Standard options * Widget specific options Scrollbar -- Create and manipulate 'scrollbar' scrolling control and indicator widgets Description P The scrollbar command creates a new window (given by the pathName argument) and makes it into a scrollbar widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the scrollbar such as its colors, orientation, and relief. The scrollbar command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A scrollbar is a widget that displays two arrows, one at each end of the scrollbar, and a slider in the middle portion of the scrollbar. It provides information about what is visible in an associated window that displays a document of some sort (such as a file being edited or a drawing). The position and size of the slider indicate which portion of the document is visible in the associated window. For example, if the slider in a vertical scrollbar covers the top third of the area between the two arrows, it means that the associated window displays the top third of its document. Scrollbars can be used to adjust the view in the associated window by clicking or dragging with the mouse. See the BINDINGS section below for details. Use Window.Scrollbar to create a Scrollbar with a particular parent. More information might be available at the Tcl/Tk scrollbar page. Standard options P * Activebackground * Background * Borderwidth * Cursor * Highlightbackground * Highlightcolor * Highlightthickness * Jump * Orient * Relief * Repeatdelay * Repeatinterval * Takefocus * Troughcolor Widget specific options P Activerelief Specifies the relief to use when displaying the element that is active, if any. Elements other than the active element are always displayed with a raised relief. Command Specifies the prefix of a Tcl command to invoke to change the view in the widget associated with the scrollbar. When a user requests a view change by manipulating the scrollbar, a Tcl command is invoked. The actual command consists of this option followed by additional information as described later. This option almost always has a value such as .t xview or .t yview, consisting of the name of a widget and either xview (if the scrollbar is for horizontal scrolling) or yview (for vertical scrolling). All scrollable widgets have xview and yview commands that take exactly the additional arguments appended by the scrollbar as described in SCROLLING COMMANDS below. Elementborderwidth Specifies the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may have any of the forms acceptable to Tk_GetPixels. If this value is the empty string (the default), the value of the -borderwidth option is used in its place. Width Specifies the desired narrow dimension of the scrollbar window, not including 3-D border, if any. For vertical scrollbars this will be the width and for horizontal scrollbars this will be the height. The value may have any of the forms acceptable to Tk_GetPixels. type SpinboxWidget P added in v0.11.0 type SpinboxWidget struct { *Window } SpinboxWidget represents the Tcl/Tk spinbox widget/window func Spinbox P added in v0.2.0 func Spinbox(options ...Opt) *SpinboxWidget * Description * Standard options * Widget specific options Spinbox -- Create and manipulate 'spinbox' value spinner widgets Description P The spinbox command creates a new window (given by the pathName argument) and makes it into a spinbox widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the spinbox such as its colors, font, and relief. The spinbox command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist. A spinbox is an extended entry widget that allows he user to move, or spin, through a fixed set of ascending or descending values such as times or dates in addition to editing the value as in an entry. When first created, a spinbox's string is empty. A portion of the spinbox may be selected as described below. If a spinbox is exporting its selection (see the -exportselection option), then it will observe the standard protocols for handling the selection; spinbox selections are available as type STRING. Spinboxes also observe the standard Tk rules for dealing with the input focus. When a spinbox has the input focus it displays an insertion cursor to indicate where new characters will be inserted. Spinboxes are capable of displaying strings that are too long to fit entirely within the widget's window. In this case, only a portion of the string will be displayed; commands described below may be used to change the view in the window. Spinboxes use the standard -xscrollcommand mechanism for interacting with scrollbars (see the description of the -xscrollcommand option for details). They also support scanning, as described below. Use Window.Spinbox to create a Spinbox with a particular parent. More information might be available at the Tcl/Tk spinbox page. Standard options P * Activebackground * Background * Borderwidth * Cursor * Exportselection * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Insertbackground * Insertborderwidth * Insertofftime * Insertontime * Insertwidth * Justify * Placeholder * Placeholderforeground * Relief * Repeatdelay * Repeatinterval * Selectbackground * Selectborderwidth * Selectforeground * Takefocus * Textvariable * Xscrollcommand Widget specific options P Buttonbackground The background color to be used for the spin buttons. Buttoncursor The cursor to be used when over the spin buttons. If this is empty (the default), a default cursor will be used. Buttondownrelief The relief to be used for the upper spin button. Buttonuprelief The relief to be used for the lower spin button. Command Specifies a Tcl command to invoke whenever a spinbutton is invoked. The command recognizes several percent substitutions: %W for the widget path, %s for the current value of the widget, and %d for the direction of the button pressed (up or down). Disabledbackground Specifies the background color to use when the spinbox is disabled. If this option is the empty string, the normal background color is used. Disabledforeground Specifies the foreground color to use when the spinbox is disabled. If this option is the empty string, the normal foreground color is used. Format Specifies an alternate format to use when setting the string value when using the -from and -to range. This must be a format specifier of the form %.f, as it will format a floating-point number. From A floating-point value corresponding to the lowest value for a spinbox, to be used in conjunction with -to and -increment. When all are specified correctly, the spinbox will use these values to control its contents. If this value is greater than the -to option, then -from and -to values are automatically swapped. If -values is specified, it supersedes this option. Invalidcommand Specifies a script to eval when -validatecommand returns 0. Setting it to an empty string disables this feature (the default). The best use of this option is to set it to bell. See VALIDATION below for more information. Increment A floating-point value specifying the increment. When used with -from and -to, the value in the widget will be adjusted by -increment when a spin button is pressed (up adds the value, down subtracts the value). Readonlybackground Specifies the background color to use when the spinbox is readonly. If this option is the empty string, the normal background color is used. State Specifies one of three states for the spinbox: normal, disabled, or readonly. If the spinbox is readonly, then the value may not be changed using widget commands and no insertion cursor will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the spinbox is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the spinbox may be displayed in a different color, depending on the values of the -disabledforeground and -disabledbackground options. To A floating-point value corresponding to the highest value for the spinbox, to be used in conjunction with -from and -increment. When all are specified correctly, the spinbox will use these values to control its contents. If this value is less than the -from option, then -from and -to values are automatically swapped. If -values is specified, it supersedes this option. Validate Specifies the mode in which validation should operate: none, focus, focusin, focusout, key, or all. It defaults to none. When you want validation, you must explicitly state which mode you wish to use. See VALIDATION below for more. Validatecommand Specifies a script to evaluate when you want to validate the input in the widget. Setting it to an empty string disables this feature (the default). Validation occurs according to the value of -validate. This command must return a valid Tcl boolean value. If it returns 0 (or the valid Tcl boolean equivalent) then the value of the widget will not change and the -invalidcommand will be evaluated if it is set. If it returns 1, then value will be changed. See VALIDATION below for more information. Values Must be a proper list value. If specified, the spinbox will use these values as to control its contents, starting with the first value. This option has precedence over the -from and -to range. Width Specifies an integer value indicating the desired width of the spinbox window, in average-size characters of the widget's font. If the value is negative or zero, the widget picks a size just large enough to hold its current text. Wrap Must be a proper boolean value. If on, the spinbox will wrap around the values of data in the widget. type TButtonWidget P added in v0.11.0 type TButtonWidget struct { *Window } TButtonWidget represents the Tcl/Tk ttk_button widget/window func TButton P added in v0.2.0 func TButton(options ...Opt) *TButtonWidget * Description * Standard options * Widget specific options * Standard styles * Styling options TButton -- Widget that issues a command when pressed Description P A ttk::button widget displays a textual label and/or image, and evaluates a command when pressed. Use Window.TButton to create a TButton with a particular parent. More information might be available at the Tcl/Tk ttk_button page. Standard options P * Class * Compound * Cursor * Image * Justify * State * Style * Takefocus * Textvariable * Txt * Underline * Width Widget specific options P Command A script to evaluate when the widget is invoked. Default May be set to one of normal, active, or disabled. In a dialog box, one button may be designated the button (meaning, roughly, active indicates that this is currently the default button; normal means that it may become the default button, and disabled means that it is not defaultable. The default is normal. Standard styles P Ttk::button widgets support the Toolbutton style in all standard themes, which is useful for creating widgets for toolbars. In the Aqua theme there are several other styles which can be used to produce replicas of many of the different button types that are discussed in Apple's Human Interface Guidelines. These include DisclosureButton, DisclosureTriangle, HelpButton, ImageButton, InlineButton, GradientButton, RoundedRectButton, and RecessedButton. Styling options P The class name for a ttk::button is TButton. Dynamic states: active, disabled, pressed, readonly. TButton styling options configurable with ttk::style are: * Anchor anchor * Background color * Bordercolor color * Compound compound * Darkcolor color * Foreground color * Font font * Highlightcolor color * Highlightthickness amount * Lightcolor color * Padding padding * Relief relief * Shiftrelief amount * Width amount Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func TExit P added in v0.5.18 func TExit(options ...Opt) *TButtonWidget TExit provides a canned TButton with default Txt "Exit", bound to the ExitHandler. Use Window.TExit to create a TExit with a particular parent. func (*TButtonWidget) Invoke P added in v0.44.0 func (w *TButtonWidget) Invoke() string * Description TButton -- Widget that issues a command when pressed Description P Invokes the command associated with the button. Additional information might be available at the Tcl/Tk ttk::button page. type TCheckbuttonWidget P added in v0.11.0 type TCheckbuttonWidget struct { *Window } TCheckbuttonWidget represents the Tcl/Tk ttk_checkbutton widget/ window func TCheckbutton P added in v0.2.0 func TCheckbutton(options ...Opt) *TCheckbuttonWidget * Description * Standard options * Widget specific options * Standard styles * Styling options TCheckbutton -- On/off widget Description P A ttk::checkbutton widget is used to show or change a setting. It has two states, selected and deselected. The state of the checkbutton may be linked to a Tcl variable. Use Window.TCheckbutton to create a TCheckbutton with a particular parent. More information might be available at the Tcl/Tk ttk_checkbutton page. Standard options P * Class * Compound * Cursor * Image * State * Style * Takefocus * Textvariable * Txt * Underline * Width Widget specific options P Command A Tcl script to execute whenever the widget is invoked. Offvalue The value to store in the associated -variable when the widget is deselected. Defaults to 0. Onvalue The value to store in the associated -variable when the widget is selected. Defaults to 1. Variable The name of a global variable whose value is linked to the widget. Defaults to the widget pathname if not specified. Standard styles P Ttk::checkbutton widgets support the Toolbutton style in all standard themes, which is useful for creating widgets for toolbars. Styling options P The class name for a ttk::checkbutton is TCheckbutton. Dynamic states: active, alternate, disabled, pressed, selected, readonly. TCheckbutton styling options configurable with ttk::style are: * Background color * Compound compound * Foreground color * Indicatorbackground color * Indicatorcolor color * Indicatormargin padding * Indicatorrelief relief * Padding padding Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func (*TCheckbuttonWidget) Invoke P added in v0.32.0 func (w *TCheckbuttonWidget) Invoke() string * Description ttk::checkbutton -- On/off widget Description P Toggles between the selected and deselected states and evaluates the associated -command. If the widget is currently selected, sets the -variable to the -offvalue and deselects the widget; otherwise, sets the -variable to the -onvalue. Returns the result of the -command. More information might be available at the Tcl/Tk TCheckbutton page. type TComboboxWidget P added in v0.11.0 type TComboboxWidget struct { *Window } TComboboxWidget represents the Tcl/Tk ttk_combobox widget/window func TCombobox P added in v0.2.0 func TCombobox(options ...Opt) *TComboboxWidget * Description * Standard options * Widget specific options * Styling options TCombobox -- Text field with popdown selection list Description P A ttk::combobox combines a text field with a pop-down list of values; the user may select the value of the text field from among the values in the list. Use Window.TCombobox to create a TCombobox with a particular parent. More information might be available at the Tcl/Tk ttk_combobox page. Standard options P * Class * Cursor * Placeholder * Placeholderforeground * Style * Takefocus Widget specific options P Exportselection Boolean value. If set, the widget selection is linked to the X selection. Justify Specifies how the text is aligned within the widget. Must be one of left, center, or right. Height Specifies the height of the pop-down listbox, in rows. Postcommand A Tcl script to evaluate immediately before displaying the listbox. The -postcommand script may specify the -values to display. State One of normal, readonly, or disabled. In the readonly state, the value may not be edited directly, and the user can only select one of the -values from the dropdown list. In the normal state, the text field is directly editable. In the disabled state, no interaction is possible. Textvariable Specifies the name of a global variable whose value is linked to the widget value. Whenever the variable changes value the widget value is updated, and vice versa. Values Specifies the list of values to display in the drop-down listbox. Width Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. Styling options P The class name for a ttk::combobox is TCombobox. The ttk::combobox uses the entry and listbox widgets internally. The listbox frame has a class name of ComboboxPopdownFrame. Dynamic states: disabled, focus, pressed, readonly. TCombobox styling options configurable with ttk::style are: * Arrowcolor color * Arrowsize amount * Background color * Bordercolor color * Darkcolor color * Focusfill color * Foreground color * Fieldbackground color * Insertcolor color * Insertwidth amount * Lightcolor color * Padding padding * Placeholderforeground color * Postoffset padding * Selectbackground color * Selectforeground color The ttk::combobox popdown listbox cannot be configured using ttk::style nor via the widget configure command. The listbox can be configured using the option database. option add *TCombobox*Listbox.background color option add *TCombobox*Listbox.font font option add *TCombobox*Listbox.foreground color option add *TCombobox*Listbox.selectBackground color option add *TCombobox*Listbox.selectForeground color To configure a specific listbox (subject to future change): ComboboxPopdownFrame styling options configurable with ttk::style are: * Borderwidth amount * Relief relief Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func (*TComboboxWidget) Current P added in v0.53.0 func (w *TComboboxWidget) Current(newIndex any) (r string) * Description ttk::combobox -- text field with popdown selection list Description P If newIndex is supplied, sets the combobox value to the element at position newIndex in the list of -values (in addition to integers, the end index is supported and indicates the last element of the list, moreover the same simple interpretation as for the command string index is supported, with simple integer index arithmetic and indexing relative to end). Otherwise, returns the index of the current value in the list of -values or {} if the current value does not appear in the list. More information might be available at the Tcl/Tk combobox page. type TEntryWidget P added in v0.11.0 type TEntryWidget struct { *Window } TEntryWidget represents the Tcl/Tk ttk_entry widget/window func TEntry P added in v0.2.0 func TEntry(options ...Opt) *TEntryWidget * Description * Standard options * Widget specific options * Styling options TEntry -- Editable text field widget Description P An ttk::entry widget displays a one-line text string and allows that string to be edited by the user. The value of the string may be linked to a Tcl variable with the -textvariable option. Entry widgets support horizontal scrolling with the standard -xscrollcommand option and xview widget command. Use Window.TEntry to create a TEntry with a particular parent. More information might be available at the Tcl/Tk ttk_entry page. Standard options P * Class * Cursor * Foreground * Placeholder * Placeholderforeground * Style * Takefocus * Xscrollcommand Widget specific options P Exportselection A boolean value specifying whether or not a selection in the widget should be linked to the X selection. If the selection is exported, then selecting in the widget deselects the current X selection, selecting outside the widget deselects any widget selection, and the widget will respond to selection retrieval requests when it has a selection. Invalidcommand A script template to evaluate whenever the -validatecommand returns 0. See VALIDATION below for more information. Justify Specifies how the text is aligned within the entry widget. One of left, center, or right. Show If this option is specified, then the true contents of the entry are not displayed in the window. Instead, each character in the entry's value will be displayed as the first character in the value of this option, such as or a bullet. This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry. State Compatibility option; see ttk::widget(n) for details. Specifies one of three states for the entry, normal, disabled, or readonly. See WIDGET STATES, below. Textvariable Specifies the name of a global variable whose value is linked to the entry widget's contents. Whenever the variable changes value, the widget's contents are updated, and vice versa. Validate Specifies the mode in which validation should operate: none, focus, focusin, focusout, key, or all. Default is none, meaning that validation is disabled. See VALIDATION below. Validatecommand A script template to evaluate whenever validation is triggered. If set to the empty string (the default), validation is disabled. The script must return a boolean value. See VALIDATION below. Width Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. Styling options P The class name for a ttk::entry is TEntry. Dynamic states: disabled, focus, readonly. TEntry styling options configurable with ttk::style are: * Background color * Bordercolor color * Darkcolor color * Fieldbackground color * Foreground color * Insertcolor color * Insertwidth amount * Lightcolor color * Padding padding * Placeholderforeground color * Relief relief * Selectbackground color * Selectborderwidth amount * Selectforeground color See the ttk::style manual page for information on how to configure ttk styles. type TFrameWidget P added in v0.11.0 type TFrameWidget struct { *Window } TFrameWidget represents the Tcl/Tk ttk_frame widget/window func TFrame P added in v0.2.0 func TFrame(options ...Opt) *TFrameWidget * Description * Standard options * Widget specific options * Styling options TFrame -- Simple container widget Description P A ttk::frame widget is a container, used to group other widgets together. Use Window.TFrame to create a TFrame with a particular parent. More information might be available at the Tcl/Tk ttk_frame page. Standard options P * Class * Cursor * Padding * Style * Takefocus Widget specific options P Borderwidth The desired width of the widget border. Defaults to 0. May be ignored depending on the theme used. Relief One of the standard Tk border styles: flat, groove, raised, ridge, solid, or sunken. Defaults to flat. Width If specified, the widget's requested width in pixels. Height If specified, the widget's requested height in pixels. Styling options P The class name for a ttk::frame is TFrame. TFrame styling options configurable with ttk::style are: * Background color * Relief relief Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TLabelWidget P added in v0.11.0 type TLabelWidget struct { *Window } TLabelWidget represents the Tcl/Tk ttk_label widget/window func TLabel P added in v0.2.0 func TLabel(options ...Opt) *TLabelWidget * Description * Standard options * Widget specific options * Styling options TLabel -- Display a text string and/or image Description P A ttk::label widget displays a textual label and/or image. The label may be linked to a Tcl variable to automatically change the displayed text. Use Window.TLabel to create a TLabel with a particular parent. More information might be available at the Tcl/Tk ttk_label page. Standard options P * Anchor * Class * Compound * Cursor * Foreground * Image * Justify * Padding * State * Style * Takefocus * Textvariable * Txt * Underline * Width * Wraplength Widget specific options P Background The widget's background color. If unspecified, the theme default is used. Relief Specifies the 3-D effect desired for the widget border. Valid values are flat, groove, raised, ridge, solid, and sunken. Wraplength Specifies the maximum line length (in pixels). If this option is negative or zero, then automatic wrapping is not performed; otherwise the text is split into lines such that no line is longer than the specified value. Styling options P The class name for a ttk::label is TLabel. Dynamic states: disabled, readonly. TLabel styling options configurable with ttk::style are: * Background color * Compound compound * Foreground color * Font font Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TLabelframeWidget P added in v0.11.0 type TLabelframeWidget struct { *Window } TLabelframeWidget represents the Tcl/Tk ttk_labelframe widget/window func TLabelframe P added in v0.2.0 func TLabelframe(options ...Opt) *TLabelframeWidget * Description * Standard options * Widget specific options * Styling options TLabelframe -- Container widget with optional label Description P A ttk::labelframe widget is a container used to group other widgets together. It has an optional label, which may be a plain text string or another widget. Use Window.TLabelframe to create a TLabelframe with a particular parent. More information might be available at the Tcl/Tk ttk_labelframe page. Standard options P * Class * Cursor * Padding * Style * Takefocus Widget specific options P Height If specified, the widget's requested height in pixels. (See ttk::frame(n) for further notes on -width and -height). Labelanchor Specifies where to place the label. Allowed values are (clockwise from the top upper left corner): nw, n, ne, en, e, es, se, s,sw, ws, w and wn. The default value is theme-dependent. Labelwidget The name of a widget to use for the label. If set, overrides the -text option. The -labelwidget must be a child of the labelframe widget or one of the labelframe's ancestors, and must belong to the same top-level widget as the labelframe. Txt Specifies the text of the label. Underline If set, specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation. Mnemonic activation for a ttk::labelframe sets the keyboard focus to the first child of the ttk::labelframe widget. Width If specified, the widget's requested width in pixels. Styling options P The class name for a ttk::labelframe is TLabelframe. The text label has a class of TLabelframe.Label. Dynamic states: disabled, readonly. TLabelframe styling options configurable with ttk::style are: * Background color * Bordercolor color * Borderwidth amount * Darkcolor color * Labelmargins amount * Labeloutside boolean * Lightcolor color * Relief relief TLabelframe.Label styling options configurable with ttk::style are: * Background color * Font font * Foreground color Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TMenubuttonWidget P added in v0.11.0 type TMenubuttonWidget struct { *Window } TMenubuttonWidget represents the Tcl/Tk ttk_menubutton widget/window func TMenubutton P added in v0.2.0 func TMenubutton(options ...Opt) *TMenubuttonWidget * Description * Standard options * Widget specific options * Standard styles * Styling options TMenubutton -- Widget that pops down a menu when pressed Description P A ttk::menubutton widget displays a textual label and/or image, and displays a menu when pressed. Use Window.TMenubutton to create a TMenubutton with a particular parent. More information might be available at the Tcl/Tk ttk_menubutton page. Standard options P * Class * Compound * Cursor * Image * State * Style * Takefocus * Textvariable * Txt * Underline * Width Widget specific options P Direction Specifies where the menu is to be popped up relative to the menubutton. One of: above, below, left, right, or flush. The default is below. flush pops the menu up directly over the menubutton. Mnu Specifies the path name of the menu associated with the menubutton. To be on the safe side, the menu ought to be a direct child of the menubutton. Standard styles P Ttk::menubutton widgets support the Toolbutton style in all standard themes, which is useful for creating widgets for toolbars. Styling options P The class name for a ttk::menubutton is TMenubutton. Dynamic states: active, disabled, readonly. TMenubutton styling options configurable with ttk::style are: * Arrowsize amount * Background color * Compound compound * Foreground color * Font font * Padding padding * Relief relief * Width amount Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TNotebookWidget P added in v0.11.0 type TNotebookWidget struct { *Window } TNotebookWidget represents the Tcl/Tk ttk_notebook widget/window func TNotebook P added in v0.2.0 func TNotebook(options ...Opt) *TNotebookWidget * Description * Standard options * Widget specific options * Styling options TNotebook -- Multi-paned container widget Description P A ttk::notebook widget manages a collection of windows and displays a single one at a time. Each content window is associated with a tab, which the user may select to change the currently-displayed window. Use Window.TNotebook to create a TNotebook with a particular parent. More information might be available at the Tcl/Tk ttk_notebook page. Standard options P * Class * Cursor * Style * Takefocus Widget specific options P Height If present and greater than zero, specifies the desired height of the pane area (not including internal padding or tabs). Otherwise, the maximum height of all panes is used. Padding Specifies the amount of extra space to add around the outside of the notebook. The padding is a list of up to four length specifications left top right bottom. If fewer than four elements are specified, bottom defaults to top, right defaults to left, and top defaults to left. In other words, a list of three numbers specify the left, vertical, and right padding; a list of two numbers specify the horizontal and the vertical padding; a single number specifies the same padding all the way around the widget. Width If present and greater than zero, specifies the desired width of the pane area (not including internal padding). Otherwise, the maximum width of all panes is used. State Either normal, disabled or hidden. If disabled, then the tab is not selectable. If hidden, then the tab is not shown. Sticky Specifies how the content window is positioned within the pane area. Value is a string containing zero or more of the characters n, s, e, or w. Each letter refers to a side (north, south, east, or west) that the content window will to, as per the grid geometry manager. Padding Specifies the amount of extra space to add between the notebook and this pane. Syntax is the same as for the widget -padding option. Txt Specifies a string to be displayed in the tab. Image Specifies an image to display in the tab. See ttk_widget(n) for details. Compound Specifies how to display the image relative to the text, in the case both -text and -image are present. See label(n) for legal values. Underline Specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation if ttk::notebook::enableTraversal is called. Styling options P The class name for a ttk::notebook is TNotebook. The tab has a class name of TNotebook.Tab Dynamic states: active, disabled, selected. TNotebook styling options configurable with ttk::style are: * Background color * Bordercolor color * Darkcolor color * Foreground color * Lightcolor color * Padding padding * Tabmargins padding * Tabposition position TNotebook.Tab styling options configurable with ttk::style are: * Background color * Bordercolor color * Compound compound * Expand padding * Font font * Foreground color * Padding padding Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func (*TNotebookWidget) Add P added in v0.30.0 func (w *TNotebookWidget) Add(options ...Opt) * Description ttk::notebook -- Multi-paned container widget Description P Adds a new tab to the notebook. See TAB OPTIONS for the list of available options. If window is currently managed by the notebook but hidden, it is restored to its previous position. More information might be available at the Tcl/Tk TNotebook page. func (*TNotebookWidget) Select P added in v0.31.0 func (w *TNotebookWidget) Select(tabid any) string * Description TNotebook -- Multi-paned container widget Description P Selects the specified tab. The associated content window will be displayed, and the previously-selected window (if different) is unmapped. If tabid is omitted, returns the widget name of the currently selected pane. More information might be available at the Tcl/Tk TNotebook page. func (*TNotebookWidget) Tabs P added in v0.32.0 func (w *TNotebookWidget) Tabs() (r []*Window) * Description TNotebook -- Multi-paned container widget Description P Returns the list of windows managed by the notebook, in the index order of their associated tabs. More information might be available at the Tcl/Tk TNotebook page. type TPanedwindowWidget P added in v0.11.0 type TPanedwindowWidget struct { *Window } TPanedwindowWidget represents the Tcl/Tk ttk_panedwindow widget/ window func TPanedwindow P added in v0.2.0 func TPanedwindow(options ...Opt) *TPanedwindowWidget * Description * Standard options * Widget specific options * Styling options TPanedwindow -- Multi-pane container window Description P A ttk::panedwindow widget displays a number of subwindows, stacked either vertically or horizontally. The user may adjust the relative sizes of the subwindows by dragging the sash between panes. Use Window.TPanedwindow to create a TPanedwindow with a particular parent. More information might be available at the Tcl/Tk ttk_panedwindow page. Standard options P * Class * Cursor * Style * Takefocus Widget specific options P Orient Specifies the orientation of the window. If vertical, subpanes are stacked top-to-bottom; if horizontal, subpanes are stacked left-to-right. Width If present and greater than zero, specifies the desired width of the widget in pixels. Otherwise, the requested width is determined by the width of the managed windows. Height If present and greater than zero, specifies the desired height of the widget in pixels. Otherwise, the requested height is determined by the height of the managed windows. Weight An integer specifying the relative stretchability of the pane. When the paned window is resized, the extra space is added or subtracted to each pane proportionally to its -weight. Styling options P The class name for a ttk::panedwindow is TPanedwindow. The sash has a class name of Sash. TPanedwindow styling options configurable with ttk::style are: * Background color Sash styling options configurable with ttk::style are: * Background color * Bordercolor color * Gripsize size (number of screen units) * Handlepad amount * Handlesize amount * Lightcolor color * Sashpad amount * Sashrelief relief * Sashthickness amount Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func (*TPanedwindowWidget) Add P added in v0.41.0 func (w *TPanedwindowWidget) Add(subwindow *Window, options ...Opt) * Description ttk::panedwindow -- Multi-pane container window Description P Adds a new pane to the window. See PANE OPTIONS for the list of available options. More information might be available at the Tcl/Tk ttk_panedwindow page. type TProgressbarWidget P added in v0.11.0 type TProgressbarWidget struct { *Window } TProgressbarWidget represents the Tcl/Tk ttk_progressbar widget/ window func TProgressbar P added in v0.2.0 func TProgressbar(options ...Opt) *TProgressbarWidget * Description * Standard options * Widget specific options * Styling options TProgressbar -- Provide progress feedback Description P A ttk::progressbar widget shows the status of a long-running operation. They can operate in two modes: determinate mode shows the amount completed relative to the total amount of work to be done, and indeterminate mode provides an animated display to let the user know that something is happening. If the value of -orient is horizontal a text string can be displayed inside the progressbar. This string can be configured using the -anchor, -font, -foreground, -justify, is vertical then these options are ignored. Use Window.TProgressbar to create a TProgressbar with a particular parent. More information might be available at the Tcl/Tk ttk_progressbar page. Standard options P * Anchor * Class * Cursor * Foreground * Justify * Style * Takefocus * Txt * Wraplength Widget specific options P Length Specifies the length of the long axis of the progress bar (width if horizontal, height if vertical). The value may have any of the forms acceptable to Tk_GetPixels. Maximum A floating point number specifying the maximum -value. Defaults to 100. Mode One of determinate or indeterminate. Orient One of horizontal or vertical. Specifies the orientation of the progress bar. Phase Read-only option. The widget periodically increments the value of this option whenever the -value is greater than 0 and, in determinate mode, less than -maximum. This option may be used by the current theme to provide additional animation effects. Value The current value of the progress bar. In determinate mode, this represents the amount of work completed. In indeterminate mode, it is interpreted modulo -maximum; that is, the progress bar completes one when the -value increases by -maximum. If -variable is set to an existing variable, specifying -value has no effect (the variable value takes precedence). Variable The name of a global Tcl variable which is linked to the -value. If specified to an existing variable, the -value of the progress bar is automatically set to the value of the variable whenever the latter is modified. Styling options P The class name for a ttk::progressbar is TProgressbar. TProgressbar styling options configurable with ttk::style are: * Background color * Bordercolor color * Darkcolor color * Lightcolor color * Maxphase * Period * Troughcolor color Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TRadiobuttonWidget P added in v0.11.0 type TRadiobuttonWidget struct { *Window } TRadiobuttonWidget represents the Tcl/Tk ttk_radiobutton widget/ window func TRadiobutton P added in v0.2.0 func TRadiobutton(options ...Opt) *TRadiobuttonWidget * Description * Standard options * Widget specific options * Standard styles * Styling options TRadiobutton -- Mutually exclusive option widget Description P ttk::radiobutton widgets are used in groups to show or change a set of mutually-exclusive options. Radiobuttons are linked to a Tcl variable, and have an associated value; when a radiobutton is clicked, it sets the variable to its associated value. Use Window.TRadiobutton to create a TRadiobutton with a particular parent. More information might be available at the Tcl/Tk ttk_radiobutton page. Standard options P * Class * Compound * Cursor * Image * State * Style * Takefocus * Textvariable * Txt * Underline * Width Widget specific options P Command A Tcl script to evaluate whenever the widget is invoked. Value The value to store in the associated -variable when the widget is selected. Variable The name of a global variable whose value is linked to the widget. Default value is ::selectedButton. Standard styles P Ttk::radiobutton widgets support the Toolbutton style in all standard themes, which is useful for creating widgets for toolbars. Styling options P The class name for a ttk::radiobutton is TRadiobutton. Dynamic states: active, alternate, disabled, pressed, readonly, selected. TRadiobutton styling options configurable with ttk::style are: * Background color * Compound compound * Foreground color * Indicatorbackground color * Indicatorcolor color * Indicatormargin padding * Indicatorrelief relief * Padding padding Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TScaleWidget P added in v0.11.0 type TScaleWidget struct { *Window } TScaleWidget represents the Tcl/Tk ttk_scale widget/window func TScale P added in v0.2.0 func TScale(options ...Opt) *TScaleWidget * Description * Standard options * Widget specific options * Styling options TScale -- Create and manipulate a scale widget Description P A ttk::scale widget is typically used to control the numeric value of a linked variable that varies uniformly over some range. A scale displays a slider that can be moved along over a trough, with the relative position of the slider over the trough indicating the value of the variable. Use Window.TScale to create a TScale with a particular parent. More information might be available at the Tcl/Tk ttk_scale page. Standard options P * Class * Cursor * Style * Takefocus Widget specific options P Command Specifies the prefix of a Tcl command to invoke whenever the scale's value is changed via a widget command. The actual command consists of this option followed by a space and a real number indicating the new value of the scale. From A real value corresponding to the left or top end of the scale. Length Specifies the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical scales this is the scale's height; for horizontal scales it is the scale's width. Orient Specifies which orientation whether the widget should be laid out horizontally or vertically. Must be either horizontal or vertical or an abbreviation of one of these. To Specifies a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the -from option. Value Specifies the current floating-point value of the variable. If -variable is set to an existing variable, specifying -value has no effect (the variable value takes precedence). Variable Specifies the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale's new value. Styling options P The class name for a ttk::scale is TScale. Dynamic states: active. TScale styling options configurable with ttk::style are: * Background color * Borderwidth amount * Darkcolor color * Groovewidth amount * Lightcolor color * Sliderwidth amount * Troughcolor color * Troughrelief relief Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func (*TScaleWidget) Get P added in v0.53.0 func (w *TScaleWidget) Get(xy ...any) (r string) * Description ttk::scale -- Create and manipulate a scale widget Description P Get the current value of the -value option, or the value corresponding to the coordinates x,y if they are specified. X and y are pixel coordinates relative to the scale widget origin. More information might be available at the Tcl/Tk scale page. type TScrollbarWidget P added in v0.11.0 type TScrollbarWidget struct { *Window } TScrollbarWidget represents the Tcl/Tk ttk_scrollbar widget/window func TScrollbar P added in v0.2.0 func TScrollbar(options ...Opt) *TScrollbarWidget * Description * Standard options * Widget specific options * Styling options TScrollbar -- Control the viewport of a scrollable widget Description P ttk::scrollbar widgets are typically linked to an associated window that displays a document of some sort, such as a file being edited or a drawing. A scrollbar displays a thumb in the middle portion of the scrollbar, whose position and size provides information about the portion of the document visible in the associated window. The thumb may be dragged by the user to control the visible region. Depending on the theme, two or more arrow buttons may also be present; these are used to scroll the visible region in discrete units. Use Window.TScrollbar to create a TScrollbar with a particular parent. More information might be available at the Tcl/Tk ttk_scrollbar page. Standard options P * Class * Cursor * Style * Takefocus Widget specific options P Command A Tcl script prefix to evaluate to change the view in the widget associated with the scrollbar. Additional arguments are appended to the value of this option, as described in SCROLLING COMMANDS below, whenever the user requests a view change by manipulating the scrollbar. Orient One of horizontal or vertical. Specifies the orientation of the scrollbar. Styling options P The class name for a ttk::scrollbar is TScrollbar. Dynamic states: active, disabled. TScrollbar (or more specifically Vertical.TScrollbar and Horizontal.TScrollbar) styling options that are configurable with ttk::style are: * Arrowcolor color * Arrowsize amount * Background color * Bordercolor color * Darkcolor color (color of the dark part of the 3D relief) * Foreground color * Gripsize size (number of screen units) * Lightcolor color (color of the light part of the 3D relief) * Troughcolor color Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func (*TScrollbarWidget) Set P added in v0.16.2 func (w *TScrollbarWidget) Set(firstLast string) * Description TScrollbar -- Control the viewport of a scrollable widget Description P This command is normally invoked by the scrollbar's associated widget from an -xscrollcommand or -yscrollcommand callback. Specifies the visible range to be displayed. first and last are real fractions between 0 and 1. More information might be available at the Tcl/Tk ttk_scrollbar page. type TSeparatorWidget P added in v0.11.0 type TSeparatorWidget struct { *Window } TSeparatorWidget represents the Tcl/Tk ttk_separator widget/window func TSeparator P added in v0.2.0 func TSeparator(options ...Opt) *TSeparatorWidget * Description * Standard options * Widget specific options * Styling options TSeparator -- Separator bar Description P A ttk::separator widget displays a horizontal or vertical separator bar. Use Window.TSeparator to create a TSeparator with a particular parent. More information might be available at the Tcl/Tk ttk_separator page. Standard options P * Class * Cursor * Style * Takefocus Widget specific options P Orient One of horizontal or vertical. Specifies the orientation of the separator. Styling options P The class name for a ttk::separator is TSeparator. TSeparator styling options configurable with ttk::style are: * Background color Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TSizegripWidget P added in v0.11.0 type TSizegripWidget struct { *Window } TSizegripWidget represents the Tcl/Tk ttk_sizegrip widget/window func TSizegrip P added in v0.2.0 func TSizegrip(options ...Opt) *TSizegripWidget * Description * Standard options * Styling options TSizegrip -- Bottom-right corner resize widget Description P A ttk::sizegrip widget (also known as a grow box) allows the user to resize the containing toplevel window by pressing and dragging the grip. Use Window.TSizegrip to create a TSizegrip with a particular parent. More information might be available at the Tcl/Tk ttk_sizegrip page. Standard options P * Class * Cursor * Style * Takefocus Styling options P The class name for a ttk::sizegrip is TSizegrip. TSizegrip styling options configurable with ttk::style are: * Background color Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TSpinboxWidget P added in v0.11.0 type TSpinboxWidget struct { *Window } TSpinboxWidget represents the Tcl/Tk ttk_spinbox widget/window func TSpinbox P added in v0.2.0 func TSpinbox(options ...Opt) *TSpinboxWidget * Description * Standard options * Widget specific options * Styling options TSpinbox -- Selecting text field widget Description P A ttk::spinbox widget is a ttk::entry widget with built-in up and down buttons that are used to either modify a numeric value or to select among a set of values. The widget implements all the features of the ttk::entry widget including support of the to a Tcl variable. Use Window.TSpinbox to create a TSpinbox with a particular parent. More information might be available at the Tcl/Tk ttk_spinbox page. Standard options P * Class * Cursor * Placeholder * Placeholderforeground * State * Style * Takefocus * Validate * Validatecommand * Xscrollcommand Widget specific options P Command Specifies a Tcl command to be invoked whenever a spinbutton is invoked. Format Specifies an alternate format to use when setting the string value when using the -from and -to range. This must be a format specifier of the form %.f, as it will format a floating-point number. From A floating-point value specifying the lowest value for the spinbox. This is used in conjunction with -to and -increment to set a numerical range. Increment A floating-point value specifying the change in value to be applied each time one of the widget spin buttons is pressed. The up button applies a positive increment, the down button applies a negative increment. To A floating-point value specifying the highest permissible value for the widget. See also -from and -increment. range. Values This must be a Tcl list of values. If this option is set then this will override any range set using the -from, -to and -increment options. The widget will instead use the values specified beginning with the first value. Wrap Must be a proper boolean value. If on, the spinbox will wrap around the values of data in the widget. Styling options P The class name for a ttk::spinbox is TSpinbox. Dynamic states: active, disabled, focus, readonly. TSpinbox styling options configurable with ttk::style are: * Arrowcolor color * Arrowsize amount * Background color * Bordercolor color * Darkcolor color * Fieldbackground color * Foreground color * Insertcolor color * Insertwidth amount * Lightcolor color * Padding padding * Placeholderforeground color * Selectbackground color * Selectforeground color Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. type TTreeviewWidget P added in v0.11.0 type TTreeviewWidget struct { *Window } TTreeviewWidget represents the Tcl/Tk ttk_treeview widget/window func TTreeview P added in v0.2.0 func TTreeview(options ...Opt) *TTreeviewWidget * Description * Standard options * Widget specific options * Styling options TTreeview -- Hierarchical multicolumn data display widget Description P The ttk::treeview widget displays a hierarchical collection of items. Each item has a textual label, an optional image, and an optional list of data values. The data values are displayed in successive columns after the tree label. The order in which data values are displayed may be controlled by setting the -displaycolumns widget option. The tree widget can also display column headings. Columns may be accessed by number or by symbolic names listed in the -columns widget option; see COLUMN IDENTIFIERS. Each item is identified by a unique name. The widget will generate item IDs if they are not supplied by the caller. There is a distinguished root item, named {}. The root item itself is not displayed; its children appear at the top level of the hierarchy. Each item also has a list of tags, which can be used to associate event bindings with individual items and control the appearance of the item. Treeview widgets support horizontal and vertical scrolling with the standard -[xy]scrollcommand options and [xy]view widget commands. Use Window.TTreeview to create a TTreeview with a particular parent. More information might be available at the Tcl/Tk ttk_treeview page. Standard options P * Class * Cursor * Padding * Style * Takefocus * Xscrollcommand * Yscrollcommand Widget specific options P Columns A list of column identifiers, specifying the number of columns and their names. Displaycolumns A list of column identifiers (either symbolic names or integer indices) specifying which data columns are displayed and the order in which they appear, or the string #all. If set to #all (the default), all columns are shown in the order given. Height Specifies the number of rows which should be visible. Note that the requested width is determined from the sum of the column widths. Selectmode Controls how the built-in class bindings manage the selection. One of extended, browse, or none. Selecttype Controls how the built-in class bindings manage the selection. One of item or cell. Show A list containing zero or more of the following values, specifying which elements of the tree to display. Striped Boolean specifying zebra striped item coloring. Note that striped items uses the -stripedbackground option if set by the theme or a tag. If not supported by the current theme, it will not show. Titlecolumns Number of display columns at the left that should not be scrolled. The tree column counts, even if -show tree is not specified. Thus for value N of this option, column #N is the first one that is scrollable. Default is 0. Titleitems Number of items at the top that should not be vertically scrolled. Default is 0. Styling options P The class name for a ttk::treeview is Treeview. The treeview header class name is Heading. The treeview item class name is Item. The treeview cell class name is Cell. Dynamic states: disabled, selected. Treeview styling options configurable with ttk::style are: * Background color * Fieldbackground color * Font font * Foreground color * Indent amount * Columnseparatorwidth amount * Rowheight amount * Stripedbackground color Heading styling options configurable with ttk::style are: * Background color * Font font * Relief relief Item styling options configurable with ttk::style are: * Foreground color * Indicatormargins padding * Indicatorsize amount * Padding padding Cell styling options configurable with ttk::style are: * Padding padding Some options are only available for specific themes. See the ttk::style manual page for information on how to configure ttk styles. func (*TTreeviewWidget) Column P added in v0.53.0 func (w *TTreeviewWidget) Column(column any, options ...Opt) (r string) * Description ttk::treeview -- hierarchical multicolumn data display widget Description P Query or modify the options for the specified column. If no -option is specified, returns a dictionary of option/value pairs. If a single -option is specified, returns the value of that option. Otherwise, the options are updated with the specified values. The following options may be set on each column: * id name: The column name. This is a read-only option. For example, [$pathname column #n -id] returns the data column associated with display column n. The tree column has -id #0. * anchor anchor: Specifies how the text in this column should be aligned with respect to the cell. Anchor is one of n, ne, e, se, s, sw, w, nw, or center. * minwidth minwidth: The minimum width of the column in pixels. The treeview widget will not make the column any smaller than -minwidth when the widget is resized or the user drags a heading column separator. Default is 20 pixels. * separator boolean: Specifies whether or not a column separator should be drawn to the right of the column. Default is false. * stretch boolean: Specifies whether or not the column width should be adjusted when the widget is resized or the user drags a heading column separator. Boolean may have any of the forms accepted by Tcl_GetBoolean. By default columns are stretchable. -width width: The width of the column in pixels. Default is 200 pixels. The specified column width may be changed by Tk in order to honor -stretch and/or -minwidth, or when the widget is resized or the user drags a heading column separator. Use pathname "#0" to configure the tree column. More information might be available at the Tcl/Tk treeview page. func (*TTreeviewWidget) Heading P added in v0.53.0 func (w *TTreeviewWidget) Heading(column any, options ...Opt) (r string) * Description ttk::treeview -- hierarchical multicolumn data display widget Description P Query or modify the heading options for the specified column. Valid options are: * text text: The text to display in the column heading. * image imageName: Specifies an image to display to the right of the column heading. * anchor anchor: Specifies how the heading text should be aligned. One of the standard Tk anchor values. * command script: A script to evaluate when the heading label is pressed. Use pathname heading "#0" to configure the tree column heading. More information might be available at the Tcl/Tk treeview page. func (*TTreeviewWidget) Insert P added in v0.53.0 func (w *TTreeviewWidget) Insert(parent, index any, options ...Opt) (r string) * Description ttk::treeview -- hierarchical multicolumn data display widget Description P Creates a new item. parent is the item ID of the parent item, or the empty string {} to create a new top-level item. index is an integer, or the value end, specifying where in the list of parent's children to insert the new item. If index is negative or zero, the new node is inserted at the beginning; if index is greater than or equal to the current number of children, it is inserted at the end. If -id is specified, it is used as the item identifier; id must not already exist in the tree. Otherwise, a new unique identifier is generated. Insert returns the item identifier of the newly created item. See ITEM OPTIONS for the list of available options. More information might be available at the Tcl/Tk treeview page. func (*TTreeviewWidget) Item P added in v0.53.0 func (w *TTreeviewWidget) Item(item any, options ...Opt) (r string) * Description ttk::treeview -- hierarchical multicolumn data display widget Description P Query or modify the options for the specified item. If no -option is specified, returns a dictionary of option/value pairs. If a single -option is specified, returns the value of that option. Otherwise, the item's options are updated with the specified values. See ITEM OPTIONS for the list of available options. pathname move item parent index More information might be available at the Tcl/Tk treeview page. func (*TTreeviewWidget) See P added in v0.53.0 func (w *TTreeviewWidget) See(item any) * Description ttk::treeview -- hierarchical multicolumn data display widget Description P Ensure that item is visible: sets all of item's ancestors to -open true, and scrolls the widget if necessary so that item is within the visible portion of the tree. More information might be available at the Tcl/Tk treeview page. func (*TTreeviewWidget) Selection P added in v0.53.0 func (w *TTreeviewWidget) Selection(selop string, itemList ...any) (r []string) * Description ttk::treeview -- hierarchical multicolumn data display widget Description P Manages item selection. Item selection is independent from cell selection handled by the cellselection command. If selop is not specified, returns the list of selected items. Otherwise, selop is one of the following: * set itemList: itemList becomes the new selection. * add itemList: Add itemList to the selection. * remove itemList: Remove itemList from the selection. * toggle itemList: Toggle the selection state of each item in itemList. More information might be available at the Tcl/Tk treeview page. type TextWidget P added in v0.11.0 type TextWidget struct { *Window } TextWidget represents the Tcl/Tk text widget/window func Text P added in v0.2.0 func Text(options ...Opt) *TextWidget * Description * Standard options * Widget specific options Text -- Create and manipulate 'text' hypertext editing widgets Description P The text command creates a new window (given by the pathName argument) and makes it into a text widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the text such as its default background color and relief. The text command returns the path name of the new window. A text widget displays one or more lines of text and allows that text to be edited. Text widgets support four different kinds of annotations on the text, called tags, marks, embedded windows or embedded images. Tags allow different portions of the text to be displayed with different fonts and colors. In addition, Tcl commands can be associated with tags so that scripts are invoked when particular actions such as keystrokes and mouse button presses occur in particular ranges of the text. See TAGS below for more details. The second form of annotation consists of floating markers in the text called marks . Marks are used to keep track of various interesting positions in the text as it is edited. See MARKS below for more details. The third form of annotation allows arbitrary windows to be embedded in a text widget. See EMBEDDED WINDOWS below for more details. The fourth form of annotation allows Tk images to be embedded in a text widget. See EMBEDDED IMAGES below for more details. The text widget also has a built-in undo/redo mechanism. See THE UNDO MECHANISM below for more details. The text widget allows for the creation of peer widgets. These are other text widgets which share the same underlying data (text, marks, tags, images, etc). See PEER WIDGETS below for more details. Use Window.Text to create a Text with a particular parent. More information might be available at the Tcl/Tk text page. Standard options P * Background * Borderwidth * Cursor * Exportselection * Foreground * Highlightbackground * Highlightcolor * Highlightthickness * Insertbackground * Insertborderwidth * Insertofftime * Insertontime * Insertwidth * Padx * Pady * Relief * Selectbackground * Selectborderwidth * Selectforeground * Setgrid * Takefocus * Xscrollcommand * Yscrollcommand Widget specific options P Autoseparators Specifies a boolean that says whether separators are automatically inserted in the undo stack. Only meaningful when the -undo option is true. Blockcursor Specifies a boolean that says whether the blinking insertion cursor should be drawn as a character-sized rectangular block. If false (the default) a thin vertical line is used for the insertion cursor. Endline Specifies an integer line index representing the line of the underlying textual data store that should be just after the last line contained in the widget. This allows a text widget to reflect only a portion of a larger piece of text. Instead of an integer, the empty string can be provided to this configuration option, which will configure the widget to end at the very last line in the textual data store. Height Specifies the desired height for the window, in units of characters in the font given by the -font option. Must be at least one. Inactiveselectbackground Specifies the colour to use for the selection (the sel tag) when the window does not have the input focus. If empty, {}, then no selection is shown when the window does not have the focus. Insertunfocussed Specifies how to display the insertion cursor when the widget does not have the focus. Must be none (the default) which means to not display the cursor, hollow which means to display a hollow box, or solid which means to display a solid box. Note that hollow and solid will appear very similar when the -blockcursor option is false. Maxundo Specifies the maximum number of compound undo actions on the undo stack. A zero or a negative value imply an unlimited undo stack. Spacing1 Requests additional space above each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the first line on the display. This option may be overridden with -spacing1 options in tags. Spacing2 For lines that wrap (so that they cover more than one line on the display) this option specifies additional space to provide between the display lines that represent a single line of text. The value may have any of the standard forms for screen distances. This option may be overridden with -spacing2 options in tags. Spacing3 Requests additional space below each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the last line on the display. This option may be overridden with -spacing3 options in tags. Startline Specifies an integer line index representing the first line of the underlying textual data store that should be contained in the widget. This allows a text widget to reflect only a portion of a larger piece of text. Instead of an integer, the empty string can be provided to this configuration option, which will configure the widget to start at the very first line in the textual data store. State Specifies one of two states for the text: normal or disabled. If the text is disabled then characters may not be inserted or deleted and no insertion cursor will be displayed, even if the input focus is in the widget. Tabs Specifies a set of tab stops for the window. The option's value consists of a list of screen distances giving the positions of the tab stops, each of which is a distance relative to the left edge of the widget (excluding borders, padding, etc). Each position may optionally be followed in the next list element by one of the keywords left, right, center, or numeric, which specifies how to justify text relative to the tab stop. Left is the default; it causes the text following the tab character to be positioned with its left edge at the tab position. Right means that the right edge of the text following the tab character is positioned at the tab position, and center means that the text is centered at the tab position. Numeric means that the decimal point in the text is positioned at the tab position; if there is no decimal point then the least significant digit of the number is positioned just to the left of the tab position; if there is no number in the text then the text is right-justified at the tab position. For example, creates three tab stops at two-centimeter intervals; the first two use left justification and the third uses center justification. Tabstyle Specifies how to interpret the relationship between tab stops on a line and tabs in the text of that line. The value must be tabular (the default) or wordprocessor. Note that tabs are interpreted as they are encountered in the text. If the tab style is tabular then the n'th tab character in the line's text will be associated with the n'th tab stop defined for that line. If the tab character's x coordinate falls to the right of the n'th tab stop, then a gap of a single space will be inserted as a fallback. If the tab style is wordprocessor then any tab character being laid out will use (and be defined by) the first tab stop to the right of the preceding characters already laid out on that line. The value of the -tabstyle option may be overridden by -tabstyle options in tags. Undo Specifies a boolean that says whether the undo mechanism is active or not. Width Specifies the desired width for the window in units of characters in the font given by the -font option. If the font does not have a uniform width then the width of the character is used in translating from character units to screen units. Wrap Specifies how to handle lines in the text that are too long to be displayed in a single line of the text's window. The value must be none or char or word. A wrap mode of none means that each line of text appears as exactly one line on the screen; extra characters that do not fit on the screen are not displayed. In the other modes each line of text will be broken up into several screen lines if necessary to keep all the characters visible. In char mode a screen line break may occur after any character; in word mode a line break will only be made at word boundaries. func (*TextWidget) Clear P added in v0.38.0 func (w *TextWidget) Clear() * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Clear makes 'w' empty. func (*TextWidget) Copy P added in v0.32.0 func (w *TextWidget) Copy() * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Copies the selection in the widget to the clipboard, if there is a selection. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) Count P added in v0.48.0 func (w *TextWidget) Count(options ...any) []string * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Counts the number of relevant things between the two indices. If index1 is after index2, the result will be a negative number (and this holds for each of the possible options). The actual items which are counted depend on the options given. The result is a list of integers, one for the result of each counting option given. Valid counting options are -chars, -displaychars, -displayindices, -displaylines, -indices, -lines, -xpixels and -ypixels. The default value, if no option is specified, is -indices. There is an additional possible option -update which is a modifier. If given (and if the text widget is managed by a geometry manager), then all subsequent options ensure that any possible out of date information is recalculated. This currently only has any effect for the -ypixels count (which, if -update is not given, will use the text widget's current cached value for each line). This -update option is obsoleted by pathName sync, pathName pendingsync and <>. The count options are interpreted as follows: * Chars Count all characters, whether elided or not. Do not count embedded windows or images. * Displaychars Count all non-elided characters. * Displayindices Count all non-elided characters, windows and images. * Displaylines Count all display lines (i.e. counting one for each time a line wraps) from the line of the first index up to, but not including the display line of the second index. Therefore if they are both on the same display line, zero will be returned. By definition displaylines are visible and therefore this only counts portions of actual visible lines. * Indices Count all characters and embedded windows or images (i.e. everything which counts in text-widget index space), whether they are elided or not. * Lines Count all logical lines (irrespective of wrapping) from the line of the first index up to, but not including the line of the second index. Therefore if they are both on the same line, zero will be returned. Logical lines are counted whether they are currently visible (non-elided) or not. * Xpixels Count the number of horizontal pixels from the first pixel of the first index to (but not including) the first pixel of the second index. To count the total desired width of the text widget (assuming wrapping is not enabled), first find the longest line and then use ".text count -xpixels "${line}.0" "${line}.0 lineend"". * Ypixels Count the number of vertical pixels from the first pixel of the first index to (but not including) the first pixel of the second index. If both indices are on the same display line, zero will be returned. To count the total number of vertical pixels in the text widget, use ".text count -ypixels 1.0 end", and to ensure this is up to date, use ".text count -update -ypixels 1.0 end". The command returns a positive or negative integer corresponding to the number of items counted between the two indices. One such integer is returned for each counting option given, so a list is returned if more than one option was supplied. For example ".text count -xpixels -ypixels 1.3 4.5" is perfectly valid and will return a list of two elements. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) Cut P added in v0.32.0 func (w *TextWidget) Cut() * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Copies the selection in the widget to the clipboard and deletes the selection. If there is no selection in the widget then these keys have no effect. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) Delete P added in v0.37.0 func (w *TextWidget) Delete(options ...any) * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Delete a range of characters from the text. If both index1 and index2 are specified, then delete all the characters starting with the one given by index1 and stopping just before index2 (i.e. the character at index2 is not deleted). If index2 does not specify a position later in the text than index1 then no characters are deleted. If index2 is not specified then the single character at index1 is deleted. Attempts to delete characters in a way that would leave the text without a newline as the last character will be tweaked by the text widget to avoid this. In particular, deletion of complete lines of text up to the end of the text will also delete the newline character just before the deleted block so that it is replaced by the new final newline of the text widget. The command returns an empty string. If more indices are given, multiple ranges of text will be deleted. All indices are first checked for validity before any deletions are made. They are sorted and the text is removed from the last range to the first range so deleted text does not cause an undesired index shifting side-effects. If multiple ranges with the same start index are given, then the longest range is used. If overlapping ranges are given, then they will be merged into spans that do not cause deletion of text outside the given ranges due to text shifted during deletion. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) EditReset P added in v0.47.0 func (w *TextWidget) EditReset() * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Clears the undo and redo stacks. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) Get P added in v0.30.3 func (w *TextWidget) Get(options ...any) (r []string) * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Return a range of characters from the text. The return value will be all the characters in the text starting with the one whose index is index1 and ending just before the one whose index is index2 (the character at index2 will not be returned). If index2 is omitted then the single character at index1 is returned. If there are no characters in the specified range (e.g. index1 is past the end of the file or index2 is less than or equal to index1) then an empty string is returned. If the specified range contains embedded windows, no information about them is included in the returned string. If multiple index pairs are given, multiple ranges of text will be returned in a list. Invalid ranges will not be represented with empty strings in the list. The ranges are returned in the order passed to pathName get. If the -displaychars option is given, then, within each range, only those characters which are not elided will be returned. This may have the effect that some of the returned ranges are empty strings. BUG(jnml) TextWidget.Get currently supports only one range. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) ImageCreate P added in v0.36.0 func (w *TextWidget) ImageCreate(index any, options ...Opt) * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P This command creates a new image annotation, which will appear in the text at the position given by index. Any number of option-value pairs may be specified to configure the annotation. Returns a unique identifier that may be used as an index to refer to this image. See EMBEDDED IMAGES for information on the options that are supported, and a description of the identifier returned. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) Index P added in v0.43.0 func (w *TextWidget) Index(index any) (r string) * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P Returns the position corresponding to index in the form line.char where line is the line number and char is the character number. Index may have any of the forms described under INDICES above. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) Insert P added in v0.11.0 func (w *TextWidget) Insert(index any, chars string, options ...string) any * Description * Indices Text -- Create and manipulate 'text' hypertext editing widgets Description P Inserts all of the chars arguments just before the character at index. If index refers to the end of the text (the character after the last newline) then the new text is inserted just before the last newline instead. If there is a single chars argument and no tagList, then the new text will receive any tags that are present on both the character before and the character after the insertion point; if a tag is present on only one of these characters then it will not be applied to the new text. If tagList is specified then it consists of a list of tag names; the new characters will receive all of the tags in this list and no others, regardless of the tags present around the insertion point. If multiple chars-tagList argument pairs are present, they produce the same effect as if a separate pathName insert widget command had been issued for each pair, in order. The last tagList argument may be omitted. The value that is passed to Tcl/Tk for the 'index' argument is obtained by fmt.Sprint(index), enabling any custom index encoding via implementing fmt.Stringer. Indices P Many of the widget commands for texts take one or more indices as arguments. An index is a string used to indicate a particular place within a text, such as a place to insert characters or one endpoint of a range of characters to delete. Indices have the syntax base modifier modifier modifier ... Where base gives a starting point and the modifiers adjust the index from the starting point (e.g. move forward or backward one character). Every index must contain a base, but the modifiers are optional. Most modifiers (as documented below) allow an optional submodifier. Valid submodifiers are any and display. If the submodifier is abbreviated, then it must be followed by whitespace, but otherwise there need be no space between the submodifier and the following modifier. Typically the display submodifier adjusts the meaning of the following modifier to make it refer to visual or non-elided units rather than logical units, but this is explained for each relevant case below. Lastly, where count is used as part of a modifier, it can be positive or negative, so "base - -3 lines" is perfectly valid (and equivalent to "base +3lines"). The base for an index must have one of the following forms: "line.char" Indicates char'th character on line line. Lines are numbered from 1 for consistency with other UNIX programs that use this numbering scheme. Within a line, characters are numbered from 0. If char is end then it refers to the newline character that ends the line. This form of index can be passed as LC{line, char}. "@x,y" Indicates the character that covers the pixel whose x and y coordinates within the text's window are x and y. "end" Indicates the end of the text (the character just after the last newline). "mark" Indicates the character just after the mark whose name is mark (see MARKS for details). "tag.first" Indicates the first character in the text that has been tagged with tag. This form generates an error if no characters are currently tagged with tag. "tag.last" Indicates the character just after the last one in the text that has been tagged with tag. This form generates an error if no characters are currently tagged with tag. "pathName" Indicates the position of the embedded window whose name is pathName. This form generates an error if there is no embedded window by the given name. "imageName" Indicates the position of the embedded image whose name is imageName. This form generates an error if there is no embedded image by the given name. If the base could match more than one of the above forms, such as a mark and imageName both having the same value, then the form earlier in the above list takes precedence. If modifiers follow the base index, each one of them must have one of the forms listed below. Keywords such as chars and wordend may be abbreviated as long as the abbreviation is unambiguous. "+ count ?submodifier? chars" Adjust the index forward by count characters, moving to later lines in the text if necessary. If there are fewer than count characters in the text after the current index, then set the index to the last index in the text. Spaces on either side of count are optional. If the display submodifier is given, elided characters are skipped over without being counted. If any is given, then all characters are counted. For historical reasons, if neither modifier is given then the count actually takes place in units of index positions (see INDICES for details). This behaviour may be changed in a future major release, so if you need an index count, you are encouraged to use indices instead wherever possible. "- count ?submodifier? chars" Adjust the index backward by count characters, moving to earlier lines in the text if necessary. If there are fewer than count characters in the text before the current index, then set the index to the first index in the text (1.0). Spaces on either side of count are optional. If the display submodifier is given, elided characters are skipped over without being counted. If any is given, then all characters are counted. For historical reasons, if neither modifier is given then the count actually takes place in units of index positions (see INDICES for details). This behavior may be changed in a future major release, so if you need an index count, you are encouraged to use indices instead wherever possible. "+ count ?submodifier? indices" Adjust the index forward by count index positions, moving to later lines in the text if necessary. If there are fewer than count index positions in the text after the current index, then set the index to the last index position in the text. Spaces on either side of count are optional. Note that an index position is either a single character or a single embedded image or embedded window. If the display submodifier is given, elided indices are skipped over without being counted. If any is given, then all indices are counted; this is also the default behaviour if no modifier is given. "- count ?submodifier? indices" Adjust the index backward by count index positions, moving to earlier lines in the text if necessary. If there are fewer than count index positions in the text before the current index, then set the index to the first index position (1.0) in the text. Spaces on either side of count are optional. If the display submodifier is given, elided indices are skipped over without being counted. If any is given, then all indices are counted; this is also the default behaviour if no modifier is given. "+ count ?submodifier? lines" Adjust the index forward by count lines, retaining the same character position within the line. If there are fewer than count lines after the line containing the current index, then set the index to refer to the same character position on the last line of the text. Then, if the line is not long enough to contain a character at the indicated character position, adjust the character position to refer to the last character of the line (the newline). Spaces on either side of count are optional. If the display submodifier is given, then each visual display line is counted separately. Otherwise, if any (or no modifier) is given, then each logical line (no matter how many times it is visually wrapped) counts just once. If the relevant lines are not wrapped, then these two methods of counting are equivalent. "- count ?submodifier? lines" Adjust the index backward by count logical lines, retaining the same character position within the line. If there are fewer than count lines before the line containing the current index, then set the index to refer to the same character position on the first line of the text. Then, if the line is not long enough to contain a character at the indicated character position, adjust the character position to refer to the last character of the line (the newline). Spaces on either side of count are optional. If the display submodifier is given, then each visual display line is counted separately. Otherwise, if any (or no modifier) is given, then each logical line (no matter how many times it is visually wrapped) counts just once. If the relevant lines are not wrapped, then these two methods of counting are equivalent. "?submodifier? linestart" Adjust the index to refer to the first index on the line. If the display submodifier is given, this is the first index on the display line, otherwise on the logical line. "?submodifier? lineend" Adjust the index to refer to the last index on the line (the newline). If the display submodifier is given, this is the last index on the display line, otherwise on the logical line. "?submodifier? wordstart" Adjust the index to refer to the first character of the word containing the current index. A word consists of any number of adjacent characters that are letters, digits, or underscores, or a single character that is not one of these. If the display submodifier is given, this only examines non-elided characters, otherwise all characters (elided or not) are examined. "?submodifier? wordend" Adjust the index to refer to the character just after the last one of the word containing the current index. If the current index refers to the last character of the text then it is not modified. If the display submodifier is given, this only examines non-elided characters, otherwise all characters (elided or not) are examined. If more than one modifier is present then they are applied in left-to-right order. For example, the index "end - 1 chars" refers to the next-to-last character in the text and "insert wordstart - 1 c" refers to the character just before the first one in the word containing the insertion cursor. Modifiers are applied one by one in this left to right order, and after each step the resulting index is constrained to be a valid index in the text widget. So, for example, the index "1.0 -1c +1c" refers to the index "2.0". Where modifiers result in index changes by display lines, display chars or display indices, and the base refers to an index inside an elided tag, that base index is considered to be equivalent to the first following non-elided index. Insert returns its index argument. Additional information might be available at the Tcl/Tk text page. func (*TextWidget) InsertML P added in v0.17.0 func (w *TextWidget) InsertML(list ...any) * Description Text -- Create and manipulate 'text' hypertext editing widgets Description P InsertML inserts 'ml' at the end of 'w', interpreting it as a HTML-like markup language. It recognizes and treats accordingly the
tag. The tag is reserved for embedded images. You can inline the image directly: InsertML("Hello", NewPhoto(...), Align("top"), "world!") The tag is reserved for embedded widgets. You can inline a widget directly: InsertML("Hello", Button(Txt("Foo")), Align("center"), "world!") The
 tag works similarly to HTML, ie. white space and line
breaks are kept. To make the content of a 
 rendered in
monospace, configure the tag, for example:

t.TagConfigure("pre", Font(CourierFont(), 10)

Other ML-tags are used as names of configured 'w' tags, if
configured, ignored otherwise.

Example usage in _examples/embed.go.

func (*TextWidget) MarkGravity P added in v0.45.0

func (w *TextWidget) MarkGravity(markName, direction string)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

If direction is not specified, returns left or right to indicate
which of its adjacent characters markName is attached to. If
direction is specified, it must be left or right; the gravity of
markName is set to the given value.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) MarkNames P added in v0.45.0

func (w *TextWidget) MarkNames() []string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Returns a list whose elements are the names of all the marks that are
currently set.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) MarkSet P added in v0.44.0

func (w *TextWidget) MarkSet(markName string, index any)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Sets the mark named markName to a position just before the character
at index. If markName already exists, it is moved from its old
position; if it does not exist, a new mark is created. This command
returns an empty string.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) MarkUnset P added in v0.45.0

func (w *TextWidget) MarkUnset(markName ...string)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Remove the mark corresponding to each of the markName arguments. The
removed marks will not be usable in indices and will not be returned
by future calls to "pathName mark names". This command returns an
empty string.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Modified P added in v0.41.0

func (w *TextWidget) Modified() bool

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Returns the modified flag of the widget. The insert, delete, edit
undo and edit redo commands or the user can set or clear the modified
flag.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Paste P added in v0.32.0

func (w *TextWidget) Paste()

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Inserts the contents of the clipboard at the position of the
insertion cursor.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Redo P added in v0.31.0

func (w *TextWidget) Redo()

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

When the -undo option is true, reapplies the last undone edits
provided no other edits were done since then, and returns a list of
indices indicating what ranges were changed by the redo operation.
Generates an error when the redo stack is empty. Does nothing when
the -undo option is false.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Search P added in v0.44.0

func (w *TextWidget) Search(options ...any) string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Searches the text in pathName starting at index for a range of
characters that matches pattern. If a match is found, the index of
the first character in the match is returned as result; otherwise an
empty string is returned. One or more of the following switches (or
abbreviations thereof) may be specified to control the search:

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) See P added in v0.43.0

func (w *TextWidget) See(index any)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Adjusts the view in the window so that the character given by index
is completely visible. If index is already visible then the command
does nothing. If index is a short distance out of view, the command
adjusts the view just enough to make index visible at the edge of the
window. If index is far out of view, then the command centers index
in the window.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) SelectAll P added in v0.41.0

func (w *TextWidget) SelectAll()

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Select all text in 'w'.

func (*TextWidget) SetModified P added in v0.41.0

func (w *TextWidget) SetModified(v bool)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Sets the modified flag of the widget to 'v'.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) TagAdd P added in v0.11.0

func (w *TextWidget) TagAdd(options ...any) string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Associate the tag name with all of the characters starting with
index1 and ending just before index2 (the character at index2 is not
tagged). A single command may contain any number of index1-index2
pairs. If the last index2 is omitted then the single character at
index1 is tagged. If there are no characters in the specified range
(e.g. index1 is past the end of the file or index2 is less than or
equal to index1) then the command has no effect.

The function returns the new tag name.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) TagBind P added in v0.40.0

func (w *TextWidget) TagBind(tag, sequence string, handler any) string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

This command associates a script with the tag given by tagName.
Whenever the event sequence given by sequence occurs for a character
that has been tagged with tagName, the script will be invoked. This
widget command is similar to the bind command except that it operates
on characters in a text rather than entire widgets. See the bind
manual entry for complete details on the syntax of sequence and the
substitutions performed on script before invoking it. A new binding
is created, replacing any existing binding for the same sequence and
tagName. The only events for which bindings may be specified are
those related to the mouse and keyboard (such as Enter, Leave,
Button, Motion, and Key) or virtual events. Mouse and keyboard event
bindings for a text widget respectively use the current and insert
marks described under MARKS above. An Enter event triggers for a tag
when the tag first becomes present on the current character, and a
Leave event triggers for a tag when it ceases to be present on the
current character. Enter and Leave events can happen either because
the current mark moved or because the character at that position
changed. Note that these events are different than Enter and Leave
events for windows. Mouse events are directed to the current
character, while keyboard events are directed to the insert
character. If a virtual event is used in a binding, that binding can
trigger only if the virtual event is defined by an underlying
mouse-related or keyboard-related event.

It is possible for the current character to have multiple tags, and
for each of them to have a binding for a particular event sequence.
When this occurs, one binding is invoked for each tag, in order from
lowest-priority to highest priority. If there are multiple matching
bindings for a single tag, then the most specific binding is chosen
(see the manual entry for the bind command for details). continue and
break commands within binding scripts are processed in the same way
as for bindings created with the bind command.

If bindings are created for the widget as a whole using the bind
command, then those bindings will supplement the tag bindings. The
tag bindings will be invoked first, followed by bindings for the
window as a whole.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) TagConfigure P added in v0.11.0

func (w *TextWidget) TagConfigure(tagName string, options ...Opt)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

This command is similar to the pathName configure widget command
except that it modifies options associated with the tag given by
tagName instead of modifying options for the overall text widget. If
no option is specified, the command returns a list describing all of
the available options for tagName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified with
no value, then the command returns a list describing the one named
option (this list will be identical to the corresponding sublist of
the value returned if no option is specified). If one or more
option-value pairs are specified, then the command modifies the given
option(s) to have the given value(s) in tagName; in this case the
command returns an empty string. See TAGS above for details on the
options available for tags.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) TagDelete P added in v0.38.0

func (w *TextWidget) TagDelete(tags ...string)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Deletes all tag information for each of the tagName arguments. The
command removes the tags from all characters in the file and also
deletes any other information associated with the tags, such as
bindings and display information. The command returns an empty
string.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) TagNames P added in v0.38.0

func (w *TextWidget) TagNames(index string) []string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Returns a list whose elements are the names of all the tags that are
active at the character position given by index. If index is omitted,
then the return value will describe all of the tags that exist for
the text (this includes all tags that have been named in a "pathName
tag" widget command but have not been deleted by a "pathName tag
delete" widget command, even if no characters are currently marked
with the tag). The list will be sorted in order from lowest priority
to highest priority.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) TagRanges P added in v0.51.0

func (w *TextWidget) TagRanges(tagName string) (r []string)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Returns a list describing all of the ranges of text that have been
tagged with tagName. The first two elements of the list describe the
first tagged range in the text, the next two elements describe the
second range, and so on. The first element of each pair contains the
index of the first character of the range, and the second element of
the pair contains the index of the character just after the last one
in the range. If there are no characters tagged with tag then an
empty string is returned.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Text P added in v0.31.0

func (w *TextWidget) Text() string

Text is a shortcut for w.Get("1.0", "end-1c")[0].

func (*TextWidget) Undo P added in v0.31.0

func (w *TextWidget) Undo()

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Undoes the last edit action when the -undo option is true, and
returns a list of indices indicating what ranges were changed by the
undo operation. An edit action is defined as all the insert and
delete commands that are recorded on the undo stack in between two
separators. Generates an error when the undo stack is empty. Does
nothing when the -undo option is false.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) WindowCreate P added in v0.36.0

func (w *TextWidget) WindowCreate(index any, options ...Opt)

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

This command creates a new window annotation, which will appear in
the text at the position given by index. Any number of option-value
pairs may be specified to configure the annotation. See EMBEDDED
WINDOWS for information on the options that are supported. Returns an
empty string.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Xview P added in v0.17.0

func (w *TextWidget) Xview() string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Returns a list containing two elements, both of which are real
fractions between 0 and 1. The first element gives the position of
the first visible pixel of the first character (or image, etc) in the
top line in the window, relative to the text as a whole (0.5 means it
is halfway through the text, for example). The second element gives
the position of the first pixel just after the last visible one in
the bottom line of the window, relative to the text as a whole. These
are the same values passed to scrollbars via the -xscrollcommand
option.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Yview P added in v0.16.2

func (w *TextWidget) Yview() string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Returns a list containing two elements, both of which are real
fractions between 0 and 1. The first element gives the position of
the first visible pixel of the first character (or image, etc) in the
top line in the window, relative to the text as a whole (0.5 means it
is halfway through the text, for example). The second element gives
the position of the first pixel just after the last visible one in
the bottom line of the window, relative to the text as a whole. These
are the same values passed to scrollbars via the -yscrollcommand
option.

Additional information might be available at the Tcl/Tk text page.

func (*TextWidget) Yviewmoveto P added in v0.43.0

func (w *TextWidget) Yviewmoveto(fraction any) string

  * Description

Text -- Create and manipulate 'text' hypertext editing widgets

Description P

Adjusts the view in the window so that the pixel given by fraction
appears at the top of the top line of the window. Fraction is a
fraction between 0 and 1; 0 indicates the first pixel of the first
character in the text, 0.33 indicates the pixel that is one-third the
way through the text; and so on. Values close to 1 will indicate
values close to the last pixel in the text (1 actually refers to one
pixel beyond the last pixel), but in such cases the widget will never
scroll beyond the last pixel, and so a value of 1 will effectively be
rounded back to whatever fraction ensures the last pixel is at the
bottom of the window, and some other pixel is at the top.

Additional information might be available at the Tcl/Tk text page.

type Theme P added in v0.53.0

type Theme interface {
        // Activate makes the theme active/in use. The Activate method of themes in
        // Themes automatically call Initialize if it was not called before.
        Activate(context ThemeContext) error
        // Deactivate makes the theme not active. Deactivate cannot be called before
        // Activate().
        Deactivate(context ThemeContext) error
        // Finalize is called to perform any cleanup. After Finalize returns, the theme
        // cannot be used. The Finalize method of themes in Themes automatically remove
        // the theme from Themes after Finalize completes.
        Finalize(context ThemeContext) error
        // Initialize is called to perform any one-time initialization of a theme. The
        // Initialize method of themes in Themes can be called multiple times but only
        // the first successful call to Initialize will have any effect.
        Initialize(context ThemeContext) error
}

Theme provides handling of a Tk theme. When calling Theme methods
registered in Theme, the context argument is ignored and an instance
is created automatically.

func CurrentTheme P added in v0.53.0

func CurrentTheme() Theme

CurrentTheme returns the currently activated theme, if any.

type ThemeContext P added in v0.53.0

type ThemeContext interface {
        Eval(tcl string) (r string, err error)
}

ThemeContext provides context to Theme methods.

type ThemeKey P added in v0.53.0

type ThemeKey struct {
        Type string
        Name string
}

ThemeKey indexes Themes

func RegisterTheme P added in v0.53.0

func RegisterTheme(name string, t Theme) (r ThemeKey, err error)

RegisterTheme registers t.

type Ticker P added in v0.30.2

type Ticker struct {
        // contains filtered or unexported fields
}

func NewTicker P added in v0.30.2

func NewTicker(d time.Duration, handler func()) (r *Ticker, err error)

type ToplevelWidget P added in v0.11.0

type ToplevelWidget struct {
        *Window
}

ToplevelWidget represents the Tcl/Tk toplevel widget/window

func Toplevel P added in v0.2.0

func Toplevel(options ...Opt) *ToplevelWidget

  * Description
  * Standard options
  * Widget specific options

Toplevel -- Create and manipulate 'toplevel' main and popup window
widgets

Description P

The toplevel command creates a new toplevel widget (given by the
pathName argument). Additional options, described above, may be
specified on the command line or in the option database to configure
aspects of the toplevel such as its background color and relief. The
toplevel command returns the path name of the new window.

A toplevel is similar to a frame except that it is created as a
top-level window: its X parent is the root window of a screen rather
than the logical parent from its Tk path name. The primary purpose of
a toplevel is to serve as a container for dialog boxes and other
collections of widgets. The only visible features of a toplevel are
its background and an optional 3-D border to make the toplevel appear
raised or sunken.

Use Window.Toplevel to create a Toplevel with a particular parent.

More information might be available at the Tcl/Tk toplevel page.

Standard options P

  * Borderwidth
  * Cursor
  * Highlightbackground
  * Highlightcolor
  * Highlightthickness
  * Padx
  * Pady
  * Relief
  * Takefocus

Widget specific options P

Background

This option is the same as the standard -background option except
that its value may also be specified as an empty string. In this
case, the widget will display no background or border, and no colors
will be consumed from its colormap for its background and border. An
empty background will disable drawing the background image.

Backgroundimage

This specifies an image to display on the toplevel's background
within the border of the toplevel (i.e., the image will be clipped by
the toplevel's highlight ring and border, if either are present) on
top of the background; subwidgets of the toplevel will be drawn on
top. The image must have been created with the image create command.
If specified as the empty string, no image will be displayed.

Class

Specifies a class for the window. This class will be used when
querying the option database for the window's other options, and it
will also be used later for other purposes such as bindings. Some
window managers display the class name for windows in their dock
while some others display the window title. The -class option may not
be changed with the configure widget command.

Colormap

Specifies a colormap to use for the window. The value may be either
new, in which case a new colormap is created for the window and its
children, or the name of another window (which must be on the same
screen and have the same visual as pathName), in which case the new
window will use the colormap from the specified window. If the
-colormap option is not specified, the new window uses the default
colormap of its screen. This option may not be changed with the
configure widget command.

Container

The value must be a boolean. If true, it means that this window will
be used as a container in which some other application will be
embedded (for example, a Tk toplevel can be embedded using the -use
option). The window will support the appropriate window manager
protocols for things like geometry requests. The window should not
have any children of its own in this application. This option may not
be changed with the configure widget command.

Height

Specifies the desired height for the window in any of the forms
acceptable to Tk_GetPixels. If this option is negative or zero then
the window will not request any size at all.

Mnu

Specifies a menu widget to be used as a menubar. On the Macintosh,
the menubar will be displayed across the top of the main monitor. On
Microsoft Windows and all UNIX platforms, the menu will appear across
the toplevel window as part of the window dressing maintained by the
window manager.

Screen

Specifies the screen on which to place the new window. Any valid
screen name may be used, even one associated with a different
display. Defaults to the same screen as its parent. This option is
special in that it may not be specified via the option database, and
it may not be modified with the configure widget command.

Tile

This specifies how to draw the background image (see
-backgroundimage) on the toplevel. If true (according to
Tcl_GetBoolean), the image will be tiled to fill the whole toplevel,
with the origin of the first copy of the image being the top left of
the interior of the toplevel. If false (the default), the image will
be centered within the toplevel.

Use

This option is used for embedding. If the value is not an empty
string, it must be the window identifier of a container window,
specified as a hexadecimal string like the ones returned by the winfo
id command. The toplevel widget will be created as a child of the
given container instead of the root window for the screen. If the
container window is in a Tk application, it must be a frame or
toplevel widget for which the -container option was specified. This
option may not be changed with the configure widget command.

Visual

Specifies visual information for the new window in any of the forms
accepted by Tk_GetVisual. If this option is not specified, the new
window will use the default visual for its screen. The -visual option
may not be modified with the configure widget command.

Width

Specifies the desired width for the window in any of the forms
acceptable to Tk_GetPixels. If this option is negative or zero then
the window will not request any size at all.

type VariableOpt P added in v0.53.0

type VariableOpt struct {
        // contains filtered or unexported fields
}

VariableOpt is an Opt linking Go and Tcl variables.

func Variable P added in v0.3.0

func Variable(val any) *VariableOpt

Variable option.

Known uses:

  * Checkbutton (widget specific)
  * MenuWidget.AddCascade (command specific)
  * MenuWidget.AddCommand (command specific)
  * MenuWidget.AddSeparator (command specific)
  * Radiobutton (widget specific)
  * Scale (widget specific)
  * TCheckbutton (widget specific)
  * TProgressbar (widget specific)
  * TRadiobutton (widget specific)
  * TScale (widget specific)

func (*VariableOpt) Get P added in v0.53.0

func (v *VariableOpt) Get() (r string)

Get return the value of the linked Tcl variable.

func (*VariableOpt) Set P added in v0.53.0

func (v *VariableOpt) Set(val any)

Set sets the value of the linked Tcl variable.

type Widget P added in v0.11.0

type Widget interface {
        // contains filtered or unexported methods
}

Widget is implemented by every *Window

Widget implements Opt. When a Widget instance is used as an Opt, it
provides its path name.

func Tooltip P added in v0.49.0

func Tooltip(w Widget, options ...any) (r Widget)

  * Description

tooltip -- Tooltip management

Description P

This command arranges for widget 'w' to display a tooltip with a
message.

If the specified widget is a menu, canvas, listbox, ttk::treeview,
ttk::notebook or text widget then additional options are used to tie
the tooltip to specific menu, canvas or listbox items, ttk::treeview
items or column headings, ttk::notebook tabs, or text widget tags.

  * Heading columnId: This option is used to set a tooltip for a
    ttk::treeview column heading. The column does not need to already
    exist. You should not use the same identifiers for columns and
    items in a widget for which you are using tooltips as their
    tooltips will be mixed. The widget must be a ttk::treeview
    widget.

  * Image image: The specified (photo) image will be displayed to the
    left of the primary tooltip message.

  * Index index: This option is used to set a tooltip on a menu item.
    The index may be either the entry index or the entry label. The
    widget must be a menu widget but the entries do not have to exist
    when the tooltip is set.

  * Info info: The specified info text will be displayed as
    additional information below the primary tooltip message.

  * Items items: This option is used to set a tooltip for canvas,
    listbox or ttk::treview items. For the canvas widget, the item
    must already be present in the canvas and will be found with a
    find withtag lookup. For listbox and ttk::treview widgets the
    item(s) may be created later but the programmer is responsible
    for managing the link between the listbox or ttk::treview item
    index and the corresponding tooltip. If the listbox or
    ttk::treview items are re-ordered, the tooltips will need
    amending.

    If the widget is not a canvas, listbox or ttk::treview then an
    error is raised.

  * Tab tabId: The -tab option can be used to set a tooltip for a
    ttk::notebook tab. The tab should already be present when this
    command is called, or an error will be returned. The widget must
    be a ttk::notebook widget.

  * Tag name: The -tag option can be used to set a tooltip for a text
    widget tag. The tag should already be present when this command
    is called, or an error will be returned. The widget must be a
    text widget.

  * "--": The -- option marks the end of options. The argument
    following this one will be treated as message even if it starts
    with a -.

Tooltip returns 'w'.

More information might be available at the Tklib tooltip page.

type Window P added in v0.2.0

type Window struct {
        // contains filtered or unexported fields
}

Window represents a Tk window/widget. It implements common widget
methods.

Window implements Opt. When a Window instance is used as an Opt, it
provides its path name.

func (*Window) Activebackground P added in v0.5.18

func (w *Window) Activebackground() string

Activebackground -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menu
  * Menubutton
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox

func (*Window) Activeborderwidth P added in v0.5.18

func (w *Window) Activeborderwidth() string

Activeborderwidth -- Get the configured option value.

Known uses:

  * Menu

func (*Window) Activeforeground P added in v0.5.18

func (w *Window) Activeforeground() string

Activeforeground -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menu
  * Menubutton
  * Radiobutton

func (*Window) Activerelief P added in v0.5.18

func (w *Window) Activerelief() string

Activerelief -- Get the configured option value.

Known uses:

  * Menu
  * Scrollbar (widget specific)

func (*Window) Activestyle P added in v0.5.18

func (w *Window) Activestyle() string

Activestyle -- Get the configured option value.

Known uses:

  * Listbox (widget specific)

func (*Window) Anchor P added in v0.5.18

func (w *Window) Anchor() string

Anchor -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menubutton
  * Message
  * Radiobutton
  * TLabel
  * TProgressbar

func (*Window) Aspect P added in v0.5.18

func (w *Window) Aspect() string

Aspect -- Get the configured option value.

Known uses:

  * Message (widget specific)

func (*Window) Autoseparators P added in v0.5.18

func (w *Window) Autoseparators() string

Autoseparators -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Background P added in v0.5.18

func (w *Window) Background() string

Background -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame (widget specific)
  * Label
  * Labelframe (widget specific)
  * Listbox
  * Menu
  * Menubutton
  * Message
  * Panedwindow
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * TLabel (widget specific)
  * Text
  * Toplevel (widget specific)

func (*Window) Backgroundimage P added in v0.5.18

func (w *Window) Backgroundimage() string

Backgroundimage -- Get the configured option value.

Known uses:

  * Frame (widget specific)
  * Toplevel (widget specific)

func (*Window) Bigincrement P added in v0.5.18

func (w *Window) Bigincrement() string

Bigincrement -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Bitmap P added in v0.5.18

func (w *Window) Bitmap() string

Bitmap -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menubutton
  * Radiobutton

func (*Window) Blockcursor P added in v0.5.18

func (w *Window) Blockcursor() string

Blockcursor -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Borderwidth P added in v0.5.18

func (w *Window) Borderwidth() string

Borderwidth -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame
  * Label
  * Labelframe
  * Listbox
  * Menu
  * Menubutton
  * Message
  * Panedwindow
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * TFrame (widget specific)
  * Text
  * Toplevel

func (*Window) Busy P added in v0.5.18

func (w *Window) Busy(options ...Opt)

  * Description

Busy -- confine pointer events to a window sub-tree

Description P

The Busy command provides a simple means to block pointer events from
Tk widgets, while overriding the widget's cursor with a configurable
busy cursor. Note this command does not prevent keyboard events from
being sent to the widgets made busy.

  * Cursor cursorName

Specifies the cursor to be displayed when the widget is made busy.
CursorName can be in any form accepted by Tk_GetCursor. The default
cursor is wait on Windows and watch on other platforms.

More information might be available at the [Tcl/Tk busy] page.

func (*Window) BusyForget P added in v0.5.18

func (w *Window) BusyForget(options ...Opt)

  * Description

BusyForget -- undo Busy

Description P

Releases resources allocated by the Window.Busy command for window,
including the transparent window. User events will again be received
by window. Resources are also released when window is destroyed.
Window must be the name of a widget specified in the hold operation,
otherwise an error is reported.

More information might be available at the [Tcl/Tk busy] page.

func (*Window) Button P added in v0.2.0

func (w *Window) Button(options ...Opt) *ButtonWidget

Button -- Create and manipulate 'button' action widgets

The resulting Window is a child of 'w'

For details please see Button

func (*Window) Buttonbackground P added in v0.5.18

func (w *Window) Buttonbackground() string

Buttonbackground -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)

func (*Window) Buttoncursor P added in v0.5.18

func (w *Window) Buttoncursor() string

Buttoncursor -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)

func (*Window) Buttondownrelief P added in v0.5.18

func (w *Window) Buttondownrelief() string

Buttondownrelief -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)

func (*Window) Buttonuprelief P added in v0.5.18

func (w *Window) Buttonuprelief() string

Buttonuprelief -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)

func (*Window) Canvas P added in v0.2.0

func (w *Window) Canvas(options ...Opt) *CanvasWidget

Canvas -- Create and manipulate 'canvas' hypergraphics drawing surface
widgets

The resulting Window is a child of 'w'

For details please see Canvas

func (*Window) Center P added in v0.5.18

func (w *Window) Center() *Window

Center centers 'w' and returns 'w'.

func (*Window) Checkbutton P added in v0.2.0

func (w *Window) Checkbutton(options ...Opt) *CheckbuttonWidget

Checkbutton -- Create and manipulate 'checkbutton' boolean selection
widgets

The resulting Window is a child of 'w'

For details please see Checkbutton

func (*Window) Class P added in v0.5.18

func (w *Window) Class() string

Class -- Get the configured option value.

Known uses:

  * Frame (widget specific)
  * Labelframe (widget specific)
  * TButton
  * TCheckbutton
  * TCombobox
  * TEntry
  * TFrame
  * TLabel
  * TLabelframe
  * TMenubutton
  * TNotebook
  * TPanedwindow
  * TProgressbar
  * TRadiobutton
  * TScale
  * TScrollbar
  * TSeparator
  * TSizegrip
  * TSpinbox
  * TTreeview
  * Toplevel (widget specific)

func (*Window) Closeenough P added in v0.5.18

func (w *Window) Closeenough() string

Closeenough -- Get the configured option value.

Known uses:

  * Canvas (widget specific)

func (*Window) Colormap P added in v0.5.18

func (w *Window) Colormap() string

Colormap -- Get the configured option value.

Known uses:

  * Frame (widget specific)
  * Labelframe (widget specific)
  * Toplevel (widget specific)

func (*Window) Columns P added in v0.5.18

func (w *Window) Columns() string

Columns -- Get the configured option value.

Known uses:

  * TTreeview (widget specific)

func (*Window) Compound P added in v0.5.18

func (w *Window) Compound() string

Compound -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menubutton
  * Radiobutton
  * TButton
  * TCheckbutton
  * TLabel
  * TMenubutton
  * TNotebook (widget specific)
  * TRadiobutton

func (*Window) Configure P added in v0.4.12

func (w *Window) Configure(options ...Opt) *Window

Configure alters the configuration of 'w' and returns 'w'.

func (*Window) Confine P added in v0.5.18

func (w *Window) Confine() string

Confine -- Get the configured option value.

Known uses:

  * Canvas (widget specific)

func (*Window) Container P added in v0.5.18

func (w *Window) Container() string

Container -- Get the configured option value.

Known uses:

  * Frame (widget specific)
  * Toplevel (widget specific)

func (*Window) Cursor P added in v0.5.18

func (w *Window) Cursor() string

Cursor -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame
  * Label
  * Labelframe
  * Listbox
  * Menu
  * Menubutton
  * Message
  * Panedwindow
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * TButton
  * TCheckbutton
  * TCombobox
  * TEntry
  * TFrame
  * TLabel
  * TLabelframe
  * TMenubutton
  * TNotebook
  * TPanedwindow
  * TProgressbar
  * TRadiobutton
  * TScale
  * TScrollbar
  * TSeparator
  * TSizegrip
  * TSpinbox
  * TTreeview
  * Text
  * Toplevel

func (*Window) Default P added in v0.5.18

func (w *Window) Default() string

Default -- Get the configured option value.

Known uses:

  * Button (widget specific)
  * TButton (widget specific)

func (*Window) Digits P added in v0.5.18

func (w *Window) Digits() string

Digits -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Direction P added in v0.5.18

func (w *Window) Direction() string

Direction -- Get the configured option value.

Known uses:

  * Menubutton (widget specific)
  * TMenubutton (widget specific)

func (*Window) Disabledbackground P added in v0.5.18

func (w *Window) Disabledbackground() string

Disabledbackground -- Get the configured option value.

Known uses:

  * Entry (widget specific)
  * Spinbox (widget specific)

func (*Window) Disabledforeground P added in v0.5.18

func (w *Window) Disabledforeground() string

Disabledforeground -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Entry (widget specific)
  * Label
  * Listbox
  * Menu
  * Menubutton
  * Radiobutton
  * Spinbox (widget specific)

func (*Window) Displaycolumns P added in v0.5.18

func (w *Window) Displaycolumns() string

Displaycolumns -- Get the configured option value.

Known uses:

  * TTreeview (widget specific)

func (*Window) Elementborderwidth P added in v0.5.18

func (w *Window) Elementborderwidth() string

Elementborderwidth -- Get the configured option value.

Known uses:

  * Scrollbar (widget specific)

func (*Window) Endline P added in v0.5.18

func (w *Window) Endline() string

Endline -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Entry P added in v0.2.0

func (w *Window) Entry(options ...Opt) *EntryWidget

Entry -- Create and manipulate 'entry' one-line text entry widgets

The resulting Window is a child of 'w'

For details please see Entry

func (*Window) Exit P added in v0.5.18

func (w *Window) Exit(options ...Opt) *ButtonWidget

Exit provides a canned Button with default Txt "Exit", bound to the
ExitHandler.

The resulting Window is a child of 'w'

func (*Window) Exportselection P added in v0.5.18

func (w *Window) Exportselection() string

Exportselection -- Get the configured option value.

Known uses:

  * Entry
  * Listbox
  * Spinbox
  * TCombobox (widget specific)
  * TEntry (widget specific)
  * Text

func (*Window) Font P added in v0.19.3

func (w *Window) Font() string

Font -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Entry
  * Label
  * Labelframe
  * Listbox
  * Menu
  * Menubutton
  * Message
  * Radiobutton
  * Scale
  * Spinbox
  * TEntry
  * TLabel
  * TProgressbar
  * Text

func (*Window) Foreground P added in v0.5.18

func (w *Window) Foreground() string

Foreground -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Entry
  * Label
  * Labelframe
  * Listbox
  * Menu
  * Menubutton
  * Message
  * Radiobutton
  * Scale
  * Spinbox
  * TEntry
  * TLabel
  * TProgressbar
  * Text

func (*Window) Format P added in v0.5.18

func (w *Window) Format() string

Format -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)
  * TSpinbox (widget specific)

func (*Window) Frame P added in v0.2.0

func (w *Window) Frame(options ...Opt) *FrameWidget

Frame -- Create and manipulate 'frame' simple container widgets

The resulting Window is a child of 'w'

For details please see Frame

func (*Window) Handlepad P added in v0.5.18

func (w *Window) Handlepad() string

Handlepad -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Handlesize P added in v0.5.18

func (w *Window) Handlesize() string

Handlesize -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Height P added in v0.5.18

func (w *Window) Height() string

Height -- Get the configured option value.

Known uses:

  * Button (widget specific)
  * Canvas (widget specific)
  * Checkbutton (widget specific)
  * Frame (widget specific)
  * Label (widget specific)
  * Labelframe (widget specific)
  * Listbox (widget specific)
  * Menubutton (widget specific)
  * Panedwindow (widget specific)
  * Radiobutton (widget specific)
  * TCombobox (widget specific)
  * TFrame (widget specific)
  * TLabelframe (widget specific)
  * TNotebook (widget specific)
  * TPanedwindow (widget specific)
  * TTreeview (widget specific)
  * Text (widget specific)
  * Toplevel (widget specific)

func (*Window) Highlightbackground P added in v0.5.18

func (w *Window) Highlightbackground() string

Highlightbackground -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame
  * Label
  * Labelframe
  * Listbox
  * Menubutton
  * Message
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * Text
  * Toplevel

func (*Window) Highlightcolor P added in v0.5.18

func (w *Window) Highlightcolor() string

Highlightcolor -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame
  * Label
  * Labelframe
  * Listbox
  * Menubutton
  * Message
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * Text
  * Toplevel

func (*Window) Highlightthickness P added in v0.5.18

func (w *Window) Highlightthickness() string

Highlightthickness -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame
  * Label
  * Labelframe
  * Listbox
  * Menubutton
  * Message
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * Text
  * Toplevel

func (*Window) IconPhoto P added in v0.5.18

func (w *Window) IconPhoto(options ...Opt)

  * Description

IconPhoto -- change window icon

Description P

IconPhoto sets the titlebar icon for window based on the named photo
images. If -default is specified, this is applied to all future
created toplevels as well. The data in the images is taken as a
snapshot at the time of invocation. If the images are later changed,
this is not reflected to the titlebar icons. Multiple images are
accepted to allow different images sizes (e.g., 16x16 and 32x32) to
be provided. The window manager may scale provided icons to an
appropriate size.

On Windows, the images are packed into a Windows icon structure. This
will override an ico specified to wm iconbitmap, and vice versa. This
command sets the taskbar icon for the window.

On X, the images are arranged into the _NET_WM_ICON X property, which
most modern window managers support. A wm iconbitmap may exist
simultaneously. It is recommended to use not more than 2 icons,
placing the larger icon first. This command also sets the panel icon
for the application if the window manager or desktop environment
supports it.

On Macintosh, the first image called is loaded into an OSX-native
icon format, and becomes the application icon in dialogs, the Dock,
and other contexts. At the script level the command will accept only
the first image passed in the parameters as support for multiple
sizes/resolutions on macOS is outside Tk's scope. Developers should
use the largest icon they can support (preferably 512 pixels) to
ensure smooth rendering on the Mac.

More information might be available at the Tcl/Tk wm page.

func (*Window) Image P added in v0.5.18

func (w *Window) Image() string

Image -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menubutton
  * Radiobutton
  * TButton
  * TCheckbutton
  * TLabel
  * TMenubutton
  * TNotebook (widget specific)
  * TRadiobutton

func (*Window) Inactiveselectbackground P added in v0.5.18

func (w *Window) Inactiveselectbackground() string

Inactiveselectbackground -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Increment P added in v0.5.18

func (w *Window) Increment() string

Increment -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)
  * TSpinbox (widget specific)

func (*Window) Indicatoron P added in v0.5.18

func (w *Window) Indicatoron() string

Indicatoron -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * Menubutton (widget specific)
  * Radiobutton (widget specific)

func (*Window) Insertbackground P added in v0.5.18

func (w *Window) Insertbackground() string

Insertbackground -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Spinbox
  * Text

func (*Window) Insertborderwidth P added in v0.5.18

func (w *Window) Insertborderwidth() string

Insertborderwidth -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Spinbox
  * Text

func (*Window) Insertofftime P added in v0.5.18

func (w *Window) Insertofftime() string

Insertofftime -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Spinbox
  * Text

func (*Window) Insertontime P added in v0.5.18

func (w *Window) Insertontime() string

Insertontime -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Spinbox
  * Text

func (*Window) Insertunfocussed P added in v0.5.18

func (w *Window) Insertunfocussed() string

Insertunfocussed -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Insertwidth P added in v0.5.18

func (w *Window) Insertwidth() string

Insertwidth -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Spinbox
  * Text

func (*Window) Jump P added in v0.5.18

func (w *Window) Jump() string

Jump -- Get the configured option value.

Known uses:

  * Scrollbar

func (*Window) Justify P added in v0.5.18

func (w *Window) Justify() string

Justify -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Entry
  * Label
  * Listbox
  * Menubutton
  * Message (widget specific)
  * Radiobutton
  * Spinbox
  * TButton
  * TCombobox (widget specific)
  * TEntry (widget specific)
  * TLabel
  * TProgressbar

func (*Window) Label P added in v0.2.0

func (w *Window) Label(options ...Opt) *LabelWidget

Label -- Create and manipulate 'label' non-interactive text or image
widgets

The resulting Window is a child of 'w'

For details please see Label

func (*Window) Labelanchor P added in v0.5.18

func (w *Window) Labelanchor() string

Labelanchor -- Get the configured option value.

Known uses:

  * Labelframe (widget specific)
  * TLabelframe (widget specific)

func (*Window) Labelframe P added in v0.2.0

func (w *Window) Labelframe(options ...Opt) *LabelframeWidget

Labelframe -- Create and manipulate 'labelframe' labelled container
widgets

The resulting Window is a child of 'w'

For details please see Labelframe

func (*Window) Labelwidget P added in v0.5.18

func (w *Window) Labelwidget() string

Labelwidget -- Get the configured option value.

Known uses:

  * Labelframe (widget specific)
  * TLabelframe (widget specific)

func (*Window) Lbl P added in v0.5.18

func (w *Window) Lbl() string

Lbl -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Length P added in v0.5.18

func (w *Window) Length() string

Length -- Get the configured option value.

Known uses:

  * Scale (widget specific)
  * TProgressbar (widget specific)
  * TScale (widget specific)

func (*Window) Listbox P added in v0.2.0

func (w *Window) Listbox(options ...Opt) *ListboxWidget

Listbox -- Create and manipulate 'listbox' item list widgets

The resulting Window is a child of 'w'

For details please see Listbox

func (*Window) Listvariable P added in v0.5.18

func (w *Window) Listvariable() string

Listvariable -- Get the configured option value.

Known uses:

  * Listbox (widget specific)

func (*Window) Lower P added in v0.5.18

func (w *Window) Lower(belowThis Widget)

  * Description

Lower -- Change a window's position in the stacking order

Description P

If the belowThis argument is nil then the command lowers window so
that it is below all of its siblings in the stacking order (it will
be obscured by any siblings that overlap it and will not obscure any
siblings). If belowThis is specified then it must be the path name of
a window that is either a sibling of window or the descendant of a
sibling of window. In this case the lower command will insert window
into the stacking order just below belowThis (or the ancestor of
belowThis that is a sibling of window); this could end up either
raising or lowering window.

All toplevel windows may be restacked with respect to each other,
whatever their relative path names, but the window manager is not
obligated to strictly honor requests to restack.

Additional information might be available at the Tcl/Tk lower page.

func (*Window) Maximum P added in v0.5.18

func (w *Window) Maximum() string

Maximum -- Get the configured option value.

Known uses:

  * TProgressbar (widget specific)

func (*Window) Maxundo P added in v0.5.18

func (w *Window) Maxundo() string

Maxundo -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Menu P added in v0.2.0

func (w *Window) Menu(options ...Opt) *MenuWidget

Menu -- Create and manipulate 'menu' widgets and menubars

The resulting Window is a child of 'w'

For details please see Menu

func (*Window) Menubutton P added in v0.2.0

func (w *Window) Menubutton(options ...Opt) *MenubuttonWidget

Menubutton -- Create and manipulate 'menubutton' pop-up menu indicator
widgets

The resulting Window is a child of 'w'

For details please see Menubutton

func (*Window) Message P added in v0.2.0

func (w *Window) Message(options ...Opt) *MessageWidget

Message -- Create and manipulate 'message' non-interactive text
widgets

The resulting Window is a child of 'w'

For details please see Message

func (*Window) Mnu P added in v0.5.18

func (w *Window) Mnu() string

Mnu -- Get the configured option value.

Known uses:

  * Menubutton (widget specific)
  * TMenubutton (widget specific)
  * Toplevel (widget specific)

func (*Window) Mode P added in v0.5.18

func (w *Window) Mode() string

Mode -- Get the configured option value.

Known uses:

  * TProgressbar (widget specific)

func (*Window) Offrelief P added in v0.5.18

func (w *Window) Offrelief() string

Offrelief -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * Radiobutton (widget specific)

func (*Window) Offvalue P added in v0.5.18

func (w *Window) Offvalue() string

Offvalue -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * TCheckbutton (widget specific)

func (*Window) Onvalue P added in v0.5.18

func (w *Window) Onvalue() string

Onvalue -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * TCheckbutton (widget specific)

func (*Window) Opaqueresize P added in v0.5.18

func (w *Window) Opaqueresize() string

Opaqueresize -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) OptionMenu P added in v0.2.0

func (w *Window) OptionMenu(varName *VariableOpt, options ...any) (r *OptionMenuWidget)

tk_optionMenu -- Create an option menubutton and its menu

The resulting Widget is a child of 'w'

For details please see Button

func (*Window) Orient P added in v0.5.18

func (w *Window) Orient() string

Orient -- Get the configured option value.

Known uses:

  * Panedwindow
  * Scale
  * Scrollbar
  * TPanedwindow (widget specific)
  * TProgressbar (widget specific)
  * TScale (widget specific)
  * TScrollbar (widget specific)
  * TSeparator (widget specific)

func (*Window) Overrelief P added in v0.5.18

func (w *Window) Overrelief() string

Overrelief -- Get the configured option value.

Known uses:

  * Button (widget specific)
  * Checkbutton (widget specific)
  * Radiobutton (widget specific)

func (*Window) Padding P added in v0.5.18

func (w *Window) Padding() string

Padding -- Get the configured option value.

Known uses:

  * TFrame
  * TLabel
  * TLabelframe
  * TNotebook (widget specific)
  * TTreeview

func (*Window) Padx P added in v0.5.18

func (w *Window) Padx() string

Padx -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Frame
  * Label
  * Labelframe
  * Menubutton
  * Message
  * Radiobutton
  * Text
  * Toplevel

func (*Window) Pady P added in v0.5.18

func (w *Window) Pady() string

Pady -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Frame
  * Label
  * Labelframe
  * Menubutton
  * Message
  * Radiobutton
  * Text
  * Toplevel

func (*Window) Panedwindow P added in v0.2.0

func (w *Window) Panedwindow(options ...Opt) *PanedwindowWidget

Panedwindow -- Create and manipulate 'panedwindow' split container
widgets

The resulting Window is a child of 'w'

For details please see Panedwindow

func (*Window) Phase P added in v0.5.18

func (w *Window) Phase() string

Phase -- Get the configured option value.

Known uses:

  * TProgressbar (widget specific)

func (*Window) Placeholder P added in v0.5.18

func (w *Window) Placeholder() string

Placeholder -- Get the configured option value.

Known uses:

  * Entry
  * Spinbox
  * TCombobox
  * TEntry
  * TSpinbox

func (*Window) Placeholderforeground P added in v0.5.18

func (w *Window) Placeholderforeground() string

Placeholderforeground -- Get the configured option value.

Known uses:

  * Entry
  * Spinbox
  * TCombobox
  * TEntry
  * TSpinbox

func (*Window) Proxybackground P added in v0.5.18

func (w *Window) Proxybackground() string

Proxybackground -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Proxyborderwidth P added in v0.5.18

func (w *Window) Proxyborderwidth() string

Proxyborderwidth -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Proxyrelief P added in v0.5.18

func (w *Window) Proxyrelief() string

Proxyrelief -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Radiobutton P added in v0.2.0

func (w *Window) Radiobutton(options ...Opt) *RadiobuttonWidget

Radiobutton -- Create and manipulate 'radiobutton' pick-one widgets

The resulting Window is a child of 'w'

For details please see Radiobutton

func (*Window) Raise P added in v0.5.18

func (w *Window) Raise(aboveThis Widget)

  * Description

Raise -- Change a window's position in the stacking order

Description P

If the aboveThis argument is nil then the command raises window so
that it is above all of its siblings in the stacking order (it will
not be obscured by any siblings and will obscure any siblings that
overlap it). If aboveThis is specified then it must be the path name
of a window that is either a sibling of window or the descendant of a
sibling of window. In this case the raise command will insert window
into the stacking order just above aboveThis (or the ancestor of
aboveThis that is a sibling of window); this could end up either
raising or lowering window.

All toplevel windows may be restacked with respect to each other,
whatever their relative path names, but the window manager is not
obligated to strictly honor requests to restack.

On macOS raising an iconified toplevel window causes it to be
deiconified.

Additional information might be available at the Tcl/Tk raise page.

func (*Window) Readonlybackground P added in v0.5.18

func (w *Window) Readonlybackground() string

Readonlybackground -- Get the configured option value.

Known uses:

  * Entry (widget specific)
  * Spinbox (widget specific)

func (*Window) Relief P added in v0.5.18

func (w *Window) Relief() string

Relief -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame
  * Label
  * Labelframe
  * Listbox
  * Menu
  * Menubutton
  * Message
  * Panedwindow
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * TFrame (widget specific)
  * TLabel (widget specific)
  * Text
  * Toplevel

func (*Window) Repeatdelay P added in v0.5.18

func (w *Window) Repeatdelay() string

Repeatdelay -- Get the configured option value.

Known uses:

  * Button
  * Scale
  * Scrollbar
  * Spinbox

func (*Window) Repeatinterval P added in v0.5.18

func (w *Window) Repeatinterval() string

Repeatinterval -- Get the configured option value.

Known uses:

  * Button
  * Scale
  * Scrollbar
  * Spinbox

func (*Window) Resolution P added in v0.5.18

func (w *Window) Resolution() string

Resolution -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Sashcursor P added in v0.5.18

func (w *Window) Sashcursor() string

Sashcursor -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Sashpad P added in v0.5.18

func (w *Window) Sashpad() string

Sashpad -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Sashrelief P added in v0.5.18

func (w *Window) Sashrelief() string

Sashrelief -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Sashwidth P added in v0.5.18

func (w *Window) Sashwidth() string

Sashwidth -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Scale P added in v0.2.0

func (w *Window) Scale(options ...Opt) *ScaleWidget

Scale -- Create and manipulate 'scale' value-controlled slider widgets

The resulting Window is a child of 'w'

For details please see Scale

func (*Window) Screen P added in v0.5.18

func (w *Window) Screen() string

Screen -- Get the configured option value.

Known uses:

  * Toplevel (widget specific)

func (*Window) Scrollbar P added in v0.2.0

func (w *Window) Scrollbar(options ...Opt) *ScrollbarWidget

Scrollbar -- Create and manipulate 'scrollbar' scrolling control and
indicator widgets

The resulting Window is a child of 'w'

For details please see Scrollbar

func (*Window) Scrollregion P added in v0.5.18

func (w *Window) Scrollregion() string

Scrollregion -- Get the configured option value.

Known uses:

  * Canvas (widget specific)

func (*Window) Selectbackground P added in v0.5.18

func (w *Window) Selectbackground() string

Selectbackground -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Listbox
  * Spinbox
  * Text

func (*Window) Selectborderwidth P added in v0.5.18

func (w *Window) Selectborderwidth() string

Selectborderwidth -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Listbox
  * Spinbox
  * Text

func (*Window) Selectcolor P added in v0.5.18

func (w *Window) Selectcolor() string

Selectcolor -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * Menu (widget specific)
  * Radiobutton (widget specific)

func (*Window) Selectforeground P added in v0.5.18

func (w *Window) Selectforeground() string

Selectforeground -- Get the configured option value.

Known uses:

  * Canvas
  * Entry
  * Listbox
  * Spinbox
  * Text

func (*Window) Selectimage P added in v0.5.18

func (w *Window) Selectimage() string

Selectimage -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * Radiobutton (widget specific)

func (*Window) Selectmode P added in v0.5.18

func (w *Window) Selectmode() string

Selectmode -- Get the configured option value.

Known uses:

  * Listbox (widget specific)
  * TTreeview (widget specific)

func (*Window) Selecttype P added in v0.5.18

func (w *Window) Selecttype() string

Selecttype -- Get the configured option value.

Known uses:

  * TTreeview (widget specific)

func (*Window) SetResizable P added in v0.39.0

func (w *Window) SetResizable(width, height bool)

  * Description

SetResizable -- Enable/disable window resizing

Description P

This command controls whether or not the user may interactively
resize a top-level window. If resizing is disabled, then the window's
size will be the size from the most recent interactive resize or wm
geometry command. If there has been no such operation then the
window's natural size will be used.

More information might be available at the Tcl/Tk wm page.

func (*Window) Setgrid P added in v0.5.18

func (w *Window) Setgrid() string

Setgrid -- Get the configured option value.

Known uses:

  * Listbox
  * Text

func (*Window) Show P added in v0.5.18

func (w *Window) Show() string

Show -- Get the configured option value.

Known uses:

  * Entry (widget specific)
  * TEntry (widget specific)
  * TTreeview (widget specific)

func (*Window) Showhandle P added in v0.5.18

func (w *Window) Showhandle() string

Showhandle -- Get the configured option value.

Known uses:

  * Panedwindow (widget specific)

func (*Window) Showvalue P added in v0.5.18

func (w *Window) Showvalue() string

Showvalue -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Sliderlength P added in v0.5.18

func (w *Window) Sliderlength() string

Sliderlength -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Sliderrelief P added in v0.5.18

func (w *Window) Sliderrelief() string

Sliderrelief -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Spacing1 P added in v0.5.18

func (w *Window) Spacing1() string

Spacing1 -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Spacing2 P added in v0.5.18

func (w *Window) Spacing2() string

Spacing2 -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Spacing3 P added in v0.5.18

func (w *Window) Spacing3() string

Spacing3 -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Spinbox P added in v0.2.0

func (w *Window) Spinbox(options ...Opt) *SpinboxWidget

Spinbox -- Create and manipulate 'spinbox' value spinner widgets

The resulting Window is a child of 'w'

For details please see Spinbox

func (*Window) Startline P added in v0.5.18

func (w *Window) Startline() string

Startline -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) State P added in v0.5.18

func (w *Window) State() string

State -- Get the configured option value.

Known uses:

  * Button (widget specific)
  * Canvas (widget specific)
  * Checkbutton (widget specific)
  * Entry (widget specific)
  * Label (widget specific)
  * Listbox (widget specific)
  * Menubutton (widget specific)
  * Radiobutton (widget specific)
  * Scale (widget specific)
  * Spinbox (widget specific)
  * TButton
  * TCheckbutton
  * TCombobox (widget specific)
  * TEntry (widget specific)
  * TLabel
  * TMenubutton
  * TNotebook (widget specific)
  * TRadiobutton
  * TSpinbox
  * Text (widget specific)

func (*Window) Sticky P added in v0.5.18

func (w *Window) Sticky() string

Sticky -- Get the configured option value.

Known uses:

  * TNotebook (widget specific)

func (*Window) String P added in v0.5.18

func (w *Window) String() (r string)

String implements fmt.Stringer.

func (*Window) Striped P added in v0.5.18

func (w *Window) Striped() string

Striped -- Get the configured option value.

Known uses:

  * TTreeview (widget specific)

func (*Window) Style P added in v0.5.18

func (w *Window) Style() string

Style -- Get the configured option value.

Known uses:

  * TButton
  * TCheckbutton
  * TCombobox
  * TEntry
  * TFrame
  * TLabel
  * TLabelframe
  * TMenubutton
  * TNotebook
  * TPanedwindow
  * TProgressbar
  * TRadiobutton
  * TScale
  * TScrollbar
  * TSeparator
  * TSizegrip
  * TSpinbox
  * TTreeview

func (*Window) TButton P added in v0.2.0

func (w *Window) TButton(options ...Opt) *TButtonWidget

TButton -- Widget that issues a command when pressed

The resulting Window is a child of 'w'

For details please see TButton

func (*Window) TCheckbutton P added in v0.2.0

func (w *Window) TCheckbutton(options ...Opt) *TCheckbuttonWidget

TCheckbutton -- On/off widget

The resulting Window is a child of 'w'

For details please see TCheckbutton

func (*Window) TCombobox P added in v0.2.0

func (w *Window) TCombobox(options ...Opt) *TComboboxWidget

TCombobox -- Text field with popdown selection list

The resulting Window is a child of 'w'

For details please see TCombobox

func (*Window) TEntry P added in v0.2.0

func (w *Window) TEntry(options ...Opt) *TEntryWidget

TEntry -- Editable text field widget

The resulting Window is a child of 'w'

For details please see TEntry

func (*Window) TExit P added in v0.5.18

func (w *Window) TExit(options ...Opt) *TButtonWidget

TExit provides a canned TButton with default Txt "Exit", bound to the
ExitHandler.

The resulting Window is a child of 'w'

func (*Window) TFrame P added in v0.2.0

func (w *Window) TFrame(options ...Opt) *TFrameWidget

TFrame -- Simple container widget

The resulting Window is a child of 'w'

For details please see TFrame

func (*Window) TLabel P added in v0.2.0

func (w *Window) TLabel(options ...Opt) *TLabelWidget

TLabel -- Display a text string and/or image

The resulting Window is a child of 'w'

For details please see TLabel

func (*Window) TLabelframe P added in v0.2.0

func (w *Window) TLabelframe(options ...Opt) *TLabelframeWidget

TLabelframe -- Container widget with optional label

The resulting Window is a child of 'w'

For details please see TLabelframe

func (*Window) TMenubutton P added in v0.2.0

func (w *Window) TMenubutton(options ...Opt) *TMenubuttonWidget

TMenubutton -- Widget that pops down a menu when pressed

The resulting Window is a child of 'w'

For details please see TMenubutton

func (*Window) TNotebook P added in v0.2.0

func (w *Window) TNotebook(options ...Opt) *TNotebookWidget

TNotebook -- Multi-paned container widget

The resulting Window is a child of 'w'

For details please see TNotebook

func (*Window) TPanedwindow P added in v0.2.0

func (w *Window) TPanedwindow(options ...Opt) *TPanedwindowWidget

TPanedwindow -- Multi-pane container window

The resulting Window is a child of 'w'

For details please see TPanedwindow

func (*Window) TProgressbar P added in v0.2.0

func (w *Window) TProgressbar(options ...Opt) *TProgressbarWidget

TProgressbar -- Provide progress feedback

The resulting Window is a child of 'w'

For details please see TProgressbar

func (*Window) TRadiobutton P added in v0.2.0

func (w *Window) TRadiobutton(options ...Opt) *TRadiobuttonWidget

TRadiobutton -- Mutually exclusive option widget

The resulting Window is a child of 'w'

For details please see TRadiobutton

func (*Window) TScale P added in v0.2.0

func (w *Window) TScale(options ...Opt) *TScaleWidget

TScale -- Create and manipulate a scale widget

The resulting Window is a child of 'w'

For details please see TScale

func (*Window) TScrollbar P added in v0.2.0

func (w *Window) TScrollbar(options ...Opt) *TScrollbarWidget

TScrollbar -- Control the viewport of a scrollable widget

The resulting Window is a child of 'w'

For details please see TScrollbar

func (*Window) TSeparator P added in v0.2.0

func (w *Window) TSeparator(options ...Opt) *TSeparatorWidget

TSeparator -- Separator bar

The resulting Window is a child of 'w'

For details please see TSeparator

func (*Window) TSizegrip P added in v0.2.0

func (w *Window) TSizegrip(options ...Opt) *TSizegripWidget

TSizegrip -- Bottom-right corner resize widget

The resulting Window is a child of 'w'

For details please see TSizegrip

func (*Window) TSpinbox P added in v0.2.0

func (w *Window) TSpinbox(options ...Opt) *TSpinboxWidget

TSpinbox -- Selecting text field widget

The resulting Window is a child of 'w'

For details please see TSpinbox

func (*Window) TTreeview P added in v0.2.0

func (w *Window) TTreeview(options ...Opt) *TTreeviewWidget

TTreeview -- Hierarchical multicolumn data display widget

The resulting Window is a child of 'w'

For details please see TTreeview

func (*Window) Tabs P added in v0.5.18

func (w *Window) Tabs() string

Tabs -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Tabstyle P added in v0.5.18

func (w *Window) Tabstyle() string

Tabstyle -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Takefocus P added in v0.5.18

func (w *Window) Takefocus() string

Takefocus -- Get the configured option value.

Known uses:

  * Button
  * Canvas
  * Checkbutton
  * Entry
  * Frame
  * Label
  * Labelframe
  * Listbox
  * Menu
  * Menubutton
  * Message
  * Radiobutton
  * Scale
  * Scrollbar
  * Spinbox
  * TButton
  * TCheckbutton
  * TCombobox
  * TEntry
  * TFrame
  * TLabel
  * TLabelframe
  * TMenubutton
  * TNotebook
  * TPanedwindow
  * TProgressbar
  * TRadiobutton
  * TScale
  * TScrollbar
  * TSeparator
  * TSizegrip
  * TSpinbox
  * TTreeview
  * Text
  * Toplevel

func (*Window) Tearoff P added in v0.5.18

func (w *Window) Tearoff() string

Tearoff -- Get the configured option value.

Known uses:

  * Menu (widget specific)

func (*Window) Text P added in v0.2.0

func (w *Window) Text(options ...Opt) *TextWidget

Text -- Create and manipulate 'text' hypertext editing widgets

The resulting Window is a child of 'w'

For details please see Text

func (*Window) Textvariable P added in v0.5.18

func (w *Window) Textvariable() (r string)

Textvariable -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Entry
  * Label
  * Menubutton
  * Message
  * Radiobutton
  * Spinbox
  * TButton
  * TCheckbutton
  * TCombobox (widget specific)
  * TEntry (widget specific)
  * TLabel
  * TMenubutton
  * TRadiobutton

func (*Window) Tickinterval P added in v0.5.18

func (w *Window) Tickinterval() string

Tickinterval -- Get the configured option value.

Known uses:

  * Scale (widget specific)

func (*Window) Tile P added in v0.5.18

func (w *Window) Tile() string

Tile -- Get the configured option value.

Known uses:

  * Frame (widget specific)
  * Toplevel (widget specific)

func (*Window) Title P added in v0.5.18

func (w *Window) Title() string

Title -- Get the configured option value.

Known uses:

  * Menu (widget specific)

func (*Window) Titlecolumns P added in v0.5.18

func (w *Window) Titlecolumns() string

Titlecolumns -- Get the configured option value.

Known uses:

  * TTreeview (widget specific)

func (*Window) Titleitems P added in v0.5.18

func (w *Window) Titleitems() string

Titleitems -- Get the configured option value.

Known uses:

  * TTreeview (widget specific)

func (*Window) Toplevel P added in v0.2.0

func (w *Window) Toplevel(options ...Opt) *ToplevelWidget

Toplevel -- Create and manipulate 'toplevel' main and popup window
widgets

The resulting Window is a child of 'w'

For details please see Toplevel

func (*Window) Tristateimage P added in v0.5.18

func (w *Window) Tristateimage() string

Tristateimage -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * Radiobutton (widget specific)

func (*Window) Tristatevalue P added in v0.5.18

func (w *Window) Tristatevalue() string

Tristatevalue -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * Radiobutton (widget specific)

func (*Window) Troughcolor P added in v0.5.18

func (w *Window) Troughcolor() string

Troughcolor -- Get the configured option value.

Known uses:

  * Scale
  * Scrollbar

func (*Window) Txt P added in v0.5.18

func (w *Window) Txt() string

Txt -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Labelframe
  * Menubutton
  * Message
  * Radiobutton
  * TButton
  * TCheckbutton
  * TLabel
  * TLabelframe (widget specific)
  * TMenubutton
  * TNotebook (widget specific)
  * TProgressbar
  * TRadiobutton

func (*Window) Type P added in v0.5.18

func (w *Window) Type() string

Type -- Get the configured option value.

Known uses:

  * Menu (widget specific)

func (*Window) Underline P added in v0.5.18

func (w *Window) Underline() string

Underline -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menubutton
  * Radiobutton
  * TButton
  * TCheckbutton
  * TLabel
  * TLabelframe (widget specific)
  * TMenubutton
  * TNotebook (widget specific)
  * TRadiobutton

func (*Window) Undo P added in v0.5.18

func (w *Window) Undo() string

Undo -- Get the configured option value.

Known uses:

  * Text (widget specific)

func (*Window) Use P added in v0.5.18

func (w *Window) Use() string

Use -- Get the configured option value.

Known uses:

  * Toplevel (widget specific)

func (*Window) Validate P added in v0.5.18

func (w *Window) Validate() string

Validate -- Get the configured option value.

Known uses:

  * Entry (widget specific)
  * Spinbox (widget specific)
  * TEntry (widget specific)
  * TSpinbox

func (*Window) Value P added in v0.5.18

func (w *Window) Value() string

Value -- Get the configured option value.

Known uses:

  * Radiobutton (widget specific)
  * TProgressbar (widget specific)
  * TRadiobutton (widget specific)
  * TScale (widget specific)

func (*Window) Values P added in v0.5.18

func (w *Window) Values() string

Values -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)
  * TCombobox (widget specific)
  * TSpinbox (widget specific)

func (*Window) Variable P added in v0.5.18

func (w *Window) Variable() string

Variable -- Get the configured option value.

Known uses:

  * Checkbutton (widget specific)
  * Radiobutton (widget specific)
  * Scale (widget specific)
  * TCheckbutton (widget specific)
  * TProgressbar (widget specific)
  * TRadiobutton (widget specific)
  * TScale (widget specific)

func (*Window) Visual P added in v0.5.18

func (w *Window) Visual() string

Visual -- Get the configured option value.

Known uses:

  * Frame (widget specific)
  * Labelframe (widget specific)
  * Toplevel (widget specific)

func (*Window) Wait P added in v0.5.18

func (w *Window) Wait()

  * Description

Wait -- Wait for a window to be destroyed

Description P

Wait command waits for 'w' to be destroyed. This is typically used to
wait for a user to finish interacting with a dialog box before using
the result of that interaction.

While the Wwait command is waiting it processes events in the normal
fashion, so the application will continue to respond to user
interactions. If an event handler invokes Wait again, the nested call
to Wait must complete before the outer call can complete.

func (*Window) WaitVisibility P added in v0.5.18

func (w *Window) WaitVisibility()

  * Description

WaitVisibility -- Wait for a window to change visibility

Description P

WaitVisibility command waits for a change in w's visibility state (as
indicated by the arrival of a VisibilityNotify event). This form is
typically used to wait for a newly-created window to appear on the
screen before taking some action.

While the Wwait command is waiting it processes events in the normal
fashion, so the application will continue to respond to user
interactions. If an event handler invokes Wait again, the nested call
to Wait must complete before the outer call can complete.

func (*Window) Weight P added in v0.5.18

func (w *Window) Weight() string

Weight -- Get the configured option value.

Known uses:

  * TPanedwindow (widget specific)

func (*Window) WidgetState P added in v0.53.0

func (w *Window) WidgetState(stateSpec string) (r string)

  * Description
  * Widget States

ttk::widget -- Standard options and commands supported by Tk themed
widgets

Description P

Modify or inquire widget state. If stateSpec is not "", sets the
widget state: for each flag in stateSpec, sets the corresponding flag
or clears it if prefixed by an exclamation point. Returns a new state
spec indicating which flags were changed.

If stateSpec is "", returns a list of the currently-enabled state
flags.

Widget States P

The widget state is a bitmap of independent state flags. Widget state
flags include:

  * active: The mouse cursor is over the widget and pressing a mouse
    button will cause some action to occur. (aka "prelight" (Gnome),
    "hot" (Windows), "hover").
  * disabled: Widget is disabled under program control (aka
    "unavailable", "inactive").
  * focus: Widget has keyboard focus.
  * pressed: Widget is being pressed (aka "armed" in Motif).
  * selected: "On", "true", or "current" for things like checkbuttons
    and radiobuttons.
  * background: Windows and the Mac have a notion of an "active" or
    foreground window. The background state is set for widgets in a
    background window, and cleared for those in the foreground
    window.
  * readonly: Widget should not allow user modification.
  * alternate: A widget-specific alternate display format. For
    example, used for checkbuttons and radiobuttons in the "tristate"
    or "mixed" state, and for buttons with -default active.
  * invalid: The widget's value is invalid. (Potential uses: scale
    widget value out of bounds, entry widget value failed
    validation.)
  * hover: The mouse cursor is within the widget. This is similar to
    the active state; it is used in some themes for widgets that
    provide distinct visual feedback for the active widget in
    addition to the active element within the widget.
  * user1-user6 Freely usable for other purposes

A state specification or stateSpec is a list of state names,
optionally prefixed with an exclamation point (!) indicating that the
bit is off.

func (*Window) Width P added in v0.5.18

func (w *Window) Width() string

Width -- Get the configured option value.

Known uses:

  * Button (widget specific)
  * Canvas (widget specific)
  * Checkbutton (widget specific)
  * Entry (widget specific)
  * Frame (widget specific)
  * Label (widget specific)
  * Labelframe (widget specific)
  * Listbox (widget specific)
  * Menubutton (widget specific)
  * Message (widget specific)
  * Panedwindow (widget specific)
  * Radiobutton (widget specific)
  * Scale (widget specific)
  * Scrollbar (widget specific)
  * Spinbox (widget specific)
  * TButton
  * TCheckbutton
  * TCombobox (widget specific)
  * TEntry (widget specific)
  * TFrame (widget specific)
  * TLabel
  * TLabelframe (widget specific)
  * TMenubutton
  * TNotebook (widget specific)
  * TPanedwindow (widget specific)
  * TRadiobutton
  * Text (widget specific)
  * Toplevel (widget specific)

func (*Window) WmTitle P added in v0.5.18

func (w *Window) WmTitle(s string) string

  * Description

WmTitle -- change the window manager title

Description P

If string is specified, then it will be passed to the window manager
for use as the title for window (the window manager should display
this string in window's title bar). In this case the command returns
an empty string. If string is not specified then the command returns
the current title for the window. The title for a window defaults to
its name.

More information might be available at the Tcl/Tk wm page.

func (*Window) Wrap P added in v0.5.18

func (w *Window) Wrap() string

Wrap -- Get the configured option value.

Known uses:

  * Spinbox (widget specific)
  * TSpinbox (widget specific)
  * Text (widget specific)

func (*Window) Wraplength P added in v0.5.18

func (w *Window) Wraplength() string

Wraplength -- Get the configured option value.

Known uses:

  * Button
  * Checkbutton
  * Label
  * Menubutton
  * Radiobutton
  * TLabel
  * TLabel (widget specific)
  * TProgressbar

func (*Window) Xscrollincrement P added in v0.5.18

func (w *Window) Xscrollincrement() string

Xscrollincrement -- Get the configured option value.

Known uses:

  * Canvas (widget specific)

func (*Window) Yscrollincrement P added in v0.5.18

func (w *Window) Yscrollincrement() string

Yscrollincrement -- Get the configured option value.

Known uses:

  * Canvas (widget specific)

Notes P

Bugs P

  * TextWidget.Get currently supports only one range.

    Additional information might be available at the Tcl/Tk text
    page.

# Source Files P

View all Source files

  * const.go
  * dmesgoff.go
  * doc.go
  * etc.go
  * generated.go
  * mltoken.go
  * tex.go
  * themes.go
  * tk.go
  * tk_linux_amd64.go
  * tk_purego.go

# Directories P

Show internal Expand all

               Path                             Synopsis
_examples                          The same calculator as in calc.go
The same calculator as in calc.go  with additional handling of
with additional handling of        keyboard input.
keyboard input.
b5                                 The b5 package is a work in
The b5 package is a work in        progress with no stable API yet.
progress with no stable API yet.
# themes
azure                              Package azure provides the [Azure
Package azure provides the [Azure  Tk theme].
Tk theme].
azure/_examples
# vnc                              Package vnc provides tk9.0
Package vnc provides tk9.0         applications with a built-in VNC
applications with a built-in VNC   over websockets server.
over websockets server.
_examples

Click to show internal directories.
Click to hide internal directories.
Why Go Use Cases Case Studies
Get Started Playground Tour Stack Overflow Help
Packages Standard Library Sub-repositories About Go Packages
About Download Blog Issue Tracker Release Notes Brand Guidelines Code
of Conduct
Connect Twitter GitHub Slack r/golang Meetup Golang Weekly
Gopher in flight goggles

  * Copyright
  * Terms of Service
  * Privacy Policy
  * Report an Issue
  * System theme Dark theme Light theme
   
    Theme Toggle
   
  * #
   
    Shortcuts Modal
   
Google logo

Jump to

#
[                    ]
Close
Keyboard shortcuts

#

?      : This menu
/      : Search site
f or F : Jump to
y or Y : Canonical URL

Close
go.dev uses cookies from Google to deliver and enhance the quality of
its services and to analyze traffic. Learn more.
Okay