Documentation ¶
Overview ¶
Package tk9.0 is a CGo-free, cross platform GUI toolkit for Go. It is similar to Tkinter for Python.
Hello world ¶
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 ¶
Frequently Asked Questions ¶
Do I need to install the Tcl/Tk libraries on my system to use this package or programs that import it?
No. You still have to have a desktop environment installed on systems where that is not necessarily the case by default. That means some of the unix-like systems. Usually installing any desktop environment, like Gnome, Xfce etc. provides all the required library (.so) files. The minimum is the X Window System and this package was tested to work there, although with all the limitations one can expect in this case.
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.
What does CGo-free really mean?
cgo is a tool used by the Go build system when Go code uses the pseudo-import "C". For technical details please see the link. For us it is important that using CGo ends up invoking a C compiler during building of a Go program/package. The C compiler is used to determine exact, possibly locally dependent, values of C preprocessor constants and other defines, as well as the exact layout of C structs. This enables the Go compiler to correctly handle things like, schematically `C.someStruct.someField` appearing in Go code.
At runtime a Go program using CGo must switch stacks when calling into C. Additionally the runtime scheduler is made aware of such calls into C. The former is necessary, the later is not, but it is good to have as it improves performance and provides better resource management.
There is an evironment variable defined, `CGO_ENABLED`. When the Go build system compiles Go code, it checks for the value of this env var. If it is not set or its value is "1", then CGo is enabled and used when 'import "C"' is encountered. If the env var contains "0", CGo is disabled and programs using 'import "C"' will not compile.
After this longish intro we can finally get to the short answer: CGo-free means this package can be compiled with CGO_ENABLED=0. In other words, there's no 'import "C"' clause anywhere.
The consequences of being CGo-free follows from the above. The Go build system does not need to invoke a C compiler when compiling this package. Hence users doesn't have to have a C compiler installed in their machines.
There are advantages when a C compiler is not invoked during compilation/build of Go code. Programs can be installed on all targets supported by this package the easy way: '$ go install example.com/foo@latest' and programs for all supported targets can be cross-compiled on all Go-supported targets just by setting the respective env vars, like performing '$ GOOS=darwin GOARCH=arm64 go build' on a Windows/AMD64 machine, for example.
How does this package achieve being CGo-free?
The answer depends on the particular target in question. Targets supported by purego call into the Tcl/Tk C libraries without using CGo. See the source code at the link for how it is done.
On other targets CGo is avoided by transpiling all the C libraries and their transitive dependencies to Go.
In both cases the advantages are the same: CGo-free programs are go-installable and CGo-free programs can be cross-compiled without having a C compiler or a cross-C compiler tool chain installed.
Does being CGo-free remove the overhead of crossing the Go-C boundary?
For the purego targets, no. Only the C compiler is not involved anymore.
For other supported targets the boundary for calling Tcl/Tk C API from Go is gone. No free lunches though, the transpilled code has to care about additional things the C code does not need to - with the respective performance penalties, now just in different places.
Widget catalogue ¶
- ButtonWidget
- CanvasWidget
- EntryWidget
- FrameWidget
- CheckbuttonWidget
- LabelframeWidget
- LabelWidget
- ListboxWidget
- MenubuttonWidget
- MenuWidget
- MessageWidget
- OptionMenuWidget
- PanedwindowWidget
- RadiobuttonWidget
- ScaleWidget
- ScrollbarWidget
- SpinboxWidget
- TButtonWidget
- TComboboxWidget
- TEntryWidget
- TextWidget
- TFrameWidget
- TCheckbuttonWidget
- TLabelframeWidget
- TLabelWidget
- TMenubuttonWidget
- TNotebookWidget
- ToplevelWidget
- TPanedwindowWidget
- TProgressbarWidget
- TRadiobuttonWidget
- TScaleWidget
- TScrollbarWidget
- TSeparatorWidget
- TSizegripWidget
- TSpinboxWidget
- TTreeviewWidget
Debugging ¶
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=<nil> [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=wm title . debugging -> r= err=<nil> [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=. configure -padx 4m -pady 3m -> r= err=<nil> [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=tk::PlaceWindow . center -> r= err=<nil> [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=<nil> [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=<nil> [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=destroy . -> r= err=<nil> [tk_purego.go:225:eval tk_purego.go:225:eval tk.go:354:evalErr] [18876 debugging] code=tkwait window . -> r= err=<nil> [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 ¶
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 ¶
Builder results available at modern-c.appspot.com.
Runtime dependencies ¶
- Img.Graph and CanvasWidget.Graph require the gnuplot executable available in $PATH.
Completeness ¶
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 ¶
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 ¶
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 ¶
There is a VNC over wbesockets functionality available for X11 backed hosts. See the tk9.0/vnc package for details.
Package initialization ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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
---------------------------------------------------------------------------- © Copyright 2001-2024, Python Software Foundation, licensed under the Python Software Foundation License Version 2. ----------------------------------------------------------------------------
Sponsorship ¶
You can support the maintenance and further development of this package at jnml's LiberaPay (using PayPal).
"alt" theme style guide ¶
"Checkbutton.indicator" style element options:
- Background
- Bordercolor
- Foreground
- Indicatorcolor
- Indicatormargin
- Lightcolor
- [Shadecolor]
"Combobox.downarrow" style element options:
"Menubutton.indicator" style element options:
"Radiobutton.indicator" style element options:
- Background
- Bordercolor
- Foreground
- Indicatorcolor
- Indicatormargin
- Lightcolor
- [Shadecolor]
"Spinbox.downarrow" style element options:
"Spinbox.uparrow" style element options:
"Treeitem.indicator" style element options:
"arrow" style element options:
"border" style element options:
"downarrow" style element options:
"field" style element options:
- Bordercolor
- Fieldbackground
- Focuscolor
- [Focuswidth]
"leftarrow" style element options:
"rightarrow" style element options:
"slider" style element options:
- Background
- Bordercolor
- Borderwidth
- Orient
- Sliderrelief
- [Sliderthickness]
"thumb" style element options:
"uparrow" style element options:
"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 ¶
"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:
"GradientButton.button" style element options:
"HelpButton.button" 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:
"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:
"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:
"Searchbox.field" style element options:
"SidebarButton.button" style element options:
"Spinbox.downarrow" style element options:
"Spinbox.field" style element options:
"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:
"Vertical.Scrollbar.thumb" style element options:
"Vertical.Scrollbar.trough" style element options:
"Vertical.Scrollbar.uparrow" style element options:
"background" style element options:
"field" style element options:
"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 ¶
"Checkbutton.indicator" style element options:
- Indicatorbackground
- [Indicatorforeground]
- Indicatormargin
- [Lowerbordercolor]
- [Upperbordercolor]
"Combobox.field" style element options:
"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:
"client" style element options:
"downarrow" style element options:
- Arrowcolor
- Arrowsize
- Background
- Bordercolor
- Darkcolor
- Gripsize
- Lightcolor
- Orient
- Sliderlength
- Troughcolor
"field" style element options:
"hgrip" style element options:
"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:
"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:
"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 ¶
"Button.border" style element options:
"Checkbutton.indicator" style element options:
"Combobox.downarrow" style element options:
"Menubutton.indicator" style element options:
- Background
- [Indicatorborderwidth]
- [Indicatorheight]
- Indicatormargin
- Indicatorrelief
- [Indicatorwidth]
"Radiobutton.indicator" style element options:
"Spinbox.downarrow" style element options:
"Spinbox.uparrow" style element options:
"arrow" style element options:
"downarrow" style element options:
"highlight" style element options:
"hsash" style element options:
"leftarrow" style element options:
"rightarrow" style element options:
"slider" style element options:
- Background
- Orient
- [Sliderborderwidth]
- Sliderlength
- Sliderrelief
- [Sliderthickness]
"uparrow" style element options:
"vsash" style element options:
"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 ¶
"" style element options:
"Checkbutton.indicator" style element options:
- Bordercolor
- Indicatorbackground
- [Indicatorforeground]
- Indicatormargin
"Combobox.downarrow" style element options:
"Menubutton.indicator" style element options:
- Arrowcolor
- [Arrowpadding]
- Arrowsize
"Radiobutton.indicator" style element options:
- Bordercolor
- Indicatorbackground
- [Indicatorforeground]
- Indicatormargin
"Spinbox.downarrow" style element options:
"Spinbox.uparrow" style element options:
"Treeheading.cell" style element options:
- Background
- [Rownumber]
"Treeitem.indicator" style element options:
"Treeitem.row" style element options:
- Background
- [Rownumber]
"Treeitem.separator" style element options:
- Background
- [Rownumber]
"arrow" style element options:
"background" style element options:
"border" style element options:
"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:
"field" style element options:
- Borderwidth
- Fieldbackground
- Focuscolor
- [Focuswidth]
"fill" style element options:
"focus" style element options:
"hsash" style element options:
"hseparator" style element options:
"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:
"padding" style element options:
"pbar" style element options:
- Background
- [Barsize]
- Borderwidth
- Orient
- [Pbarrelief]
- [Thickness]
"rightarrow" style element options:
"separator" style element options:
"sizegrip" style element options:
"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:
"thumb" style element options:
"treearea" style element options:
"trough" style element options:
- Groovewidth
- Orient
- [Troughborderwidth]
- Troughcolor
- Troughrelief
"uparrow" style element options:
"vsash" style element options:
"vseparator" style element options:
"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 ¶
"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 ¶
"Button.border" style element options:
"Checkbutton.indicator" style element options:
"Combobox.focus" style element options:
"ComboboxPopdownFrame.border" style element options:
"Radiobutton.indicator" style element options:
"Scrollbar.trough" style element options:
"Spinbox.downarrow" style element options:
"Spinbox.uparrow" style element options:
"border" style element options:
"client" style element options:
"downarrow" style element options:
"field" style element options:
"focus" style element options:
"leftarrow" style element options:
"rightarrow" style element options:
"sizegrip" style element options:
"slider" style element options:
"tab" style element options:
"thumb" style element options:
"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 ¶
"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 ¶
- 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 WmDeiconify(w *Window)
- func WmGeometry(w *Window, geometry string) string
- func WmIconify(w *Window)
- 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)
- func WmWithdraw(w *Window)
- type ButtonWidget
- type CanvasWidget
- type CheckbuttonWidget
- type EntryWidget
- type Event
- type EventHandler
- type FileType
- type FontFace
- type FrameWidget
- type Img
- type LC
- type LabelWidget
- type LabelframeWidget
- type ListboxWidget
- type MenuItem
- type 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
- type 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
- type Opts
- type PanedwindowWidget
- type RadiobuttonWidget
- type ScaleWidget
- type ScrollbarWidget
- type SpinboxWidget
- type TButtonWidget
- type TCheckbuttonWidget
- type TComboboxWidget
- type TEntryWidget
- type TFrameWidget
- type TLabelWidget
- type TLabelframeWidget
- type TMenubuttonWidget
- type TNotebookWidget
- type TPanedwindowWidget
- type TProgressbarWidget
- type TRadiobuttonWidget
- type TScaleWidget
- type TScrollbarWidget
- type TSeparatorWidget
- type TSizegripWidget
- type TSpinboxWidget
- type 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 (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
- type ThemeContext
- type ThemeKey
- type Ticker
- type ToplevelWidget
- type VariableOpt
- type 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 ¶
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") LlAngle = cursor("ll_angle") LrAngle = cursor("lr_angle") Man = cursor("man") 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") 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.
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.
const ( Aliasarrow = cursor("aliasarrow") Bucket = cursor("bucket") Cancel = cursor("cancel") Closedhand = cursor("closedhand") 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.
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 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.
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.
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.
const ( SystemButtonFace = "systemButtonFace" SystemHighlight = "systemHighlight" SystemMenu = "systemMenu" )
Additional system colors available both on macOS and Windows.
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" )
const ( // Errors will panic with a stack trace. PanicOnError = iota // Errors will be recorded into the Error variable using errors.Join CollectErrors )
Error modes
const (
Wait = cursor("wait")
)
Additional macOS and Windows cursors.
Variables ¶
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") )
var App = &Window{}
App is the main/root application window.
var Error error
Error records errors when CollectErrors is true.
var ErrorMode int
ErrorMode selects the action taken on errors.
var NativeScaling float64
NativeScaling is the value returned by TKScaling in package initialization before it is possibly changed using the ScaleEnvVar value.
Functions ¶
func ActivateTheme ¶ added in v0.53.0
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 ¶ added in v0.4.8
func Bell(options ...Opt)
Bell — Ring a display's bell
Description ¶
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.
More information might be available at the Tcl/Tk bell page.
func Bind ¶ added in v0.4.10
func Bind(options ...any)
bind — Arrange for X events to invoke functions
Description ¶
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 ¶ added in v0.5.18
ChooseColor — pops up a dialog box for the user to select a color.
Description ¶
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 ¶ added in v0.5.18
ChooseDirectory — pops up a dialog box for the user to select a directory.
Description ¶
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 ¶ added in v0.5.18
ClipboardAppend — Manipulate Tk clipboard
Description ¶
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.
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 ¶ added in v0.5.18
func ClipboardClear(options ...Opt)
ClipboardClear — Manipulate Tk clipboard
Description ¶
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 ¶ added in v0.5.18
ClipboardGet — Manipulate Tk clipboard
Description ¶
Retrieve data from the clipboard on window's display. Window defaults to App.
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 ¶ added in v0.19.1
func CourierFont() string
CourierFont returns "{courier new}" on Windows and "courier" elsewhere.
func CurrentThemeName ¶ added in v0.53.0
func CurrentThemeName() (r string)
CurrentThemeName returns the name of the currently activated theme, if any.
func Destroy ¶ added in v0.4.8
func Destroy(options ...Opt)
Destroy — Destroy one or more windows
Description ¶
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 ¶ 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 ¶ added in v0.4.10
Focus — Manage the input focus
Description ¶
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 ¶
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 ¶ added in v0.34.0
font — Create and inspect fonts.
Description ¶
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 ¶ added in v0.5.18
FontFamilies — Create and inspect fonts.
Description ¶
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 ¶ added in v0.5.18
func Fontchooser(options ...Opt)
Fontchooser — control font selection dialog
Description ¶
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).
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.
Specifies/returns the title of the dialog. Has no effect on platforms where the font selection dialog does not support titles.
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.
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 ¶ added in v0.5.18
func FontchooserFont() []string
FontchooserFont — control font selection dialog
Description ¶
Returns the selected font description in the form
family size style...
Additional information might be available at the Tcl/Tk fontchooser page.
func FontchooserHide ¶ added in v0.5.18
func FontchooserHide()
FontchooserHide — control font selection dialog
Description ¶
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 ¶ added in v0.5.18
func FontchooserShow()
FontchooserShow — control font selection dialog
Description ¶
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 ¶ added in v0.5.18
GetOpenFile — pop up a dialog box for the user to select a file to open.
Description ¶
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.
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 ¶ added in v0.5.18
GetSaveFile — pop up a dialog box for the user to select a file to save.
Description ¶
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.
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 ¶ added in v0.5.18
Grid — Geometry manager that arranges widgets in a grid
Description ¶
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.
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 ¶ added in v0.33.0
Grid — Geometry manager that arranges widgets in a grid
Description ¶
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 ¶ added in v0.16.2
Grid — Geometry manager that arranges widgets in a grid
Description ¶
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 ¶ added in v0.16.2
Grid — Geometry manager that arranges widgets in a grid
Description ¶
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 ¶ 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 ¶ added in v0.5.18
tk_messageBox — pops up a message window and waits for user response.
Description ¶
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 ¶ added in v0.4.10
func Pack(options ...Opt)
Pack — Geometry manager that packs around edges of cavity
Description ¶
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 ¶ added in v0.4.10
func Place(options ...Opt)
Place — Geometry manager for fixed or rubber-sheet placement
Description ¶
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 ¶ added in v0.19.3
ttk::style — Manipulate style database
Description ¶
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 ¶ added in v0.19.5
ttk::style — Manipulate style database
Description ¶
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 ¶ added in v0.19.5
func StyleElementNames() []string
ttk::style — Manipulate style database
Description ¶
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 ¶ added in v0.19.5
ttk::style — Manipulate style database
Description ¶
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 ¶ added in v0.19.5
ttk::style — Manipulate style database
Description ¶
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 ¶ added in v0.26.1
ttk::style — Manipulate style database
Description ¶
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 ¶ added in v0.26.1
ttk::style — Manipulate style database
Description ¶
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 ¶
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 ¶ added in v0.17.1
func StyleThemeNames() []string
ttk::style — Manipulate style database
Description ¶
Returns a list of all known themes.
Additional information might be available at the Tcl/Tk style page.
func StyleThemeStyles ¶ added in v0.17.1
ttk::style — Manipulate style database
Description ¶
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 ¶ added in v0.17.1
ttk::style — Manipulate style database
Description ¶
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 TeX2 ¶ added in v0.31.0
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 ¶ added in v0.30.0
TeXImg renders is line TeX but returns an image.Image.
func TeXImg2 ¶ added in v0.31.0
TeXImg2 renders is line TeX2 but returns an image.Image.
func TkScaling ¶ added in v0.18.0
tk — Manipulate Tk internal state
Description ¶
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 ¶ added in v0.49.0
func TooltipClear(pattern string)
tooltip — Tooltip management
Description ¶
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 ¶ added in v0.49.0
tooltip — Tooltip management
Description ¶
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 ¶ added in v0.49.0
tooltip — Tooltip management
Description ¶
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 ¶ added in v0.49.0
tooltip — Tooltip management
Description ¶
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 ¶ added in v0.49.0
tooltip — Tooltip management
Description ¶
Disable all tooltips ¶
More information might be available at the Tklib tooltip page.
func TooltipOn ¶ added in v0.49.0
tooltip — Tooltip management
Description ¶
Enables tooltips for defined widgets.
More information might be available at the Tklib tooltip page.
func Update ¶ 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 ¶ added in v0.43.0
winfo — Return window-related information
Description ¶
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 ¶ added in v0.53.0
winfo — Return window-related information
Description ¶
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 ¶ added in v0.53.0
winfo — Return window-related information
Description ¶
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 ¶ added in v0.43.0
winfo — Return window-related information
Description ¶
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 WmDeiconify ¶ added in v0.54.0
func WmDeiconify(w *Window)
wm — Communicate with window manager
Description ¶
Arrange for window to be displayed in normal (non-iconified) form. This is done by mapping the window. If the window has never been mapped then this command will not map the window, but it will ensure that when the window is first mapped it will be displayed in de-iconified form. On Windows, a deiconified window will also be raised and be given the focus (made the active window). Returns an empty string.
More information might be available at the Tcl/Tk wm page.
func WmGeometry ¶ added in v0.53.0
wm — Communicate with window manager
Description ¶
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 WmIconify ¶ added in v0.54.0
func WmIconify(w *Window)
wm — Communicate with window manager
Description ¶
Arrange for window to be iconified. It window has not yet been mapped for the first time, this command will arrange for it to appear in the iconified state when it is eventually mapped.
More information might be available at the Tcl/Tk wm page.
func WmMaxSize ¶ added in v0.26.3
wm — Communicate with window manager
Description ¶
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 ¶ added in v0.53.0
wm — Communicate with window manager
Description ¶
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 ¶ added in v0.42.0
wm — Communicate with window manager
Description ¶
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 ¶ added in v0.26.3
wm — Communicate with window manager
Description ¶
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.
func WmWithdraw ¶ added in v0.54.0
func WmWithdraw(w *Window)
wm — Communicate with window manager
Description ¶
Arranges for window to be withdrawn from the screen. This causes the window to be unmapped and forgotten about by the window manager. If the window has never been mapped, then this command causes the window to be mapped in the withdrawn state. Not all window managers appear to know how to handle windows that are mapped in the withdrawn state. Note that it sometimes seems to be necessary to withdraw a window and then re-map it (e.g. with wm deiconify) to get some window managers to pay attention to changes in window attributes such as group.
More information might be available at the Tcl/Tk wm page.
Types ¶
type ButtonWidget ¶ added in v0.11.0
type ButtonWidget struct {
*Window
}
ButtonWidget represents the Tcl/Tk button widget/window
func Button ¶ added in v0.2.0
func Button(options ...Opt) *ButtonWidget
Button — Create and manipulate 'button' action widgets
Description ¶
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 ¶
- 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 ¶
Specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button window.
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.
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.
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.
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.
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 ¶ 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 ¶ added in v0.44.0
func (w *ButtonWidget) Invoke() string
button — Create and manipulate 'button' action widgets
Description ¶
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 ¶ added in v0.11.0
type CanvasWidget struct {
*Window
}
CanvasWidget represents the Tcl/Tk canvas widget/window
func Canvas ¶ added in v0.2.0
func Canvas(options ...Opt) *CanvasWidget
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 ¶
- Background
- Borderwidth
- Cursor
- Highlightbackground
- Highlightcolor
- Highlightthickness
- Insertbackground
- Insertborderwidth
- Insertofftime
- Insertontime
- Insertwidth
- Relief
- Selectbackground
- Selectborderwidth
- Selectforeground
- Takefocus
- Xscrollcommand
- Yscrollcommand
Widget specific options ¶
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.
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.
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.
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.
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.
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.
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.
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 ¶ 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 <device>' command.
type CheckbuttonWidget ¶ added in v0.11.0
type CheckbuttonWidget struct {
}CheckbuttonWidget represents the Tcl/Tk checkbutton widget/window
func Checkbutton ¶ added in v0.2.0
func Checkbutton(options ...Opt) *CheckbuttonWidget
Checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
Description ¶
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 ¶
- 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 ¶
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.
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.
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.
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.
Specifies value to store in the button's associated variable whenever this button is deselected. Defaults to
Specifies value to store in the button's associated variable whenever this button is selected. Defaults to
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.
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.
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.
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.
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.
Specifies the value that causes the checkbutton to display the multi-value selection, also known as the tri-state mode. Defaults to
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).
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 ¶ added in v0.32.0
func (w *CheckbuttonWidget) Deselect()
checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
Description ¶
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 ¶ added in v0.52.0
func (w *CheckbuttonWidget) Invoke() string
checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
Description ¶
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 ¶ added in v0.32.0
func (w *CheckbuttonWidget) Select()
checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
Description ¶
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 ¶ added in v0.11.0
type EntryWidget struct {
*Window
}
EntryWidget represents the Tcl/Tk entry widget/window
func Entry ¶ added in v0.2.0
func Entry(options ...Opt) *EntryWidget
Entry — Create and manipulate 'entry' one-line text entry widgets
Description ¶
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 ¶
- 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 ¶
Specifies the background color to use when the entry is disabled. If this option is the empty string, the normal background color is used.
Specifies the foreground color to use when the entry is disabled. If this option is the empty string, the normal foreground color is used.
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.
Specifies the background color to use when the entry is readonly. If this option is the empty string, the normal background color is used.
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.
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.
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.
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.
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 ¶ 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 ¶ added in v0.17.0
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 ¶ added in v0.46.0
func (e *Event) SetReturnCodeBreak()
SetReturnCodeBreak sets return code of 'e' to TCL_BREAK.
func (*Event) SetReturnCodeContinue ¶ added in v0.46.0
func (e *Event) SetReturnCodeContinue()
SetReturnCodeContinue sets return code of 'e' to TCL_CONTINUE.
func (*Event) SetReturnCodeError ¶ added in v0.46.0
func (e *Event) SetReturnCodeError()
SetReturnCodeError sets return code of 'e' to TCL_ERROR.
func (*Event) SetReturnCodeOK ¶ added in v0.46.0
func (e *Event) SetReturnCodeOK()
SetReturnCodeOK sets return code of 'e' to TCL_OK.
func (*Event) SetReturnCodeReturn ¶ added in v0.46.0
func (e *Event) SetReturnCodeReturn()
SetReturnCodeReturn sets return code of 'e' to TCL_RETURN.
type EventHandler ¶ added in v0.3.0
type EventHandler func(*Event)
EventHandler is the type used by call backs.
type FileType ¶ 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 ¶ added in v0.19.3
type FontFace struct {
// contains filtered or unexported fields
}
FontFace represents a Tk font.
func NewFont ¶ added in v0.5.18
NewFont — Create and inspect fonts.
Description ¶
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 ¶ added in v0.19.3
func (f *FontFace) Delete()
Delete — Manipulate fonts.
Description ¶
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.
type FrameWidget ¶ added in v0.11.0
type FrameWidget struct {
*Window
}
FrameWidget represents the Tcl/Tk frame widget/window
func Frame ¶ added in v0.2.0
func Frame(options ...Opt) *FrameWidget
Frame — Create and manipulate 'frame' simple container widgets
Description ¶
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 ¶
Widget specific options ¶
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.
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.
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.
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.
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.
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.
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.
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.
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 ¶ added in v0.4.10
type Img struct {
// contains filtered or unexported fields
}
Img represents a Tk image.
func NewBitmap ¶ added in v0.5.18
Bitmap — Images that display two colors
Description ¶
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 ¶ added in v0.5.18
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 ¶ added in v0.20.0
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 ¶ added in v0.31.0
func (m *Img) Delete()
image — Create and manipulate images
Description ¶
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 ¶ added in v0.9.1
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 <device>' command.
The content of 'm' is replaced, including its internal name.
func (*Img) Height ¶ added in v0.9.0
Height — Get the configured option value.
Additional information might be available at the Tcl/Tk photo page.
func (*Img) Width ¶ added in v0.9.0
Width — Get the configured option value.
Additional information might be available at the Tcl/Tk photo page.
type LC ¶ 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.
type LabelWidget ¶ added in v0.11.0
type LabelWidget struct {
*Window
}
LabelWidget represents the Tcl/Tk label widget/window
func Label ¶ added in v0.2.0
func Label(options ...Opt) *LabelWidget
Label — Create and manipulate 'label' non-interactive text or image widgets
Description ¶
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 ¶
- 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 ¶
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.
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.
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 ¶ added in v0.11.0
type LabelframeWidget struct {
*Window
}
LabelframeWidget represents the Tcl/Tk labelframe widget/window
func Labelframe ¶ added in v0.2.0
func Labelframe(options ...Opt) *LabelframeWidget
Labelframe — Create and manipulate 'labelframe' labelled container widgets
Description ¶
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 ¶
- Borderwidth
- Cursor
- Foreground
- Highlightbackground
- Highlightcolor
- Highlightthickness
- Padx
- Pady
- Relief
- Takefocus
- Txt
Widget specific options ¶
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.
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.
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.
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.
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.
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.
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.
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 ¶ added in v0.11.0
type ListboxWidget struct {
*Window
}
ListboxWidget represents the Tcl/Tk listbox widget/window
func Listbox ¶ added in v0.2.0
func Listbox(options ...Opt) *ListboxWidget
Listbox — Create and manipulate 'listbox' item list widgets
Description ¶
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 ¶
- Background
- Borderwidth
- Cursor
- Disabledforeground
- Exportselection
- Foreground
- Highlightbackground
- Highlightcolor
- Highlightthickness
- Justify
- Relief
- Selectbackground
- Selectborderwidth
- Selectforeground
- Setgrid
- Takefocus
- Xscrollcommand
- Yscrollcommand
Widget specific options ¶
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.
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.
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.
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.
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).
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 ¶ added in v0.47.0
type MenuItem struct {
// contains filtered or unexported fields
}
MenuItem represents an entry on a menu.
type MenuWidget ¶ added in v0.11.0
type MenuWidget struct {
*Window
}
MenuWidget represents the Tcl/Tk menu widget/window
func Menu ¶ added in v0.2.0
func Menu(options ...Opt) *MenuWidget
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 ¶
- Activebackground
- Activeborderwidth
- Activeforeground
- Activerelief
- Background
- Borderwidth
- Cursor
- Disabledforeground
- Foreground
- Relief
- Takefocus
Widget specific options ¶
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.
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.
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.
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.
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.
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 ¶ added in v0.15.0
func (w *MenuWidget) AddCascade(options ...Opt) *MenuItem
Menu — Create and manipulate 'menu' widgets and menubars
Description ¶
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 ¶ added in v0.41.0
func (w *MenuWidget) AddCheckbutton(options ...Opt) *MenuItem
Menu — Create and manipulate 'menu' widgets and menubars
Description ¶
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 ¶ added in v0.15.0
func (w *MenuWidget) AddCommand(options ...Opt) *MenuItem
Menu — Create and manipulate 'menu' widgets and menubars
Description ¶
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 ¶ added in v0.41.0
func (w *MenuWidget) AddRadiobutton(options ...Opt) *MenuItem
Menu — Create and manipulate 'menu' widgets and menubars
Description ¶
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 ¶ added in v0.15.0
func (w *MenuWidget) AddSeparator(options ...Opt) *MenuItem
Menu — Create and manipulate 'menu' widgets and menubars
Description ¶
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 ¶ added in v0.47.0
func (w *MenuWidget) EntryConfigure(index uint, options ...Opt)
Menu — Create and manipulate 'menu' widgets and menubars
Description ¶
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 ¶ added in v0.15.0
func (w *MenuWidget) Invoke(index uint)
Menu — Create and manipulate 'menu' widgets and menubars
Description ¶
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 ¶ added in v0.11.0
type MenubuttonWidget struct {
}MenubuttonWidget represents the Tcl/Tk menubutton widget/window
func Menubutton ¶ added in v0.2.0
func Menubutton(options ...Opt) *MenubuttonWidget
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 ¶
- 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 ¶
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.
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.
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.
Specifies the path name of the menu associated with this menubutton. The menu must be a child of the menubutton.
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.
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 ¶ added in v0.11.0
type MessageWidget struct {
*Window
}
MessageWidget represents the Tcl/Tk message widget/window
func Message ¶ added in v0.2.0
func Message(options ...Opt) *MessageWidget
Message — Create and manipulate 'message' non-interactive text widgets
Description ¶
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 ¶
- Anchor
- Background
- Borderwidth
- Cursor
- Foreground
- Highlightbackground
- Highlightcolor
- Highlightthickness
- Padx
- Pady
- Relief
- Takefocus
- Textvariable
- Txt
Widget specific options ¶
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.
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.
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 ¶ added in v0.2.0
type Opt interface {
// contains filtered or unexported methods
}
Opt represents an optional argument.
func Accelerator ¶ added in v0.4.10
Accelerator option.
Known uses:
- MenuWidget.AddCascade (command specific)
- MenuWidget.AddCommand (command specific)
- MenuWidget.AddSeparator (command specific)
func Activebackground ¶ added in v0.2.0
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 ¶ added in v0.2.0
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:
func Activeforeground ¶ added in v0.2.0
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 ¶ added in v0.2.0
Activerelief option.
Specifies the 3-D effect desired for the active item of the widget. See the -relief option for details.
Known uses:
func Align ¶ added in v0.4.10
Align option.
Known uses:
- Text (widget specific, applies to embedded images)
func Anchor ¶ added in v0.2.0
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 ¶ added in v0.25.1
Arrowcolor — Styling widgets
Arrowcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Arrowsize ¶ added in v0.25.1
Arrowsize — Styling widgets
Arrowsize is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Background ¶ added in v0.2.0
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 Backward ¶ added in v0.44.0
func Backward() Opt
Backward option.
Known uses:
- Text (widget specific, applies to Search)
func Bgstipple ¶ added in v0.4.10
Bgstipple option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Bitmap ¶ added in v0.2.0
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 Bordercolor ¶ added in v0.25.1
Bordercolor — Styling widgets
Bordercolor is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Borderwidth ¶ added in v0.2.0
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 ¶ added in v0.3.0
Buttonbackground option.
Known uses:
- Spinbox (widget specific)
func Buttondownrelief ¶ added in v0.3.0
Buttondownrelief option.
Known uses:
- Spinbox (widget specific)
func Chars ¶ added in v0.48.0
func Chars() Opt
Chars option.
Known uses:
- TextWidget (command specific)
func Children ¶ added in v0.4.10
Children option.
Known uses:
Children describes children of a style layout.
func Class ¶ added in v0.3.0
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 Colormap ¶ added in v0.3.0
Colormap option.
Known uses:
- Frame (widget specific)
- Labelframe (widget specific)
- Toplevel (widget specific)
func Columnbreak ¶ added in v0.4.10
Columnbreak option.
Known uses:
- MenuWidget.AddCascade (command specific)
- MenuWidget.AddCommand (command specific)
- MenuWidget.AddSeparator (command specific)
func Columnseparatorwidth ¶ added in v0.25.1
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 Command ¶ added in v0.3.0
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 ¶ added in v0.2.0
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 Confirmoverwrite ¶ added in v0.4.10
Confirmoverwrite option.
Known uses:
- GetSaveFile (command specific)
func Cursor ¶ added in v0.2.0
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 ¶ added in v0.25.1
Darkcolor — Styling widgets
Darkcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Default ¶ added in v0.3.0
Default option.
Known uses:
- Button (widget specific)
- MessageBox (command specific)
- TButton (widget specific)
func Defaultextension ¶ added in v0.4.10
Defaultextension option.
Known uses:
- GetOpenFile (command specific)
- GetSaveFile (command specific)
func Direction ¶ added in v0.3.0
Direction option.
Known uses:
- Menubutton (widget specific)
- TMenubutton (widget specific)
func Disabledforeground ¶ added in v0.2.0
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 ¶ added in v0.48.0
func Displaychars() Opt
Displaychars option.
Known uses:
- TextWidget (command specific)
func Displaycolumns ¶ added in v0.3.0
Displaycolumns option.
Known uses:
- TTreeview (widget specific)
func Displayindices ¶ added in v0.48.0
func Displayindices() Opt
Displayindices option.
Known uses:
- TextWidget (command specific)
func Displaylines ¶ added in v0.48.0
func Displaylines() Opt
Displaylines option.
Known uses:
- TextWidget (command specific)
func Displayof ¶ added in v0.4.8
Displayof option.
Known uses:
- Bell (command specific)
- ClipboardAppend (command specific)
- ClipboardClear (command specific)
- ClipboardGet (command specific)
- Focus (command specific)
- FontFamilies (command specific)
func Elementborderwidth ¶ added in v0.3.0
Elementborderwidth option.
Known uses:
- Scrollbar (widget specific)
func ExitHandler ¶ added in v0.5.18
func ExitHandler() Opt
func Exportselection ¶ added in v0.2.0
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:
func Fgstipple ¶ added in v0.4.10
Fgstipple option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Fieldbackground ¶ added in v0.25.1
Fieldbackground — Styling widgets
Fieldbackground is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Filetypes ¶ added in v0.4.10
Filetypes option.
Known uses:
- GetOpenFile (command specific)
- GetSaveFile (command specific)
func Focusfill ¶ added in v0.25.1
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 Font ¶ added in v0.2.0
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 Foreground ¶ added in v0.2.0
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 ¶ added in v0.3.0
Format option.
Known uses:
- ClipboardAppend (command specific)
- NewPhoto (command specific)
- Spinbox (widget specific)
- TSpinbox (widget specific)
func Forward ¶ added in v0.44.0
func Forward() Opt
Forward option.
Known uses:
- Text (widget specific, applies to Search)
func Gripsize ¶ added in v0.25.1
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 ¶ added in v0.25.1
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 Height ¶ added in v0.3.0
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 ¶ added in v0.4.10
Hidemargin option.
Known uses:
- MenuWidget.AddCascade (command specific)
- MenuWidget.AddCommand (command specific)
- MenuWidget.AddSeparator (command specific)
func Highlightbackground ¶ added in v0.2.0
Highlightbackground option.
Specifies the color to display in the traversal highlight region when the widget does not have the input focus.
Known uses:
func Highlightcolor ¶ added in v0.2.0
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:
func Highlightthickness ¶ added in v0.2.0
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:
func Id ¶ added in v0.4.10
Id option.
Known uses:
- TTreeviewWidget (command specific)
More information might be available at the Tcl/Tk treeview page.
func Image ¶ added in v0.2.0
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 Inactiveselectbackground ¶ added in v0.3.0
Inactiveselectbackground option.
Known uses:
- Text (widget specific)
func Indent ¶ added in v0.25.1
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 Indicatorbackground ¶ added in v0.25.1
Indicatorbackground — Styling widgets
Indicatorbackground is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Indicatorcolor ¶ added in v0.25.1
Indicatorcolor — Styling widgets
Indicatorcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Indicatormargin ¶ added in v0.25.1
Indicatormargin — Styling widgets
Indicatormargin is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Indicatormargins ¶ added in v0.25.1
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 ¶ added in v0.3.0
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 ¶ added in v0.25.1
Indicatorrelief — Styling widgets
Indicatorrelief is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Indicatorsize ¶ added in v0.25.1
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 ¶ added in v0.48.0
func Indices() Opt
Indices option.
Known uses:
- TextWidget (command specific)
func Initialcolor ¶ added in v0.4.10
Initialcolor option.
Known uses:
- ChooseColor (command specific)
func Initialdir ¶ added in v0.4.10
Initialdir option.
Known uses:
- ChooseDirectory (command specific)
- GetOpenFile (command specific)
- GetSaveFile (command specific)
func Initialfile ¶ added in v0.4.10
Initialfile option.
Known uses:
- GetOpenFile (command specific)
- GetSaveFile (command specific)
func Insertbackground ¶ added in v0.2.0
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:
func Insertborderwidth ¶ added in v0.2.0
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:
func Insertcolor ¶ added in v0.25.1
Insertcolor — Styling widgets
Insertcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Insertofftime ¶ added in v0.2.0
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:
func Insertontime ¶ added in v0.2.0
Insertontime option.
Specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain in each blink cycle.
Known uses:
func Insertwidth ¶ added in v0.2.0
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:
func Jump ¶ added in v0.2.0
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:
func Justify ¶ added in v0.2.0
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 ¶ added in v0.3.0
Labelanchor option.
Known uses:
- Labelframe (widget specific)
- TLabelframe (widget specific)
func Labelmargins ¶ added in v0.25.1
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 ¶ added in v0.25.1
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 ¶ added in v0.3.0
Labelwidget option.
Known uses:
- Labelframe (widget specific)
- TLabelframe (widget specific)
func Lbl ¶ added in v0.3.0
Lbl option.
Known uses:
- MenuWidget.AddCascade (command specific)
- MenuWidget.AddCommand (command specific)
- MenuWidget.AddSeparator (command specific)
- Scale (widget specific)
func Length ¶ added in v0.3.0
Length option.
Known uses:
- Scale (widget specific)
- TProgressbar (widget specific)
- TScale (widget specific)
func Lightcolor ¶ added in v0.25.1
Lightcolor — Styling widgets
Lightcolor is a styling option of one or more widgets. Please see Changing Widget Colors for details.
func Lines ¶ added in v0.48.0
func Lines() Opt
Lines option.
Known uses:
- TextWidget (command specific)
func Lmargin1 ¶ added in v0.4.10
Lmargin1 option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Lmargin2 ¶ added in v0.4.10
Lmargin2 option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Lmargincolor ¶ added in v0.4.10
Lmargincolor option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Maxphase ¶ added in v0.25.1
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 Mnu ¶ added in v0.3.0
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 Msg ¶ added in v0.4.10
Msg option.
Known uses:
- ChooseDirectory (command specific)
- MessageBox (command specific)
func Nocase ¶ added in v0.4.10
func Nocase() Opt
Nocase option.
Known uses:
- Text (widget specific, applies to Search)
func Offrelief ¶ added in v0.3.0
Offrelief option.
Known uses:
- Checkbutton (widget specific)
- Radiobutton (widget specific)
func Offset ¶ added in v0.4.10
Offset option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Offvalue ¶ added in v0.3.0
Offvalue option.
Known uses:
- Checkbutton (widget specific)
- MenuWidget.AddCascade (command specific)
- MenuWidget.AddCommand (command specific)
- MenuWidget.AddSeparator (command specific)
- TCheckbutton (widget specific)
func Onvalue ¶ added in v0.3.0
Onvalue option.
Known uses:
- Checkbutton (widget specific)
- MenuWidget.AddCascade (command specific)
- MenuWidget.AddCommand (command specific)
- MenuWidget.AddSeparator (command specific)
- TCheckbutton (widget specific)
func Open ¶ added in v0.53.0
Open option.
Known uses:
- TTreeviewWidget (command specific)
More information might be available at the Tcl/Tk treeview page.
func Orient ¶ added in v0.2.0
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 ¶ added in v0.3.0
Overrelief option.
Known uses:
- Button (widget specific)
- Checkbutton (widget specific)
- Radiobutton (widget specific)
func Overstrike ¶ added in v0.4.10
Overstrike option.
Known uses:
- NewFont (command specific)
- TextWidget.TagConfigure (command specific)
func Overstrikefg ¶ added in v0.4.10
Overstrikefg option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Padding ¶ added in v0.3.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 Parent ¶ added in v0.4.10
Parent option.
Known uses:
- ChooseColor (command specific)
- ChooseDirectory (command specific)
- Fontchooser (command specific)
- GetOpenFile (command specific)
- GetSaveFile (command specific)
- MessageBox (command specific)
func Period ¶ added in v0.25.1
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 Placeholder ¶ added in v0.2.0
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:
func Placeholderforeground ¶ added in v0.2.0
Placeholderforeground option.
Specifies the foreground color to use when the placeholder text is displayed. The default color is platform-specific.
Known uses:
func Postoffset ¶ added in v0.25.1
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 ¶ added in v0.3.0
Proxybackground option.
Known uses:
- Panedwindow (widget specific)
func Proxyborderwidth ¶ added in v0.3.0
Proxyborderwidth option.
Known uses:
- Panedwindow (widget specific)
func Regexp ¶ added in v0.4.10
func Regexp() Opt
Regexp option.
Known uses:
- Text (widget specific, applies to Search)
func Relief ¶ added in v0.2.0
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 Repeatdelay ¶ added in v0.2.0
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:
func Repeatinterval ¶ added in v0.2.0
Repeatinterval option.
Used in conjunction with -repeatdelay: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.
Known uses:
func Rmargin ¶ added in v0.4.10
Rmargin option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Rmargincolor ¶ added in v0.4.10
Rmargincolor option.
Known uses:
- TextWidget.TagConfigure (command specific)
func Rowheight ¶ added in v0.25.1
Rowheight — Styling widgets
Rowheight is a styling option of one or more widgets. Please see Changing Widget Colors for details.