tk

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: BSD-3-Clause Imports: 13 Imported by: 1

README

Note: This package is obsolete. Please use the modernc.org/tk9.0 package instead.

Documentation

Overview

Thsi package is obsolete. Please use the modernc.org/tk9.0 package instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountLibraryVFS

func MountLibraryVFS() (string, error)

MountLibraryVFS mounts the tk library virtual file system and returns the mount point.

Types

type Application added in v1.0.12

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

Application represents the Tk application. It also implements Widget and the Window() method returns the root window.

func App added in v1.0.12

func App() (r *Application, err error)

App returns the Application singleton or an error, if any.

func AppM added in v1.0.16

func AppM() *Application

AppM is like App but panics on errors.

func (*Application) Bitmap added in v1.0.15

func (a *Application) Bitmap(s string) (string, error)

Bitmap wraps the Tk image create bitmap command.

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.

Bitmaps support the following options:

-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 (*Application) BitmapM added in v1.0.16

func (a *Application) BitmapM(s string) string

BitmapM is like Bitmap but panics on errors.

func (*Application) Destroy added in v1.0.15

func (a *Application) Destroy(w ...Widget) error

Destroy deletes the widgets given by the w arguments, plus all of their descendants. If the root window from (*Application).Root is deleted then all widgets will be destroyed and the application will (normally) exit. The widgets are destroyed in order, and if an error occurs in destroying a widget the command aborts without destroying the remaining widgets. No error is returned if widget does not exist.

func (*Application) DestroyM added in v1.0.16

func (a *Application) DestroyM(w ...Widget) *Application

DestroyM is like Destroy but panics on errors.

func (*Application) Font added in v1.0.15

func (a *Application) Font(s string) (string, error)

Font wraps the Tk font command, providing several facilities for dealing with fonts, such as defining named fonts and inspecting the actual attributes of a font. The command arguments have several different forms, determined by the first argument. The following forms are currently supported:

actual font ?-displayof window? ?option? ?--? ?char?

Returns information about the actual attributes that are obtained when font is used on window's display; the actual attributes obtained may differ from the attributes requested due to platform-dependent limitations, such as the availability of font families and point sizes. font is a font description; see "Font Descriptions" below. If the window argument is omitted, it defaults to the main window. If option is specified, returns the value of that attribute; if it is omitted, the return value is a list of all the attributes and their values. See "Font Options" below for a list of the possible attributes. If the char argument is supplied, it must be a single character. The font attributes returned will be those of the specific font used to render that character, which will be different from the base font if the base font does not contain the given character. If char may be a hyphen, it should be preceded by -- to distinguish it from a misspelled option.

configure fontname ?option? ?value option value ...?

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/Mac OS X, 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.

create ?fontname? ?option value ...?

Creates a new named font and returns its name. fontname specifies the name for the font; if it is omitted, then Tk generates a new name of the form fontx, where x is an integer. There may be any number of option-value pairs, which provide the desired attributes for the new named font. See "Font Options" below for a list of the possible attributes.

delete fontname ?fontname ...?

Delete the specified named fonts. 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.

families ?-displayof window?

The return value is a list of the case-insensitive names of all font families that exist on window's display. If the window argument is omitted, it defaults to the main window.

measure font ?-displayof window? text

Measures the amount of space the string text would use in the given font when displayed in window. font is a font description; see "Font Descriptions" below. If the window argument is omitted, it defaults to the main window. The return value is the total width in pixels of text, not including the extra pixels used by highly exaggerated characters such as cursive “f”. If the string contains newlines or tabs, those characters are not expanded or treated specially when measuring the string.

metrics font ?-displayof window? ?option?

Returns information about the metrics (the font-specific data), for font when it is used on window's display. font is a font description; see "Font Descriptions" below. If the window argument is omitted, it defaults to the main window. If option is specified, returns the value of that metric; if it is omitted, the return value is a list of all the metrics and their values. See FONT METRICS below for a list of the possible metrics.

names

The return value is a list of all the named fonts that are currently defined.

Font Descriptions

The following formats are accepted as a font description anywhere font is specified as an argument above; these same forms are also permitted when specifying the -font option for widgets.

[1] fontname

The name of a named font, created using the font create command. When a widget uses a named font, it is guaranteed that this will never cause an error, as long as the named font exists, no matter what potentially invalid or meaningless set of attributes the named font has. If the named font cannot be displayed with exactly the specified attributes, some other close font will be substituted automatically.

[2] systemfont

The platform-specific name of a font, interpreted by the graphics server. This also includes, under X, an XLFD (see [4]) for which a single “*” character was used to elide more than one field in the middle of the name. See "Platform Specific Fonts" for a list of the system fonts.

[3] family ?size? ?style? ?style ...?

A properly formed list whose first element is the desired font family and whose optional second element is the desired size. The interpretation of the size attribute follows the same rules described for -size in FONT OPTIONS below. Any additional optional arguments following the size are font styles. Possible values for the style arguments are as follows:

normal
bold
roman
italic
underline
overstrike

.

[4] X-font names (XLFD)

A Unix-centric font name of the form -foundry-family-weight-slant-setwidth-addstyle-pixel-point-resx-resy-spacing-width-charset-encoding. The “*” character may be used to skip individual fields that the user does not care about. There must be exactly one “*” for each field skipped, except that a “*” at the end of the XLFD skips any remaining fields; the shortest valid XLFD is simply “*”, signifying all fields as defaults. Any fields that were skipped are given default values. For compatibility, an XLFD always chooses a font of the specified pixel size (not point size); although this interpretation is not strictly correct, all existing applications using XLFDs assumed that one “point” was in fact one pixel and would display incorrectly (generally larger) if the correct size font were actually used.

[5] option value ?option value ...?

A properly formed list of option-value pairs that specify the desired attributes of the font, in the same format used when defining a named font; see "Font Options" below.

When font description font is used, the system attempts to parse the description according to each of the above five rules, in the order specified. Cases [1] and [2] must match the name of an existing named font or of a system font. Cases [3], [4], and [5] are accepted on all platforms and the closest available font will be used. In some situations it may not be possible to find any close font (e.g., the font family was a garbage value); in that case, some system-dependent default font is chosen. If the font description does not match any of the above patterns, an error is generated.

Font Metrics

The following options are used by the font metrics command to query font-specific data determined when the font was created. These properties are for the whole font itself and not for individual characters drawn in that font. In the following definitions, the “baseline” of a font is the horizontal line where the bottom of most letters line up; certain letters, such as lower-case “g” stick below the baseline.

-ascent

The amount in pixels that the tallest letter sticks up above the baseline of the font, plus any extra blank space added by the designer of the font.

-descent

The largest amount in pixels that any letter sticks down below the baseline of the font, plus any extra blank space added by the designer of the font.

-linespace

Returns how far apart vertically in pixels two lines of text using the same font should be placed so that none of the characters in one line overlap any of the characters in the other line. This is generally the sum of the ascent above the baseline line plus the descent below the baseline.

-fixed

Returns a boolean flag that is “1” if this is a fixed-width font, where each normal character is the same width as all the other characters, or is “0” if this is a proportionally-spaced font, where individual characters have different widths. The widths of control characters, tab characters, and other non-printing characters are not included when calculating this value.;

Font Options

The following options are supported on all platforms, and are used when constructing a named font or when specifying a font using style [5] as above:

-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.

Standard Fonts

The following named fonts are supported on all systems, and default to values that match appropriate system defaults.

TkDefaultFont

This font is the default for all GUI items not otherwise specified.

TkTextFont

This font should be used for user text in entry widgets, listboxes etc.

TkFixedFont

This font is the standard fixed-width font.

TkMenuFont

This font is used for menu items.

TkHeadingFont

This font should be used for column headings in lists and tables.

TkCaptionFont

This font should be used for window and dialog caption bars.

TkSmallCaptionFont

This font should be used for captions on contained windows or tool dialogs.

TkIconFont

This font should be used for icon captions.

TkTooltipFont

This font should be used for tooltip windows (transient information windows).

It is not advised to change these fonts, as they may be modified by Tk itself in response to system changes. Instead, make a copy of the font and modify that.

Platform Specific Fonts

The following system fonts are supported:

X Windows: All valid X font names, including those listed by xlsfonts(1), are available.

MS Windows: The following fonts are supported, and are mapped to the user's style defaults.

system
ansi
device
systemfixed
ansifixed
oemfixed

Mac OS X: The following fonts are supported, and are mapped to the user's style defaults.

system
application
menu

Additionally, the following named fonts provide access to the Aqua theme fonts:

systemSystemFont
systemEmphasizedSystemFont
systemSmallSystemFont
systemSmallEmphasizedSystemFont
systemApplicationFont
systemLabelFont
systemViewsFont
systemMenuTitleFont
systemMenuItemFont
systemMenuItemMarkFont
systemMenuItemCmdKeyFont
systemWindowTitleFont
systemPushButtonFont
systemUtilityWindowTitleFont
systemAlertHeaderFont
systemToolbarFont
systemMiniSystemFont
systemDetailSystemFont
systemDetailEmphasizedSystemFont

func (*Application) FontM added in v1.0.16

func (a *Application) FontM(s string) string

FontM is like Font but panics on errors.

func (*Application) Main added in v1.0.12

func (a *Application) Main() error

Main repeatedly handles events. It returns only when there are no main windows left. Most windowing applications will call Main after initialization; the main execution of the application will consist entirely of callbacks.

Calling Main more than once panics.

func (*Application) MainM added in v1.0.16

func (a *Application) MainM()

MainM is like Main but panics on error.

func (*Application) Pack added in v1.0.16

func (a *Application) Pack(w ...Widget) error

Pack is equivalent to PackConfigure with no options.

func (*Application) PackM added in v1.0.16

func (a *Application) PackM(w ...Widget) *Application

PackM is like pack but panics on error.

func (*Application) SetStrictMotif added in v1.0.14

func (a *Application) SetStrictMotif(value bool) error

SetStrictMotif sets the tk_strictMotif variable. It is set to false by default. If an application sets it to true, then Tk attempts to adhere as closely as possible to Motif look-and-feel standards. For example, active elements such as buttons and scrollbar sliders will not change color when the pointer passes over them. Modern applications should not normally set this variable.

func (*Application) SetStrictMotifM added in v1.0.16

func (a *Application) SetStrictMotifM(value bool) *Application

SetStrictMotifM is like SetStrictMotif but panics on error.

func (*Application) StrictMotif added in v1.0.14

func (a *Application) StrictMotif() (bool, error)

StrictMotif returns the current value of the tk_strictMotif variable.

func (*Application) StrictMotifM added in v1.0.16

func (a *Application) StrictMotifM() bool

StrictMotifM is like StrictMotif but panics on error.

type Button added in v1.0.13

type Button struct {
	Window
}

Button represents the Tk button widget.

func (*Button) ActiveBackground added in v1.0.14

func (w *Button) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Button) ActiveBackgroundM added in v1.0.16

func (w *Button) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (*Button) ActiveForeground added in v1.0.14

func (w *Button) ActiveForeground() (string, error)

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*Button) ActiveForegroundM added in v1.0.16

func (w *Button) ActiveForegroundM() string

ActiveForegroundM is like ActiveForeground but panics on error.

func (*Button) Anchor added in v1.0.14

func (w *Button) Anchor() (string, error)

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*Button) AnchorM added in v1.0.16

func (w *Button) AnchorM() string

AnchorM is like Anchor but panics on error.

func (*Button) Background added in v1.0.14

func (w *Button) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Button) BackgroundM added in v1.0.16

func (w *Button) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Button) Bitmap added in v1.0.14

func (w *Button) Bitmap() (string, error)

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*Button) BitmapM added in v1.0.16

func (w *Button) BitmapM() string

BitmapM is like Bitmap but panics on error.

func (*Button) BorderWidth added in v1.0.14

func (w *Button) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Button) BorderWidthM added in v1.0.16

func (w *Button) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Button) Compound added in v1.0.14

func (w *Button) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*Button) CompoundM added in v1.0.16

func (w *Button) CompoundM() string

CompoundM is like Compound but panics on error.

func (*Button) Cursor added in v1.0.14

func (w *Button) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Button) CursorM added in v1.0.16

func (w *Button) CursorM() string

CursorM is like Cursor but panics on error.

func (*Button) Default added in v1.0.14

func (w *Button) Default() (string, error)

Default reports one of three states for the default ring: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. 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.

func (*Button) DefaultM added in v1.0.16

func (w *Button) DefaultM() string

DefaultM is like Default but panics on error.

func (*Button) DisabledForeground added in v1.0.14

func (w *Button) DisabledForeground() (string, error)

DisabledForeground reports 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.

func (*Button) DisabledForegroundM added in v1.0.16

func (w *Button) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (*Button) Font added in v1.0.14

func (w *Button) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Button) FontM added in v1.0.16

func (w *Button) FontM() string

FontM is like Font but panics on error.

func (*Button) Foreground added in v1.0.14

func (w *Button) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*Button) ForegroundM added in v1.0.16

func (w *Button) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*Button) Height added in v1.0.14

func (w *Button) Height() (string, error)

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*Button) HeightM added in v1.0.16

func (w *Button) HeightM() string

HeightM is like Height but panics on error.

func (*Button) HighlightBackground added in v1.0.14

func (w *Button) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Button) HighlightBackgroundM added in v1.0.16

func (w *Button) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Button) HighlightColor added in v1.0.14

func (w *Button) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Button) HighlightColorM added in v1.0.16

func (w *Button) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Button) HighlightThickness added in v1.0.14

func (w *Button) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Button) HighlightThicknessM added in v1.0.16

func (w *Button) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Button) Image added in v1.0.14

func (w *Button) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*Button) ImageM added in v1.0.16

func (w *Button) ImageM() string

ImageM is like Image but panics on error.

func (*Button) Justify added in v1.0.14

func (w *Button) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*Button) JustifyM added in v1.0.16

func (w *Button) JustifyM() string

JustifyM is like Justify but panics on error.

func (*Button) OverRelief added in v1.0.14

func (w *Button) OverRelief() (string, error)

OverRelief reports 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 \fB-relief flat -overrelief raised\fR. 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.

func (*Button) OverReliefM added in v1.0.16

func (w *Button) OverReliefM() string

OverReliefM is like OverRelief but panics on error.

func (*Button) PadX added in v1.0.14

func (w *Button) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Button) PadXM added in v1.0.16

func (w *Button) PadXM() string

PadXM is like PadX but panics on error.

func (*Button) PadY added in v1.0.14

func (w *Button) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Button) PadYM added in v1.0.16

func (w *Button) PadYM() string

PadYM is like PadY but panics on error.

func (*Button) Relief added in v1.0.14

func (w *Button) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Button) ReliefM added in v1.0.16

func (w *Button) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Button) RepeatDelay added in v1.0.14

func (w *Button) RepeatDelay() (string, error)

RepeatDelay reports 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.

func (*Button) RepeatDelayM added in v1.0.16

func (w *Button) RepeatDelayM() string

RepeatDelayM is like RepeatDelay but panics on error.

func (*Button) RepeatInterval added in v1.0.14

func (w *Button) RepeatInterval() (string, error)

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*Button) RepeatIntervalM added in v1.0.16

func (w *Button) RepeatIntervalM() string

RepeatIntervalM is like RepeatInterval but panics on error.

func (*Button) SetActiveBackground added in v1.0.14

func (w *Button) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Button) SetActiveBackgroundM added in v1.0.16

func (w *Button) SetActiveBackgroundM(value string) *Button

SetActiveBackgroundM is like ActiveBackground but panics on error

func (*Button) SetActiveForeground added in v1.0.14

func (w *Button) SetActiveForeground(value string) error

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*Button) SetActiveForegroundM added in v1.0.16

func (w *Button) SetActiveForegroundM(value string) *Button

SetActiveForegroundM is like ActiveForeground but panics on error

func (*Button) SetAnchor added in v1.0.14

func (w *Button) SetAnchor(value string) error

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*Button) SetAnchorM added in v1.0.16

func (w *Button) SetAnchorM(value string) *Button

SetAnchorM is like Anchor but panics on error

func (*Button) SetBackground added in v1.0.14

func (w *Button) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Button) SetBackgroundM added in v1.0.16

func (w *Button) SetBackgroundM(value string) *Button

SetBackgroundM is like Background but panics on error

func (*Button) SetBitmap added in v1.0.14

func (w *Button) SetBitmap(value string) error

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*Button) SetBitmapM added in v1.0.16

func (w *Button) SetBitmapM(value string) *Button

SetBitmapM is like Bitmap but panics on error

func (*Button) SetBorderWidth added in v1.0.14

func (w *Button) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Button) SetBorderWidthM added in v1.0.16

func (w *Button) SetBorderWidthM(value string) *Button

SetBorderWidthM is like BorderWidth but panics on error

func (*Button) SetCommand added in v1.0.14

func (w *Button) SetCommand(value Command) error

Command specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button window.

func (*Button) SetCommandM added in v1.0.16

func (w *Button) SetCommandM(value Command) *Button

SetCommandM is like Command but panics on error

func (*Button) SetCompound added in v1.0.14

func (w *Button) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*Button) SetCompoundM added in v1.0.16

func (w *Button) SetCompoundM(value string) *Button

SetCompoundM is like Compound but panics on error

func (*Button) SetCursor added in v1.0.14

func (w *Button) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Button) SetCursorM added in v1.0.16

func (w *Button) SetCursorM(value string) *Button

SetCursorM is like Cursor but panics on error

func (*Button) SetDefault added in v1.0.14

func (w *Button) SetDefault(value string) error

Default reports one of three states for the default ring: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. 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.

func (*Button) SetDefaultM added in v1.0.16

func (w *Button) SetDefaultM(value string) *Button

SetDefaultM is like Default but panics on error

func (*Button) SetDisabledForeground added in v1.0.14

func (w *Button) SetDisabledForeground(value string) error

DisabledForeground reports 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.

func (*Button) SetDisabledForegroundM added in v1.0.16

func (w *Button) SetDisabledForegroundM(value string) *Button

SetDisabledForegroundM is like DisabledForeground but panics on error

func (*Button) SetFont added in v1.0.14

func (w *Button) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Button) SetFontM added in v1.0.16

func (w *Button) SetFontM(value string) *Button

SetFontM is like Font but panics on error

func (*Button) SetForeground added in v1.0.14

func (w *Button) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*Button) SetForegroundM added in v1.0.16

func (w *Button) SetForegroundM(value string) *Button

SetForegroundM is like Foreground but panics on error

func (*Button) SetHeight added in v1.0.14

func (w *Button) SetHeight(value string) error

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*Button) SetHeightM added in v1.0.16

func (w *Button) SetHeightM(value string) *Button

SetHeightM is like Height but panics on error

func (*Button) SetHighlightBackground added in v1.0.14

func (w *Button) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Button) SetHighlightBackgroundM added in v1.0.16

func (w *Button) SetHighlightBackgroundM(value string) *Button

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Button) SetHighlightColor added in v1.0.14

func (w *Button) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Button) SetHighlightColorM added in v1.0.16

func (w *Button) SetHighlightColorM(value string) *Button

SetHighlightColorM is like HighlightColor but panics on error

func (*Button) SetHighlightThickness added in v1.0.14

func (w *Button) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Button) SetHighlightThicknessM added in v1.0.16

func (w *Button) SetHighlightThicknessM(value string) *Button

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Button) SetImage added in v1.0.14

func (w *Button) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*Button) SetImageM added in v1.0.16

func (w *Button) SetImageM(value string) *Button

SetImageM is like Image but panics on error

func (*Button) SetJustify added in v1.0.14

func (w *Button) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*Button) SetJustifyM added in v1.0.16

func (w *Button) SetJustifyM(value string) *Button

SetJustifyM is like Justify but panics on error

func (*Button) SetOverRelief added in v1.0.14

func (w *Button) SetOverRelief(value string) error

OverRelief reports 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 \fB-relief flat -overrelief raised\fR. 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.

func (*Button) SetOverReliefM added in v1.0.16

func (w *Button) SetOverReliefM(value string) *Button

SetOverReliefM is like OverRelief but panics on error

func (*Button) SetPadX added in v1.0.14

func (w *Button) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Button) SetPadXM added in v1.0.16

func (w *Button) SetPadXM(value string) *Button

SetPadXM is like PadX but panics on error

func (*Button) SetPadY added in v1.0.14

func (w *Button) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Button) SetPadYM added in v1.0.16

func (w *Button) SetPadYM(value string) *Button

SetPadYM is like PadY but panics on error

func (*Button) SetRelief added in v1.0.14

func (w *Button) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Button) SetReliefM added in v1.0.16

func (w *Button) SetReliefM(value string) *Button

SetReliefM is like Relief but panics on error

func (*Button) SetRepeatDelay added in v1.0.14

func (w *Button) SetRepeatDelay(value string) error

RepeatDelay reports 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.

func (*Button) SetRepeatDelayM added in v1.0.16

func (w *Button) SetRepeatDelayM(value string) *Button

SetRepeatDelayM is like RepeatDelay but panics on error

func (*Button) SetRepeatInterval added in v1.0.14

func (w *Button) SetRepeatInterval(value string) error

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*Button) SetRepeatIntervalM added in v1.0.16

func (w *Button) SetRepeatIntervalM(value string) *Button

SetRepeatIntervalM is like RepeatInterval but panics on error

func (*Button) SetState added in v1.0.14

func (w *Button) SetState(value string) error

State reports one of three states for the button: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the \fB-foreground\fR and \fB-background\fR options. The active state is typically used when the pointer is over the button. In active state the button is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR 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 \fB-disabledforeground\fR and \fB-background\fR options determine how the button is displayed.

func (*Button) SetStateM added in v1.0.16

func (w *Button) SetStateM(value string) *Button

SetStateM is like State but panics on error

func (*Button) SetTakeFocus added in v1.0.14

func (w *Button) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Button) SetTakeFocusM added in v1.0.16

func (w *Button) SetTakeFocusM(value string) *Button

SetTakeFocusM is like TakeFocus but panics on error

func (*Button) SetText added in v1.0.13

func (w *Button) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Button) SetTextM added in v1.0.16

func (w *Button) SetTextM(value string) *Button

SetTextM is like Text but panics on error

func (*Button) SetTextVariable added in v1.0.15

func (w *Button) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Button) SetTextVariableM added in v1.0.16

func (w *Button) SetTextVariableM(value string) *Button

SetTextVariableM is like TextVariable but panics on error

func (*Button) SetUnderline added in v1.0.14

func (w *Button) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*Button) SetUnderlineM added in v1.0.16

func (w *Button) SetUnderlineM(value string) *Button

SetUnderlineM is like Underline but panics on error

func (*Button) SetWidth added in v1.0.14

func (w *Button) SetWidth(value string) error

Width reports 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 \fBTk_GetPixels\fR). For a text button (no image or with \fB-compound none\fR) 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 (*Button) SetWidthM added in v1.0.16

func (w *Button) SetWidthM(value string) *Button

SetWidthM is like Width but panics on error

func (*Button) SetWrapLength added in v1.0.14

func (w *Button) SetWrapLength(value string) error

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*Button) SetWrapLengthM added in v1.0.16

func (w *Button) SetWrapLengthM(value string) *Button

SetWrapLengthM is like WrapLength but panics on error

func (*Button) State added in v1.0.14

func (w *Button) State() (string, error)

State reports one of three states for the button: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the \fB-foreground\fR and \fB-background\fR options. The active state is typically used when the pointer is over the button. In active state the button is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR 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 \fB-disabledforeground\fR and \fB-background\fR options determine how the button is displayed.

func (*Button) StateM added in v1.0.16

func (w *Button) StateM() string

StateM is like State but panics on error.

func (*Button) TakeFocus added in v1.0.14

func (w *Button) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Button) TakeFocusM added in v1.0.16

func (w *Button) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Button) Text added in v1.0.13

func (w *Button) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Button) TextM added in v1.0.16

func (w *Button) TextM() string

TextM is like Text but panics on error.

func (*Button) TextVariable added in v1.0.15

func (w *Button) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Button) TextVariableM added in v1.0.16

func (w *Button) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*Button) Underline added in v1.0.14

func (w *Button) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*Button) UnderlineM added in v1.0.16

func (w *Button) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*Button) Width added in v1.0.14

func (w *Button) Width() (string, error)

Width reports 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 \fBTk_GetPixels\fR). For a text button (no image or with \fB-compound none\fR) 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 (*Button) WidthM added in v1.0.16

func (w *Button) WidthM() string

WidthM is like Width but panics on error.

func (*Button) WrapLength added in v1.0.14

func (w *Button) WrapLength() (string, error)

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*Button) WrapLengthM added in v1.0.16

func (w *Button) WrapLengthM() string

WrapLengthM is like WrapLength but panics on error.

type Canvas added in v1.0.13

type Canvas struct {
	Window
}

Canvas represents the Tk canvas widget.

func (*Canvas) Background added in v1.0.14

func (w *Canvas) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Canvas) BackgroundM added in v1.0.16

func (w *Canvas) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Canvas) BorderWidth added in v1.0.14

func (w *Canvas) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Canvas) BorderWidthM added in v1.0.16

func (w *Canvas) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Canvas) CloseEnough added in v1.0.14

func (w *Canvas) CloseEnough() (float64, error)

CloseEnough reports a floating-point value indicating how close the mouse cursor must be to an item before it is considered to be TODO .QW(inside) the item. Defaults to 1.0.

func (*Canvas) CloseEnoughM added in v1.0.16

func (w *Canvas) CloseEnoughM() float64

CloseEnoughM is like CloseEnough but panics on error.

func (*Canvas) Confine added in v1.0.14

func (w *Canvas) Confine() (bool, error)

Confine reports a boolean value that indicates whether or not it should be allowable to set the canvas's view outside the region defined by the \fBscrollRegion\fR argument. Defaults to true, which means that the view will be constrained within the scroll region.

func (*Canvas) ConfineM added in v1.0.16

func (w *Canvas) ConfineM() bool

ConfineM is like Confine but panics on error.

func (*Canvas) Cursor added in v1.0.14

func (w *Canvas) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Canvas) CursorM added in v1.0.16

func (w *Canvas) CursorM() string

CursorM is like Cursor but panics on error.

func (*Canvas) Height added in v1.0.14

func (w *Canvas) Height() (string, error)

Height reports 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 \fBCOORDINATES\fR section below.

func (*Canvas) HeightM added in v1.0.16

func (w *Canvas) HeightM() string

HeightM is like Height but panics on error.

func (*Canvas) HighlightBackground added in v1.0.14

func (w *Canvas) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Canvas) HighlightBackgroundM added in v1.0.16

func (w *Canvas) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Canvas) HighlightColor added in v1.0.14

func (w *Canvas) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Canvas) HighlightColorM added in v1.0.16

func (w *Canvas) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Canvas) HighlightThickness added in v1.0.14

func (w *Canvas) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Canvas) HighlightThicknessM added in v1.0.16

func (w *Canvas) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Canvas) InsertBackground added in v1.0.14

func (w *Canvas) InsertBackground() (string, error)

InsertBackground reports 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).

func (*Canvas) InsertBackgroundM added in v1.0.16

func (w *Canvas) InsertBackgroundM() string

InsertBackgroundM is like InsertBackground but panics on error.

func (*Canvas) InsertBorderWidth added in v1.0.14

func (w *Canvas) InsertBorderWidth() (string, error)

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*Canvas) InsertBorderWidthM added in v1.0.16

func (w *Canvas) InsertBorderWidthM() string

InsertBorderWidthM is like InsertBorderWidth but panics on error.

func (*Canvas) InsertOffTime added in v1.0.14

func (w *Canvas) InsertOffTime() (int, error)

InsertOffTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*Canvas) InsertOffTimeM added in v1.0.16

func (w *Canvas) InsertOffTimeM() int

InsertOffTimeM is like InsertOffTime but panics on error.

func (*Canvas) InsertOnTime added in v1.0.14

func (w *Canvas) InsertOnTime() (int, error)

InsertOnTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*Canvas) InsertOnTimeM added in v1.0.16

func (w *Canvas) InsertOnTimeM() int

InsertOnTimeM is like InsertOnTime but panics on error.

func (*Canvas) InsertWidth added in v1.0.14

func (w *Canvas) InsertWidth() (string, error)

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*Canvas) InsertWidthM added in v1.0.16

func (w *Canvas) InsertWidthM() string

InsertWidthM is like InsertWidth but panics on error.

func (*Canvas) Relief added in v1.0.14

func (w *Canvas) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Canvas) ReliefM added in v1.0.16

func (w *Canvas) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Canvas) ScrollRegion added in v1.0.14

func (w *Canvas) ScrollRegion() (string, error)

ScrollRegion reports 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 \fBCOORDINATES\fR section below.

func (*Canvas) ScrollRegionM added in v1.0.16

func (w *Canvas) ScrollRegionM() string

ScrollRegionM is like ScrollRegion but panics on error.

func (*Canvas) SelectBackground added in v1.0.14

func (w *Canvas) SelectBackground() (string, error)

SelectBackground reports the background color to use when displaying selected items.

func (*Canvas) SelectBackgroundM added in v1.0.16

func (w *Canvas) SelectBackgroundM() string

SelectBackgroundM is like SelectBackground but panics on error.

func (*Canvas) SelectBorderWidth added in v1.0.17

func (w *Canvas) SelectBorderWidth() (string, error)

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Canvas) SelectBorderWidthM added in v1.0.17

func (w *Canvas) SelectBorderWidthM() string

SelectBorderWidthM is like SelectBorderWidth but panics on error.

func (*Canvas) SelectForeground added in v1.0.14

func (w *Canvas) SelectForeground() (string, error)

SelectForeground reports the foreground color to use when displaying selected items.

func (*Canvas) SelectForegroundM added in v1.0.16

func (w *Canvas) SelectForegroundM() string

SelectForegroundM is like SelectForeground but panics on error.

func (*Canvas) SetBackground added in v1.0.14

func (w *Canvas) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Canvas) SetBackgroundM added in v1.0.16

func (w *Canvas) SetBackgroundM(value string) *Canvas

SetBackgroundM is like Background but panics on error

func (*Canvas) SetBorderWidth added in v1.0.14

func (w *Canvas) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Canvas) SetBorderWidthM added in v1.0.16

func (w *Canvas) SetBorderWidthM(value string) *Canvas

SetBorderWidthM is like BorderWidth but panics on error

func (*Canvas) SetCloseEnough added in v1.0.14

func (w *Canvas) SetCloseEnough(value float64) error

CloseEnough specifies a floating-point value indicating how close the mouse cursor must be to an item before it is considered to be TODO .QW(inside) the item. Defaults to 1.0.

func (*Canvas) SetCloseEnoughM added in v1.0.16

func (w *Canvas) SetCloseEnoughM(value float64) *Canvas

CloseEnoughM is like CloseEnough but panics on error.

func (*Canvas) SetConfine added in v1.0.14

func (w *Canvas) SetConfine(value bool) error

Confine specifies a boolean value that indicates whether or not it should be allowable to set the canvas's view outside the region defined by the \fBscrollRegion\fR argument. Defaults to true, which means that the view will be constrained within the scroll region.

func (*Canvas) SetConfineM added in v1.0.16

func (w *Canvas) SetConfineM(value bool) *Canvas

ConfineM is like Confine but panics on error.

func (*Canvas) SetCursor added in v1.0.14

func (w *Canvas) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Canvas) SetCursorM added in v1.0.16

func (w *Canvas) SetCursorM(value string) *Canvas

SetCursorM is like Cursor but panics on error

func (*Canvas) SetHeight added in v1.0.14

func (w *Canvas) SetHeight(value string) error

Height reports 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 \fBCOORDINATES\fR section below.

func (*Canvas) SetHeightM added in v1.0.16

func (w *Canvas) SetHeightM(value string) *Canvas

SetHeightM is like Height but panics on error

func (*Canvas) SetHighlightBackground added in v1.0.14

func (w *Canvas) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Canvas) SetHighlightBackgroundM added in v1.0.16

func (w *Canvas) SetHighlightBackgroundM(value string) *Canvas

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Canvas) SetHighlightColor added in v1.0.14

func (w *Canvas) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Canvas) SetHighlightColorM added in v1.0.16

func (w *Canvas) SetHighlightColorM(value string) *Canvas

SetHighlightColorM is like HighlightColor but panics on error

func (*Canvas) SetHighlightThickness added in v1.0.14

func (w *Canvas) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Canvas) SetHighlightThicknessM added in v1.0.16

func (w *Canvas) SetHighlightThicknessM(value string) *Canvas

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Canvas) SetInsertBackground added in v1.0.14

func (w *Canvas) SetInsertBackground(value string) error

InsertBackground reports 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).

func (*Canvas) SetInsertBackgroundM added in v1.0.16

func (w *Canvas) SetInsertBackgroundM(value string) *Canvas

SetInsertBackgroundM is like InsertBackground but panics on error

func (*Canvas) SetInsertBorderWidth added in v1.0.14

func (w *Canvas) SetInsertBorderWidth(value string) error

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*Canvas) SetInsertBorderWidthM added in v1.0.16

func (w *Canvas) SetInsertBorderWidthM(value string) *Canvas

SetInsertBorderWidthM is like InsertBorderWidth but panics on error

func (*Canvas) SetInsertOffTime added in v1.0.14

func (w *Canvas) SetInsertOffTime(value int) error

InsertOffTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*Canvas) SetInsertOffTimeM added in v1.0.16

func (w *Canvas) SetInsertOffTimeM(value int) *Canvas

InsertOffTimeM is like InsertOffTime but panics on error.

func (*Canvas) SetInsertOnTime added in v1.0.14

func (w *Canvas) SetInsertOnTime(value int) error

InsertOnTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*Canvas) SetInsertOnTimeM added in v1.0.16

func (w *Canvas) SetInsertOnTimeM(value int) *Canvas

InsertOnTimeM is like InsertOnTime but panics on error.

func (*Canvas) SetInsertWidth added in v1.0.14

func (w *Canvas) SetInsertWidth(value string) error

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*Canvas) SetInsertWidthM added in v1.0.16

func (w *Canvas) SetInsertWidthM(value string) *Canvas

SetInsertWidthM is like InsertWidth but panics on error

func (*Canvas) SetRelief added in v1.0.14

func (w *Canvas) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Canvas) SetReliefM added in v1.0.16

func (w *Canvas) SetReliefM(value string) *Canvas

SetReliefM is like Relief but panics on error

func (*Canvas) SetScrollRegion added in v1.0.14

func (w *Canvas) SetScrollRegion(value string) error

ScrollRegion reports 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 \fBCOORDINATES\fR section below.

func (*Canvas) SetScrollRegionM added in v1.0.16

func (w *Canvas) SetScrollRegionM(value string) *Canvas

SetScrollRegionM is like ScrollRegion but panics on error

func (*Canvas) SetSelectBackground added in v1.0.14

func (w *Canvas) SetSelectBackground(value string) error

SelectBackground reports the background color to use when displaying selected items.

func (*Canvas) SetSelectBackgroundM added in v1.0.16

func (w *Canvas) SetSelectBackgroundM(value string) *Canvas

SetSelectBackgroundM is like SelectBackground but panics on error

func (*Canvas) SetSelectBorderWidth added in v1.0.17

func (w *Canvas) SetSelectBorderWidth(value string) error

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Canvas) SetSelectBorderWidthM added in v1.0.17

func (w *Canvas) SetSelectBorderWidthM(value string) *Canvas

SetSelectBorderWidthM is like SelectBorderWidth but panics on error

func (*Canvas) SetSelectForeground added in v1.0.14

func (w *Canvas) SetSelectForeground(value string) error

SelectForeground reports the foreground color to use when displaying selected items.

func (*Canvas) SetSelectForegroundM added in v1.0.16

func (w *Canvas) SetSelectForegroundM(value string) *Canvas

SetSelectForegroundM is like SelectForeground but panics on error

func (*Canvas) SetState added in v1.0.14

func (w *Canvas) SetState(value string) error

Modifies the default state of the canvas where \fIstate\fR may be set to one of: \fBnormal\fR, \fBdisabled\fR, or \fBhidden\fR. 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 \fBactive\fR control the appearance when the mouse pointer is over it, while the option starting with \fBdisabled\fR controls the appearance when the state is disabled. Canvas items which are \fBdisabled\fR will not react to canvas bindings.

func (*Canvas) SetStateM added in v1.0.16

func (w *Canvas) SetStateM(value string) *Canvas

SetStateM is like State but panics on error

func (*Canvas) SetTakeFocus added in v1.0.14

func (w *Canvas) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Canvas) SetTakeFocusM added in v1.0.16

func (w *Canvas) SetTakeFocusM(value string) *Canvas

SetTakeFocusM is like TakeFocus but panics on error

func (*Canvas) SetWidth added in v1.0.14

func (w *Canvas) SetWidth(value string) error

Width reports 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 \fBCOORDINATES\fR section below.

func (*Canvas) SetWidthM added in v1.0.16

func (w *Canvas) SetWidthM(value string) *Canvas

SetWidthM is like Width but panics on error

func (*Canvas) SetXScrollCommand added in v1.0.14

func (w *Canvas) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*Canvas) SetXScrollCommandM added in v1.0.16

func (w *Canvas) SetXScrollCommandM(value Command) *Canvas

SetXScrollCommandM is like XScrollCommand but panics on error

func (*Canvas) SetXScrollIncrement added in v1.0.14

func (w *Canvas) SetXScrollIncrement(value string) error

XScrollIncrement reports 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 \fBxScrollIncrement\fR; 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 \fBxScrollIncrement\fR. If the value of this option is less than or equal to zero, then horizontal scrolling is unconstrained.

func (*Canvas) SetXScrollIncrementM added in v1.0.16

func (w *Canvas) SetXScrollIncrementM(value string) *Canvas

SetXScrollIncrementM is like XScrollIncrement but panics on error

func (*Canvas) SetYScrollCommand added in v1.0.17

func (w *Canvas) SetYScrollCommand(value Command) error

YScrollCommand specifies the prefix for a command used to communicate with vertical scrollbars. This option is treated in the same way as the \fB-xscrollcommand\fR option, except that it is used for vertical scrollbars and is provided by widgets that support vertical scrolling. See the description of \fB-xscrollcommand\fR for details on how this option is used.

func (*Canvas) SetYScrollCommandM added in v1.0.17

func (w *Canvas) SetYScrollCommandM(value Command) *Canvas

SetYScrollCommandM is like YScrollCommand but panics on error

func (*Canvas) SetYScrollIncrement added in v1.0.14

func (w *Canvas) SetYScrollIncrement(value string) error

YScrollIncrement reports 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 \fByScrollIncrement\fR; 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 \fByScrollIncrement\fR. If the value of this option is less than or equal to zero, then vertical scrolling is unconstrained.

func (*Canvas) SetYScrollIncrementM added in v1.0.16

func (w *Canvas) SetYScrollIncrementM(value string) *Canvas

SetYScrollIncrementM is like YScrollIncrement but panics on error

func (*Canvas) State added in v1.0.14

func (w *Canvas) State() (string, error)

Modifies the default state of the canvas where \fIstate\fR may be set to one of: \fBnormal\fR, \fBdisabled\fR, or \fBhidden\fR. 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 \fBactive\fR control the appearance when the mouse pointer is over it, while the option starting with \fBdisabled\fR controls the appearance when the state is disabled. Canvas items which are \fBdisabled\fR will not react to canvas bindings.

func (*Canvas) StateM added in v1.0.16

func (w *Canvas) StateM() string

StateM is like State but panics on error.

func (*Canvas) TakeFocus added in v1.0.14

func (w *Canvas) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Canvas) TakeFocusM added in v1.0.16

func (w *Canvas) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Canvas) Width added in v1.0.14

func (w *Canvas) Width() (string, error)

Width reports 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 \fBCOORDINATES\fR section below.

func (*Canvas) WidthM added in v1.0.16

func (w *Canvas) WidthM() string

WidthM is like Width but panics on error.

func (*Canvas) XScrollIncrement added in v1.0.14

func (w *Canvas) XScrollIncrement() (string, error)

XScrollIncrement reports 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 \fBxScrollIncrement\fR; 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 \fBxScrollIncrement\fR. If the value of this option is less than or equal to zero, then horizontal scrolling is unconstrained.

func (*Canvas) XScrollIncrementM added in v1.0.16

func (w *Canvas) XScrollIncrementM() string

XScrollIncrementM is like XScrollIncrement but panics on error.

func (*Canvas) YScrollIncrement added in v1.0.14

func (w *Canvas) YScrollIncrement() (string, error)

YScrollIncrement reports 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 \fByScrollIncrement\fR; 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 \fByScrollIncrement\fR. If the value of this option is less than or equal to zero, then vertical scrolling is unconstrained.

func (*Canvas) YScrollIncrementM added in v1.0.16

func (w *Canvas) YScrollIncrementM() string

YScrollIncrementM is like YScrollIncrement but panics on error.

type CheckButton added in v1.0.14

type CheckButton struct {
	Window
}

CheckButton represents the Tk checkbutton widget.

func (*CheckButton) ActiveBackground added in v1.0.14

func (w *CheckButton) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*CheckButton) ActiveBackgroundM added in v1.0.16

func (w *CheckButton) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (*CheckButton) ActiveForeground added in v1.0.14

func (w *CheckButton) ActiveForeground() (string, error)

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*CheckButton) ActiveForegroundM added in v1.0.16

func (w *CheckButton) ActiveForegroundM() string

ActiveForegroundM is like ActiveForeground but panics on error.

func (*CheckButton) Anchor added in v1.0.14

func (w *CheckButton) Anchor() (string, error)

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*CheckButton) AnchorM added in v1.0.16

func (w *CheckButton) AnchorM() string

AnchorM is like Anchor but panics on error.

func (*CheckButton) Background added in v1.0.14

func (w *CheckButton) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*CheckButton) BackgroundM added in v1.0.16

func (w *CheckButton) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*CheckButton) Bitmap added in v1.0.14

func (w *CheckButton) Bitmap() (string, error)

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*CheckButton) BitmapM added in v1.0.16

func (w *CheckButton) BitmapM() string

BitmapM is like Bitmap but panics on error.

func (*CheckButton) BorderWidth added in v1.0.14

func (w *CheckButton) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*CheckButton) BorderWidthM added in v1.0.16

func (w *CheckButton) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*CheckButton) Compound added in v1.0.14

func (w *CheckButton) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*CheckButton) CompoundM added in v1.0.16

func (w *CheckButton) CompoundM() string

CompoundM is like Compound but panics on error.

func (*CheckButton) Cursor added in v1.0.14

func (w *CheckButton) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*CheckButton) CursorM added in v1.0.16

func (w *CheckButton) CursorM() string

CursorM is like Cursor but panics on error.

func (*CheckButton) DisabledForeground added in v1.0.14

func (w *CheckButton) DisabledForeground() (string, error)

DisabledForeground reports 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.

func (*CheckButton) DisabledForegroundM added in v1.0.16

func (w *CheckButton) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (*CheckButton) Font added in v1.0.14

func (w *CheckButton) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*CheckButton) FontM added in v1.0.16

func (w *CheckButton) FontM() string

FontM is like Font but panics on error.

func (*CheckButton) Foreground added in v1.0.14

func (w *CheckButton) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*CheckButton) ForegroundM added in v1.0.16

func (w *CheckButton) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*CheckButton) Height added in v1.0.14

func (w *CheckButton) Height() (string, error)

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*CheckButton) HeightM added in v1.0.16

func (w *CheckButton) HeightM() string

HeightM is like Height but panics on error.

func (*CheckButton) HighlightBackground added in v1.0.14

func (w *CheckButton) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*CheckButton) HighlightBackgroundM added in v1.0.16

func (w *CheckButton) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*CheckButton) HighlightColor added in v1.0.14

func (w *CheckButton) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*CheckButton) HighlightColorM added in v1.0.16

func (w *CheckButton) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*CheckButton) HighlightThickness added in v1.0.14

func (w *CheckButton) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*CheckButton) HighlightThicknessM added in v1.0.16

func (w *CheckButton) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*CheckButton) Image added in v1.0.14

func (w *CheckButton) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*CheckButton) ImageM added in v1.0.16

func (w *CheckButton) ImageM() string

ImageM is like Image but panics on error.

func (*CheckButton) Indicatoron added in v1.0.14

func (w *CheckButton) Indicatoron() (string, error)

Indicatoron reports whether or not the indicator should be drawn. Must be a proper boolean value. If false, the \fB-relief\fR option is ignored and the widget's relief is always sunken if the widget is selected and raised otherwise.

func (*CheckButton) IndicatoronM added in v1.0.16

func (w *CheckButton) IndicatoronM() string

IndicatoronM is like Indicatoron but panics on error.

func (*CheckButton) Justify added in v1.0.14

func (w *CheckButton) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*CheckButton) JustifyM added in v1.0.16

func (w *CheckButton) JustifyM() string

JustifyM is like Justify but panics on error.

func (*CheckButton) OffRelief added in v1.0.14

func (w *CheckButton) OffRelief() (string, error)

OffRelief reports the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is TODO .QW(raised .) By setting this option to TODO .QW(flat) and setting \fB-indicatoron\fR to false and \fB-overrelief\fR to TODO .QW(raised ,) 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.

func (*CheckButton) OffReliefM added in v1.0.16

func (w *CheckButton) OffReliefM() string

OffReliefM is like OffRelief but panics on error.

func (*CheckButton) OffValue added in v1.0.14

func (w *CheckButton) OffValue() (string, error)

OffValue reports value to store in the button's associated variable whenever this button is deselected. Defaults to TODO .QW(0 .)

func (*CheckButton) OffValueM added in v1.0.16

func (w *CheckButton) OffValueM() string

OffValueM is like OffValue but panics on error.

func (*CheckButton) OnValue added in v1.0.14

func (w *CheckButton) OnValue() (string, error)

OnValue reports value to store in the button's associated variable whenever this button is selected. Defaults to TODO .QW(1 .)

func (*CheckButton) OnValueM added in v1.0.16

func (w *CheckButton) OnValueM() string

OnValueM is like OnValue but panics on error.

func (*CheckButton) OverRelief added in v1.0.14

func (w *CheckButton) OverRelief() (string, error)

OverRelief reports 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 \fB-relief flat -overrelief raised\fR. 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.

func (*CheckButton) OverReliefM added in v1.0.16

func (w *CheckButton) OverReliefM() string

OverReliefM is like OverRelief but panics on error.

func (*CheckButton) PadX added in v1.0.14

func (w *CheckButton) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*CheckButton) PadXM added in v1.0.16

func (w *CheckButton) PadXM() string

PadXM is like PadX but panics on error.

func (*CheckButton) PadY added in v1.0.14

func (w *CheckButton) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*CheckButton) PadYM added in v1.0.16

func (w *CheckButton) PadYM() string

PadYM is like PadY but panics on error.

func (*CheckButton) Relief added in v1.0.14

func (w *CheckButton) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*CheckButton) ReliefM added in v1.0.16

func (w *CheckButton) ReliefM() string

ReliefM is like Relief but panics on error.

func (*CheckButton) SelectColor added in v1.0.14

func (w *CheckButton) SelectColor() (string, error)

SelectColor reports a background color to use when the button is selected. If \fBindicatorOn\fR is true then the color is used as the background for the indicator regardless of the select state. If \fBindicatorOn\fR is false, this color is used as the background for the entire widget, in place of \fBbackground\fR or \fBactiveBackground\fR, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected.

func (*CheckButton) SelectColorM added in v1.0.16

func (w *CheckButton) SelectColorM() string

SelectColorM is like SelectColor but panics on error.

func (*CheckButton) SelectImage added in v1.0.14

func (w *CheckButton) SelectImage() (string, error)

SelectImage reports an image to display (in place of the \fB-image\fR option) when the checkbutton is selected. This option is ignored unless the \fB-image\fR option has been specified.

func (*CheckButton) SelectImageM added in v1.0.16

func (w *CheckButton) SelectImageM() string

SelectImageM is like SelectImage but panics on error.

func (*CheckButton) SetActiveBackground added in v1.0.14

func (w *CheckButton) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*CheckButton) SetActiveBackgroundM added in v1.0.16

func (w *CheckButton) SetActiveBackgroundM(value string) *CheckButton

SetActiveBackgroundM is like ActiveBackground but panics on error

func (*CheckButton) SetActiveForeground added in v1.0.14

func (w *CheckButton) SetActiveForeground(value string) error

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*CheckButton) SetActiveForegroundM added in v1.0.16

func (w *CheckButton) SetActiveForegroundM(value string) *CheckButton

SetActiveForegroundM is like ActiveForeground but panics on error

func (*CheckButton) SetAnchor added in v1.0.14

func (w *CheckButton) SetAnchor(value string) error

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*CheckButton) SetAnchorM added in v1.0.16

func (w *CheckButton) SetAnchorM(value string) *CheckButton

SetAnchorM is like Anchor but panics on error

func (*CheckButton) SetBackground added in v1.0.14

func (w *CheckButton) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*CheckButton) SetBackgroundM added in v1.0.16

func (w *CheckButton) SetBackgroundM(value string) *CheckButton

SetBackgroundM is like Background but panics on error

func (*CheckButton) SetBitmap added in v1.0.14

func (w *CheckButton) SetBitmap(value string) error

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*CheckButton) SetBitmapM added in v1.0.16

func (w *CheckButton) SetBitmapM(value string) *CheckButton

SetBitmapM is like Bitmap but panics on error

func (*CheckButton) SetBorderWidth added in v1.0.14

func (w *CheckButton) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*CheckButton) SetBorderWidthM added in v1.0.16

func (w *CheckButton) SetBorderWidthM(value string) *CheckButton

SetBorderWidthM is like BorderWidth but panics on error

func (*CheckButton) SetCommand added in v1.0.14

func (w *CheckButton) SetCommand(value Command) error

Command specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button window. The button's global variable (\fB-variable\fR option) will be updated before the command is invoked.

func (*CheckButton) SetCommandM added in v1.0.16

func (w *CheckButton) SetCommandM(value Command) *CheckButton

SetCommandM is like Command but panics on error

func (*CheckButton) SetCompound added in v1.0.14

func (w *CheckButton) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*CheckButton) SetCompoundM added in v1.0.16

func (w *CheckButton) SetCompoundM(value string) *CheckButton

SetCompoundM is like Compound but panics on error

func (*CheckButton) SetCursor added in v1.0.14

func (w *CheckButton) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*CheckButton) SetCursorM added in v1.0.16

func (w *CheckButton) SetCursorM(value string) *CheckButton

SetCursorM is like Cursor but panics on error

func (*CheckButton) SetDisabledForeground added in v1.0.14

func (w *CheckButton) SetDisabledForeground(value string) error

DisabledForeground reports 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.

func (*CheckButton) SetDisabledForegroundM added in v1.0.16

func (w *CheckButton) SetDisabledForegroundM(value string) *CheckButton

SetDisabledForegroundM is like DisabledForeground but panics on error

func (*CheckButton) SetFont added in v1.0.14

func (w *CheckButton) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*CheckButton) SetFontM added in v1.0.16

func (w *CheckButton) SetFontM(value string) *CheckButton

SetFontM is like Font but panics on error

func (*CheckButton) SetForeground added in v1.0.14

func (w *CheckButton) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*CheckButton) SetForegroundM added in v1.0.16

func (w *CheckButton) SetForegroundM(value string) *CheckButton

SetForegroundM is like Foreground but panics on error

func (*CheckButton) SetHeight added in v1.0.14

func (w *CheckButton) SetHeight(value string) error

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*CheckButton) SetHeightM added in v1.0.16

func (w *CheckButton) SetHeightM(value string) *CheckButton

SetHeightM is like Height but panics on error

func (*CheckButton) SetHighlightBackground added in v1.0.14

func (w *CheckButton) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*CheckButton) SetHighlightBackgroundM added in v1.0.16

func (w *CheckButton) SetHighlightBackgroundM(value string) *CheckButton

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*CheckButton) SetHighlightColor added in v1.0.14

func (w *CheckButton) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*CheckButton) SetHighlightColorM added in v1.0.16

func (w *CheckButton) SetHighlightColorM(value string) *CheckButton

SetHighlightColorM is like HighlightColor but panics on error

func (*CheckButton) SetHighlightThickness added in v1.0.14

func (w *CheckButton) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*CheckButton) SetHighlightThicknessM added in v1.0.16

func (w *CheckButton) SetHighlightThicknessM(value string) *CheckButton

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*CheckButton) SetImage added in v1.0.14

func (w *CheckButton) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*CheckButton) SetImageM added in v1.0.16

func (w *CheckButton) SetImageM(value string) *CheckButton

SetImageM is like Image but panics on error

func (*CheckButton) SetIndicatoron added in v1.0.14

func (w *CheckButton) SetIndicatoron(value string) error

Indicatoron reports whether or not the indicator should be drawn. Must be a proper boolean value. If false, the \fB-relief\fR option is ignored and the widget's relief is always sunken if the widget is selected and raised otherwise.

func (*CheckButton) SetIndicatoronM added in v1.0.16

func (w *CheckButton) SetIndicatoronM(value string) *CheckButton

SetIndicatoronM is like Indicatoron but panics on error

func (*CheckButton) SetJustify added in v1.0.14

func (w *CheckButton) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*CheckButton) SetJustifyM added in v1.0.16

func (w *CheckButton) SetJustifyM(value string) *CheckButton

SetJustifyM is like Justify but panics on error

func (*CheckButton) SetOffRelief added in v1.0.14

func (w *CheckButton) SetOffRelief(value string) error

OffRelief reports the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is TODO .QW(raised .) By setting this option to TODO .QW(flat) and setting \fB-indicatoron\fR to false and \fB-overrelief\fR to TODO .QW(raised ,) 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.

func (*CheckButton) SetOffReliefM added in v1.0.16

func (w *CheckButton) SetOffReliefM(value string) *CheckButton

SetOffReliefM is like OffRelief but panics on error

func (*CheckButton) SetOffValue added in v1.0.14

func (w *CheckButton) SetOffValue(value string) error

OffValue reports value to store in the button's associated variable whenever this button is deselected. Defaults to TODO .QW(0 .)

func (*CheckButton) SetOffValueM added in v1.0.16

func (w *CheckButton) SetOffValueM(value string) *CheckButton

SetOffValueM is like OffValue but panics on error

func (*CheckButton) SetOnValue added in v1.0.14

func (w *CheckButton) SetOnValue(value string) error

OnValue reports value to store in the button's associated variable whenever this button is selected. Defaults to TODO .QW(1 .)

func (*CheckButton) SetOnValueM added in v1.0.16

func (w *CheckButton) SetOnValueM(value string) *CheckButton

SetOnValueM is like OnValue but panics on error

func (*CheckButton) SetOverRelief added in v1.0.14

func (w *CheckButton) SetOverRelief(value string) error

OverRelief reports 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 \fB-relief flat -overrelief raised\fR. 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.

func (*CheckButton) SetOverReliefM added in v1.0.16

func (w *CheckButton) SetOverReliefM(value string) *CheckButton

SetOverReliefM is like OverRelief but panics on error

func (*CheckButton) SetPadX added in v1.0.14

func (w *CheckButton) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*CheckButton) SetPadXM added in v1.0.16

func (w *CheckButton) SetPadXM(value string) *CheckButton

SetPadXM is like PadX but panics on error

func (*CheckButton) SetPadY added in v1.0.14

func (w *CheckButton) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*CheckButton) SetPadYM added in v1.0.16

func (w *CheckButton) SetPadYM(value string) *CheckButton

SetPadYM is like PadY but panics on error

func (*CheckButton) SetRelief added in v1.0.14

func (w *CheckButton) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*CheckButton) SetReliefM added in v1.0.16

func (w *CheckButton) SetReliefM(value string) *CheckButton

SetReliefM is like Relief but panics on error

func (*CheckButton) SetSelectColor added in v1.0.14

func (w *CheckButton) SetSelectColor(value string) error

SelectColor reports a background color to use when the button is selected. If \fBindicatorOn\fR is true then the color is used as the background for the indicator regardless of the select state. If \fBindicatorOn\fR is false, this color is used as the background for the entire widget, in place of \fBbackground\fR or \fBactiveBackground\fR, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected.

func (*CheckButton) SetSelectColorM added in v1.0.16

func (w *CheckButton) SetSelectColorM(value string) *CheckButton

SetSelectColorM is like SelectColor but panics on error

func (*CheckButton) SetSelectImage added in v1.0.14

func (w *CheckButton) SetSelectImage(value string) error

SelectImage reports an image to display (in place of the \fB-image\fR option) when the checkbutton is selected. This option is ignored unless the \fB-image\fR option has been specified.

func (*CheckButton) SetSelectImageM added in v1.0.16

func (w *CheckButton) SetSelectImageM(value string) *CheckButton

SetSelectImageM is like SelectImage but panics on error

func (*CheckButton) SetState added in v1.0.14

func (w *CheckButton) SetState(value string) error

State reports one of three states for the checkbutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the checkbutton is displayed using the \fB-foreground\fR and \fB-background\fR options. The active state is typically used when the pointer is over the checkbutton. In active state the checkbutton is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR 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 \fB-disabledforeground\fR and \fB-background\fR options determine how the checkbutton is displayed.

func (*CheckButton) SetStateM added in v1.0.16

func (w *CheckButton) SetStateM(value string) *CheckButton

SetStateM is like State but panics on error

func (*CheckButton) SetTakeFocus added in v1.0.14

func (w *CheckButton) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*CheckButton) SetTakeFocusM added in v1.0.16

func (w *CheckButton) SetTakeFocusM(value string) *CheckButton

SetTakeFocusM is like TakeFocus but panics on error

func (*CheckButton) SetText added in v1.0.14

func (w *CheckButton) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*CheckButton) SetTextM added in v1.0.16

func (w *CheckButton) SetTextM(value string) *CheckButton

SetTextM is like Text but panics on error

func (*CheckButton) SetTextVariable added in v1.0.15

func (w *CheckButton) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*CheckButton) SetTextVariableM added in v1.0.16

func (w *CheckButton) SetTextVariableM(value string) *CheckButton

SetTextVariableM is like TextVariable but panics on error

func (*CheckButton) SetTristateImage added in v1.0.14

func (w *CheckButton) SetTristateImage(value string) error

TristateImage reports an image to display (in place of the \fB-image\fR option) when the checkbutton is in tri-state mode. This option is ignored unless the \fB-image\fR option has been specified.

func (*CheckButton) SetTristateImageM added in v1.0.16

func (w *CheckButton) SetTristateImageM(value string) *CheckButton

SetTristateImageM is like TristateImage but panics on error

func (*CheckButton) SetTristateValue added in v1.0.14

func (w *CheckButton) SetTristateValue(value string) error

TristateValue reports the value that causes the checkbutton to display the multi-value selection, also known as the tri-state mode. Defaults to TODO .QW("" .)

func (*CheckButton) SetTristateValueM added in v1.0.16

func (w *CheckButton) SetTristateValueM(value string) *CheckButton

SetTristateValueM is like TristateValue but panics on error

func (*CheckButton) SetUnderline added in v1.0.14

func (w *CheckButton) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*CheckButton) SetUnderlineM added in v1.0.16

func (w *CheckButton) SetUnderlineM(value string) *CheckButton

SetUnderlineM is like Underline but panics on error

func (*CheckButton) SetVariable added in v1.0.15

func (w *CheckButton) SetVariable(value string) error

Variable reports 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).

func (*CheckButton) SetVariableM added in v1.0.16

func (w *CheckButton) SetVariableM(value string) *CheckButton

SetVariableM is like Variable but panics on error

func (*CheckButton) SetWidth added in v1.0.14

func (w *CheckButton) SetWidth(value string) error

Width reports 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 \fBTk_GetPixels\fR); 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 (*CheckButton) SetWidthM added in v1.0.16

func (w *CheckButton) SetWidthM(value string) *CheckButton

SetWidthM is like Width but panics on error

func (*CheckButton) SetWrapLength added in v1.0.14

func (w *CheckButton) SetWrapLength(value string) error

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*CheckButton) SetWrapLengthM added in v1.0.16

func (w *CheckButton) SetWrapLengthM(value string) *CheckButton

SetWrapLengthM is like WrapLength but panics on error

func (*CheckButton) State added in v1.0.14

func (w *CheckButton) State() (string, error)

State reports one of three states for the checkbutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the checkbutton is displayed using the \fB-foreground\fR and \fB-background\fR options. The active state is typically used when the pointer is over the checkbutton. In active state the checkbutton is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR 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 \fB-disabledforeground\fR and \fB-background\fR options determine how the checkbutton is displayed.

func (*CheckButton) StateM added in v1.0.16

func (w *CheckButton) StateM() string

StateM is like State but panics on error.

func (*CheckButton) TakeFocus added in v1.0.14

func (w *CheckButton) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*CheckButton) TakeFocusM added in v1.0.16

func (w *CheckButton) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*CheckButton) Text added in v1.0.14

func (w *CheckButton) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*CheckButton) TextM added in v1.0.16

func (w *CheckButton) TextM() string

TextM is like Text but panics on error.

func (*CheckButton) TextVariable added in v1.0.15

func (w *CheckButton) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*CheckButton) TextVariableM added in v1.0.16

func (w *CheckButton) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*CheckButton) TristateImage added in v1.0.14

func (w *CheckButton) TristateImage() (string, error)

TristateImage reports an image to display (in place of the \fB-image\fR option) when the checkbutton is in tri-state mode. This option is ignored unless the \fB-image\fR option has been specified.

func (*CheckButton) TristateImageM added in v1.0.16

func (w *CheckButton) TristateImageM() string

TristateImageM is like TristateImage but panics on error.

func (*CheckButton) TristateValue added in v1.0.14

func (w *CheckButton) TristateValue() (string, error)

TristateValue reports the value that causes the checkbutton to display the multi-value selection, also known as the tri-state mode. Defaults to TODO .QW("" .)

func (*CheckButton) TristateValueM added in v1.0.16

func (w *CheckButton) TristateValueM() string

TristateValueM is like TristateValue but panics on error.

func (*CheckButton) Underline added in v1.0.14

func (w *CheckButton) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*CheckButton) UnderlineM added in v1.0.16

func (w *CheckButton) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*CheckButton) Variable added in v1.0.15

func (w *CheckButton) Variable() (string, error)

Variable reports 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).

func (*CheckButton) VariableM added in v1.0.16

func (w *CheckButton) VariableM() string

VariableM is like Variable but panics on error.

func (*CheckButton) Width added in v1.0.14

func (w *CheckButton) Width() (string, error)

Width reports 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 \fBTk_GetPixels\fR); 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 (*CheckButton) WidthM added in v1.0.16

func (w *CheckButton) WidthM() string

WidthM is like Width but panics on error.

func (*CheckButton) WrapLength added in v1.0.14

func (w *CheckButton) WrapLength() (string, error)

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*CheckButton) WrapLengthM added in v1.0.16

func (w *CheckButton) WrapLengthM() string

WrapLengthM is like WrapLength but panics on error.

type Command added in v1.0.15

type Command func(w Widget, args []string) error

Command is a Go function used by the Command option of some widgets.

type Entry added in v1.0.13

type Entry struct {
	Window
}

Entry represents the Tk entry widget.

func (*Entry) Background added in v1.0.14

func (w *Entry) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Entry) BackgroundM added in v1.0.16

func (w *Entry) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Entry) BorderWidth added in v1.0.14

func (w *Entry) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Entry) BorderWidthM added in v1.0.16

func (w *Entry) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Entry) Cursor added in v1.0.14

func (w *Entry) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Entry) CursorM added in v1.0.16

func (w *Entry) CursorM() string

CursorM is like Cursor but panics on error.

func (*Entry) DisabledBackground added in v1.0.14

func (w *Entry) DisabledBackground() (string, error)

DisabledBackground reports the background color to use when the entry is disabled. If this option is the empty string, the normal background color is used.

func (*Entry) DisabledBackgroundM added in v1.0.16

func (w *Entry) DisabledBackgroundM() string

DisabledBackgroundM is like DisabledBackground but panics on error.

func (*Entry) DisabledForeground added in v1.0.14

func (w *Entry) DisabledForeground() (string, error)

DisabledForeground reports the foreground color to use when the entry is disabled. If this option is the empty string, the normal foreground color is used.

func (*Entry) DisabledForegroundM added in v1.0.16

func (w *Entry) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (*Entry) ExportSelection added in v1.0.14

func (w *Entry) ExportSelection() (bool, error)

ExportSelection reports whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*Entry) ExportSelectionM added in v1.0.16

func (w *Entry) ExportSelectionM() bool

ExportSelectionM is like ExportSelection but panics on error.

func (*Entry) Font added in v1.0.14

func (w *Entry) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Entry) FontM added in v1.0.16

func (w *Entry) FontM() string

FontM is like Font but panics on error.

func (*Entry) Foreground added in v1.0.14

func (w *Entry) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*Entry) ForegroundM added in v1.0.16

func (w *Entry) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*Entry) HighlightBackground added in v1.0.14

func (w *Entry) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Entry) HighlightBackgroundM added in v1.0.16

func (w *Entry) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Entry) HighlightColor added in v1.0.14

func (w *Entry) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Entry) HighlightColorM added in v1.0.16

func (w *Entry) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Entry) HighlightThickness added in v1.0.14

func (w *Entry) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Entry) HighlightThicknessM added in v1.0.16

func (w *Entry) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Entry) InsertBackground added in v1.0.14

func (w *Entry) InsertBackground() (string, error)

InsertBackground reports 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).

func (*Entry) InsertBackgroundM added in v1.0.16

func (w *Entry) InsertBackgroundM() string

InsertBackgroundM is like InsertBackground but panics on error.

func (*Entry) InsertBorderWidth added in v1.0.14

func (w *Entry) InsertBorderWidth() (string, error)

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*Entry) InsertBorderWidthM added in v1.0.16

func (w *Entry) InsertBorderWidthM() string

InsertBorderWidthM is like InsertBorderWidth but panics on error.

func (*Entry) InsertOffTime added in v1.0.14

func (w *Entry) InsertOffTime() (int, error)

InsertOffTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*Entry) InsertOffTimeM added in v1.0.16

func (w *Entry) InsertOffTimeM() int

InsertOffTimeM is like InsertOffTime but panics on error.

func (*Entry) InsertOnTime added in v1.0.14

func (w *Entry) InsertOnTime() (int, error)

InsertOnTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*Entry) InsertOnTimeM added in v1.0.16

func (w *Entry) InsertOnTimeM() int

InsertOnTimeM is like InsertOnTime but panics on error.

func (*Entry) InsertWidth added in v1.0.14

func (w *Entry) InsertWidth() (string, error)

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*Entry) InsertWidthM added in v1.0.16

func (w *Entry) InsertWidthM() string

InsertWidthM is like InsertWidth but panics on error.

func (*Entry) InvalidCommand added in v1.0.14

func (w *Entry) InvalidCommand() (string, error)

InvalidCommand reports a script to eval when \fB-validatecommand\fR returns 0. Setting it to {} disables this feature (the default). The best use of this option is to set it to \fIbell\fR. See \fBVALIDATION\fR below for more information.

func (*Entry) InvalidCommandM added in v1.0.16

func (w *Entry) InvalidCommandM() string

InvalidCommandM is like InvalidCommand but panics on error.

func (*Entry) Justify added in v1.0.14

func (w *Entry) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*Entry) JustifyM added in v1.0.16

func (w *Entry) JustifyM() string

JustifyM is like Justify but panics on error.

func (*Entry) ReadonlyBackground added in v1.0.14

func (w *Entry) ReadonlyBackground() (string, error)

ReadonlyBackground reports the background color to use when the entry is readonly. If this option is the empty string, the normal background color is used.

func (*Entry) ReadonlyBackgroundM added in v1.0.16

func (w *Entry) ReadonlyBackgroundM() string

ReadonlyBackgroundM is like ReadonlyBackground but panics on error.

func (*Entry) Relief added in v1.0.14

func (w *Entry) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Entry) ReliefM added in v1.0.16

func (w *Entry) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Entry) SelectBackground added in v1.0.14

func (w *Entry) SelectBackground() (string, error)

SelectBackground reports the background color to use when displaying selected items.

func (*Entry) SelectBackgroundM added in v1.0.16

func (w *Entry) SelectBackgroundM() string

SelectBackgroundM is like SelectBackground but panics on error.

func (*Entry) SelectBorderWidth added in v1.0.17

func (w *Entry) SelectBorderWidth() (string, error)

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Entry) SelectBorderWidthM added in v1.0.17

func (w *Entry) SelectBorderWidthM() string

SelectBorderWidthM is like SelectBorderWidth but panics on error.

func (*Entry) SelectForeground added in v1.0.14

func (w *Entry) SelectForeground() (string, error)

SelectForeground reports the foreground color to use when displaying selected items.

func (*Entry) SelectForegroundM added in v1.0.16

func (w *Entry) SelectForegroundM() string

SelectForegroundM is like SelectForeground but panics on error.

func (*Entry) SetBackground added in v1.0.14

func (w *Entry) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Entry) SetBackgroundM added in v1.0.16

func (w *Entry) SetBackgroundM(value string) *Entry

SetBackgroundM is like Background but panics on error

func (*Entry) SetBorderWidth added in v1.0.14

func (w *Entry) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Entry) SetBorderWidthM added in v1.0.16

func (w *Entry) SetBorderWidthM(value string) *Entry

SetBorderWidthM is like BorderWidth but panics on error

func (*Entry) SetCursor added in v1.0.14

func (w *Entry) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Entry) SetCursorM added in v1.0.16

func (w *Entry) SetCursorM(value string) *Entry

SetCursorM is like Cursor but panics on error

func (*Entry) SetDisabledBackground added in v1.0.14

func (w *Entry) SetDisabledBackground(value string) error

DisabledBackground reports the background color to use when the entry is disabled. If this option is the empty string, the normal background color is used.

func (*Entry) SetDisabledBackgroundM added in v1.0.16

func (w *Entry) SetDisabledBackgroundM(value string) *Entry

SetDisabledBackgroundM is like DisabledBackground but panics on error

func (*Entry) SetDisabledForeground added in v1.0.14

func (w *Entry) SetDisabledForeground(value string) error

DisabledForeground reports the foreground color to use when the entry is disabled. If this option is the empty string, the normal foreground color is used.

func (*Entry) SetDisabledForegroundM added in v1.0.16

func (w *Entry) SetDisabledForegroundM(value string) *Entry

SetDisabledForegroundM is like DisabledForeground but panics on error

func (*Entry) SetExportSelection added in v1.0.14

func (w *Entry) SetExportSelection(value bool) error

ExportSelection 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 \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*Entry) SetExportSelectionM added in v1.0.16

func (w *Entry) SetExportSelectionM(value bool) *Entry

ExportSelectionM is like ExportSelection but panics on error.

func (*Entry) SetFont added in v1.0.14

func (w *Entry) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Entry) SetFontM added in v1.0.16

func (w *Entry) SetFontM(value string) *Entry

SetFontM is like Font but panics on error

func (*Entry) SetForeground added in v1.0.14

func (w *Entry) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*Entry) SetForegroundM added in v1.0.16

func (w *Entry) SetForegroundM(value string) *Entry

SetForegroundM is like Foreground but panics on error

func (*Entry) SetHighlightBackground added in v1.0.14

func (w *Entry) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Entry) SetHighlightBackgroundM added in v1.0.16

func (w *Entry) SetHighlightBackgroundM(value string) *Entry

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Entry) SetHighlightColor added in v1.0.14

func (w *Entry) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Entry) SetHighlightColorM added in v1.0.16

func (w *Entry) SetHighlightColorM(value string) *Entry

SetHighlightColorM is like HighlightColor but panics on error

func (*Entry) SetHighlightThickness added in v1.0.14

func (w *Entry) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Entry) SetHighlightThicknessM added in v1.0.16

func (w *Entry) SetHighlightThicknessM(value string) *Entry

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Entry) SetInsertBackground added in v1.0.14

func (w *Entry) SetInsertBackground(value string) error

InsertBackground reports 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).

func (*Entry) SetInsertBackgroundM added in v1.0.16

func (w *Entry) SetInsertBackgroundM(value string) *Entry

SetInsertBackgroundM is like InsertBackground but panics on error

func (*Entry) SetInsertBorderWidth added in v1.0.14

func (w *Entry) SetInsertBorderWidth(value string) error

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*Entry) SetInsertBorderWidthM added in v1.0.16

func (w *Entry) SetInsertBorderWidthM(value string) *Entry

SetInsertBorderWidthM is like InsertBorderWidth but panics on error

func (*Entry) SetInsertOffTime added in v1.0.14

func (w *Entry) SetInsertOffTime(value int) error

InsertOffTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*Entry) SetInsertOffTimeM added in v1.0.16

func (w *Entry) SetInsertOffTimeM(value int) *Entry

InsertOffTimeM is like InsertOffTime but panics on error.

func (*Entry) SetInsertOnTime added in v1.0.14

func (w *Entry) SetInsertOnTime(value int) error

InsertOnTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*Entry) SetInsertOnTimeM added in v1.0.16

func (w *Entry) SetInsertOnTimeM(value int) *Entry

InsertOnTimeM is like InsertOnTime but panics on error.

func (*Entry) SetInsertWidth added in v1.0.14

func (w *Entry) SetInsertWidth(value string) error

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*Entry) SetInsertWidthM added in v1.0.16

func (w *Entry) SetInsertWidthM(value string) *Entry

SetInsertWidthM is like InsertWidth but panics on error

func (*Entry) SetInvalidCommand added in v1.0.14

func (w *Entry) SetInvalidCommand(value string) error

InvalidCommand reports a script to eval when \fB-validatecommand\fR returns 0. Setting it to {} disables this feature (the default). The best use of this option is to set it to \fIbell\fR. See \fBVALIDATION\fR below for more information.

func (*Entry) SetInvalidCommandM added in v1.0.16

func (w *Entry) SetInvalidCommandM(value string) *Entry

SetInvalidCommandM is like InvalidCommand but panics on error

func (*Entry) SetJustify added in v1.0.14

func (w *Entry) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*Entry) SetJustifyM added in v1.0.16

func (w *Entry) SetJustifyM(value string) *Entry

SetJustifyM is like Justify but panics on error

func (*Entry) SetReadonlyBackground added in v1.0.14

func (w *Entry) SetReadonlyBackground(value string) error

ReadonlyBackground reports the background color to use when the entry is readonly. If this option is the empty string, the normal background color is used.

func (*Entry) SetReadonlyBackgroundM added in v1.0.16

func (w *Entry) SetReadonlyBackgroundM(value string) *Entry

SetReadonlyBackgroundM is like ReadonlyBackground but panics on error

func (*Entry) SetRelief added in v1.0.14

func (w *Entry) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Entry) SetReliefM added in v1.0.16

func (w *Entry) SetReliefM(value string) *Entry

SetReliefM is like Relief but panics on error

func (*Entry) SetSelectBackground added in v1.0.14

func (w *Entry) SetSelectBackground(value string) error

SelectBackground reports the background color to use when displaying selected items.

func (*Entry) SetSelectBackgroundM added in v1.0.16

func (w *Entry) SetSelectBackgroundM(value string) *Entry

SetSelectBackgroundM is like SelectBackground but panics on error

func (*Entry) SetSelectBorderWidth added in v1.0.17

func (w *Entry) SetSelectBorderWidth(value string) error

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Entry) SetSelectBorderWidthM added in v1.0.17

func (w *Entry) SetSelectBorderWidthM(value string) *Entry

SetSelectBorderWidthM is like SelectBorderWidth but panics on error

func (*Entry) SetSelectForeground added in v1.0.14

func (w *Entry) SetSelectForeground(value string) error

SelectForeground reports the foreground color to use when displaying selected items.

func (*Entry) SetSelectForegroundM added in v1.0.16

func (w *Entry) SetSelectForegroundM(value string) *Entry

SetSelectForegroundM is like SelectForeground but panics on error

func (*Entry) SetShow added in v1.0.14

func (w *Entry) SetShow(value string) error

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 TODO .QW(* .) 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.

func (*Entry) SetShowM added in v1.0.16

func (w *Entry) SetShowM(value string) *Entry

SetShowM is like Show but panics on error

func (*Entry) SetState added in v1.0.14

func (w *Entry) SetState(value string) error

State reports one of three states for the entry: \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. 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 \fB-disabledforeground\fR and \fB-disabledbackground\fR options.

func (*Entry) SetStateM added in v1.0.16

func (w *Entry) SetStateM(value string) *Entry

SetStateM is like State but panics on error

func (*Entry) SetTakeFocus added in v1.0.14

func (w *Entry) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Entry) SetTakeFocusM added in v1.0.16

func (w *Entry) SetTakeFocusM(value string) *Entry

SetTakeFocusM is like TakeFocus but panics on error

func (*Entry) SetTextVariable added in v1.0.15

func (w *Entry) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Entry) SetTextVariableM added in v1.0.16

func (w *Entry) SetTextVariableM(value string) *Entry

SetTextVariableM is like TextVariable but panics on error

func (*Entry) SetValidate added in v1.0.14

func (w *Entry) SetValidate(value string) error

Validate reports the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. It defaults to \fBnone\fR. When you want validation, you must explicitly state which mode you wish to use. See \fBVALIDATION\fR below for more.

func (*Entry) SetValidateCommand added in v1.0.14

func (w *Entry) SetValidateCommand(value string) error

ValidateCommand reports 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 \fB-invalidcommand\fR will be evaluated if it is set. If it returns 1, then the new edition occurs. See \fBVALIDATION\fR below for more information.

func (*Entry) SetValidateCommandM added in v1.0.16

func (w *Entry) SetValidateCommandM(value string) *Entry

SetValidateCommandM is like ValidateCommand but panics on error

func (*Entry) SetValidateM added in v1.0.16

func (w *Entry) SetValidateM(value string) *Entry

SetValidateM is like Validate but panics on error

func (*Entry) SetWidth added in v1.0.14

func (w *Entry) SetWidth(value string) error

Width reports an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. If the value is less than or equal to zero, the widget picks a size just large enough to hold its current text.

func (*Entry) SetWidthM added in v1.0.16

func (w *Entry) SetWidthM(value string) *Entry

SetWidthM is like Width but panics on error

func (*Entry) SetXScrollCommand added in v1.0.14

func (w *Entry) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*Entry) SetXScrollCommandM added in v1.0.16

func (w *Entry) SetXScrollCommandM(value Command) *Entry

SetXScrollCommandM is like XScrollCommand but panics on error

func (*Entry) Show added in v1.0.14

func (w *Entry) Show() (string, error)

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 TODO .QW(* .) 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.

func (*Entry) ShowM added in v1.0.16

func (w *Entry) ShowM() string

ShowM is like Show but panics on error.

func (*Entry) State added in v1.0.14

func (w *Entry) State() (string, error)

State reports one of three states for the entry: \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. 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 \fB-disabledforeground\fR and \fB-disabledbackground\fR options.

func (*Entry) StateM added in v1.0.16

func (w *Entry) StateM() string

StateM is like State but panics on error.

func (*Entry) TakeFocus added in v1.0.14

func (w *Entry) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Entry) TakeFocusM added in v1.0.16

func (w *Entry) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Entry) TextVariable added in v1.0.15

func (w *Entry) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Entry) TextVariableM added in v1.0.16

func (w *Entry) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*Entry) Validate added in v1.0.14

func (w *Entry) Validate() (string, error)

Validate reports the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. It defaults to \fBnone\fR. When you want validation, you must explicitly state which mode you wish to use. See \fBVALIDATION\fR below for more.

func (*Entry) ValidateCommand added in v1.0.14

func (w *Entry) ValidateCommand() (string, error)

ValidateCommand reports 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 \fB-invalidcommand\fR will be evaluated if it is set. If it returns 1, then the new edition occurs. See \fBVALIDATION\fR below for more information.

func (*Entry) ValidateCommandM added in v1.0.16

func (w *Entry) ValidateCommandM() string

ValidateCommandM is like ValidateCommand but panics on error.

func (*Entry) ValidateM added in v1.0.16

func (w *Entry) ValidateM() string

ValidateM is like Validate but panics on error.

func (*Entry) Width added in v1.0.14

func (w *Entry) Width() (string, error)

Width reports an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. If the value is less than or equal to zero, the widget picks a size just large enough to hold its current text.

func (*Entry) WidthM added in v1.0.16

func (w *Entry) WidthM() string

WidthM is like Width but panics on error.

type Frame added in v1.0.13

type Frame struct {
	Window
}

Frame represents the Tk frame widget.

func (*Frame) Background added in v1.0.14

func (w *Frame) Background() (string, error)

This option is the same as the standard \fB-background\fR 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.

func (*Frame) BackgroundM added in v1.0.16

func (w *Frame) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Frame) BorderWidth added in v1.0.14

func (w *Frame) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Frame) BorderWidthM added in v1.0.16

func (w *Frame) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Frame) Class added in v1.0.14

func (w *Frame) Class() (string, error)

Class reports 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 \fB-class\fR option may not be changed with the \fBconfigure\fR widget command.

func (*Frame) ClassM added in v1.0.16

func (w *Frame) ClassM() string

ClassM is like Class but panics on error.

func (*Frame) Colormap added in v1.0.14

func (w *Frame) Colormap() (string, error)

Colormap reports a colormap to use for the window. The value may be either \fBnew\fR, 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 \fIpathName\fR), in which case the new window will use the colormap from the specified window. If the \fB-colormap\fR option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the \fBconfigure\fR widget command.

func (*Frame) ColormapM added in v1.0.16

func (w *Frame) ColormapM() string

ColormapM is like Colormap but panics on error.

func (*Frame) Container added in v1.0.14

func (w *Frame) Container() (string, error)

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 \fB-use\fR 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 \fBconfigure\fR widget command. Note that \fB-borderwidth\fR, \fB-padx\fR and \fB-pady\fR are ignored when configured as a container since a container has no border.

func (*Frame) ContainerM added in v1.0.16

func (w *Frame) ContainerM() string

ContainerM is like Container but panics on error.

func (*Frame) Cursor added in v1.0.14

func (w *Frame) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Frame) CursorM added in v1.0.16

func (w *Frame) CursorM() string

CursorM is like Cursor but panics on error.

func (*Frame) Height added in v1.0.14

func (w *Frame) Height() (string, error)

Height reports the desired height for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all. Note that this sets the total height of the frame, any \fB-borderwidth\fR or similar is not added. Normally \fB-height\fR should not be used if a propagating geometry manager, such as \fBgrid\fR or \fBpack\fR, is used within the frame since the geometry manager will override the height of the frame.

func (*Frame) HeightM added in v1.0.16

func (w *Frame) HeightM() string

HeightM is like Height but panics on error.

func (*Frame) HighlightBackground added in v1.0.14

func (w *Frame) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Frame) HighlightBackgroundM added in v1.0.16

func (w *Frame) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Frame) HighlightColor added in v1.0.14

func (w *Frame) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Frame) HighlightColorM added in v1.0.16

func (w *Frame) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Frame) HighlightThickness added in v1.0.14

func (w *Frame) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Frame) HighlightThicknessM added in v1.0.16

func (w *Frame) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Frame) PadX added in v1.0.14

func (w *Frame) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Frame) PadXM added in v1.0.16

func (w *Frame) PadXM() string

PadXM is like PadX but panics on error.

func (*Frame) PadY added in v1.0.14

func (w *Frame) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Frame) PadYM added in v1.0.16

func (w *Frame) PadYM() string

PadYM is like PadY but panics on error.

func (*Frame) Relief added in v1.0.14

func (w *Frame) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Frame) ReliefM added in v1.0.16

func (w *Frame) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Frame) SetBackground added in v1.0.14

func (w *Frame) SetBackground(value string) error

This option is the same as the standard \fB-background\fR 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.

func (*Frame) SetBackgroundM added in v1.0.16

func (w *Frame) SetBackgroundM(value string) *Frame

SetBackgroundM is like Background but panics on error

func (*Frame) SetBorderWidth added in v1.0.14

func (w *Frame) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Frame) SetBorderWidthM added in v1.0.16

func (w *Frame) SetBorderWidthM(value string) *Frame

SetBorderWidthM is like BorderWidth but panics on error

func (*Frame) SetColormap added in v1.0.14

func (w *Frame) SetColormap(value string) error

Colormap reports a colormap to use for the window. The value may be either \fBnew\fR, 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 \fIpathName\fR), in which case the new window will use the colormap from the specified window. If the \fB-colormap\fR option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the \fBconfigure\fR widget command.

func (*Frame) SetColormapM added in v1.0.16

func (w *Frame) SetColormapM(value string) *Frame

SetColormapM is like Colormap but panics on error

func (*Frame) SetContainer added in v1.0.14

func (w *Frame) SetContainer(value string) error

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 \fB-use\fR 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 \fBconfigure\fR widget command. Note that \fB-borderwidth\fR, \fB-padx\fR and \fB-pady\fR are ignored when configured as a container since a container has no border.

func (*Frame) SetContainerM added in v1.0.16

func (w *Frame) SetContainerM(value string) *Frame

SetContainerM is like Container but panics on error

func (*Frame) SetCursor added in v1.0.14

func (w *Frame) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Frame) SetCursorM added in v1.0.16

func (w *Frame) SetCursorM(value string) *Frame

SetCursorM is like Cursor but panics on error

func (*Frame) SetHeight added in v1.0.14

func (w *Frame) SetHeight(value string) error

Height reports the desired height for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all. Note that this sets the total height of the frame, any \fB-borderwidth\fR or similar is not added. Normally \fB-height\fR should not be used if a propagating geometry manager, such as \fBgrid\fR or \fBpack\fR, is used within the frame since the geometry manager will override the height of the frame.

func (*Frame) SetHeightM added in v1.0.16

func (w *Frame) SetHeightM(value string) *Frame

SetHeightM is like Height but panics on error

func (*Frame) SetHighlightBackground added in v1.0.14

func (w *Frame) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Frame) SetHighlightBackgroundM added in v1.0.16

func (w *Frame) SetHighlightBackgroundM(value string) *Frame

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Frame) SetHighlightColor added in v1.0.14

func (w *Frame) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Frame) SetHighlightColorM added in v1.0.16

func (w *Frame) SetHighlightColorM(value string) *Frame

SetHighlightColorM is like HighlightColor but panics on error

func (*Frame) SetHighlightThickness added in v1.0.14

func (w *Frame) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Frame) SetHighlightThicknessM added in v1.0.16

func (w *Frame) SetHighlightThicknessM(value string) *Frame

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Frame) SetPadX added in v1.0.14

func (w *Frame) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Frame) SetPadXM added in v1.0.16

func (w *Frame) SetPadXM(value string) *Frame

SetPadXM is like PadX but panics on error

func (*Frame) SetPadY added in v1.0.14

func (w *Frame) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Frame) SetPadYM added in v1.0.16

func (w *Frame) SetPadYM(value string) *Frame

SetPadYM is like PadY but panics on error

func (*Frame) SetRelief added in v1.0.14

func (w *Frame) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Frame) SetReliefM added in v1.0.16

func (w *Frame) SetReliefM(value string) *Frame

SetReliefM is like Relief but panics on error

func (*Frame) SetTakeFocus added in v1.0.14

func (w *Frame) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Frame) SetTakeFocusM added in v1.0.16

func (w *Frame) SetTakeFocusM(value string) *Frame

SetTakeFocusM is like TakeFocus but panics on error

func (*Frame) SetVisual added in v1.0.14

func (w *Frame) SetVisual(value string) error

Visual reports visual information for the new window in any of the forms accepted by \fBTk_GetVisual\fR. If this option is not specified, the new window will use the same visual as its parent. The \fB-visual\fR option may not be modified with the \fBconfigure\fR widget command.

func (*Frame) SetVisualM added in v1.0.16

func (w *Frame) SetVisualM(value string) *Frame

SetVisualM is like Visual but panics on error

func (*Frame) SetWidth added in v1.0.14

func (w *Frame) SetWidth(value string) error

Width reports the desired width for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all. Note that this sets the total width of the frame, any \fB-borderwidth\fR or similar is not added. Normally \fB-width\fR should not be used if a propagating geometry manager, such as \fBgrid\fR or \fBpack\fR, is used within the frame since the geometry manager will override the width of the frame.

func (*Frame) SetWidthM added in v1.0.16

func (w *Frame) SetWidthM(value string) *Frame

SetWidthM is like Width but panics on error

func (*Frame) TakeFocus added in v1.0.14

func (w *Frame) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Frame) TakeFocusM added in v1.0.16

func (w *Frame) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Frame) Visual added in v1.0.14

func (w *Frame) Visual() (string, error)

Visual reports visual information for the new window in any of the forms accepted by \fBTk_GetVisual\fR. If this option is not specified, the new window will use the same visual as its parent. The \fB-visual\fR option may not be modified with the \fBconfigure\fR widget command.

func (*Frame) VisualM added in v1.0.16

func (w *Frame) VisualM() string

VisualM is like Visual but panics on error.

func (*Frame) Width added in v1.0.14

func (w *Frame) Width() (string, error)

Width reports the desired width for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all. Note that this sets the total width of the frame, any \fB-borderwidth\fR or similar is not added. Normally \fB-width\fR should not be used if a propagating geometry manager, such as \fBgrid\fR or \fBpack\fR, is used within the frame since the geometry manager will override the width of the frame.

func (*Frame) WidthM added in v1.0.16

func (w *Frame) WidthM() string

WidthM is like Width but panics on error.

type Label added in v1.0.13

type Label struct {
	Window
}

Label represents the Tk label widget.

func (*Label) ActiveBackground added in v1.0.14

func (w *Label) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Label) ActiveBackgroundM added in v1.0.16

func (w *Label) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (*Label) ActiveForeground added in v1.0.14

func (w *Label) ActiveForeground() (string, error)

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*Label) ActiveForegroundM added in v1.0.16

func (w *Label) ActiveForegroundM() string

ActiveForegroundM is like ActiveForeground but panics on error.

func (*Label) Anchor added in v1.0.14

func (w *Label) Anchor() (string, error)

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*Label) AnchorM added in v1.0.16

func (w *Label) AnchorM() string

AnchorM is like Anchor but panics on error.

func (*Label) Background added in v1.0.14

func (w *Label) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Label) BackgroundM added in v1.0.16

func (w *Label) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Label) Bitmap added in v1.0.14

func (w *Label) Bitmap() (string, error)

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*Label) BitmapM added in v1.0.16

func (w *Label) BitmapM() string

BitmapM is like Bitmap but panics on error.

func (*Label) BorderWidth added in v1.0.14

func (w *Label) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Label) BorderWidthM added in v1.0.16

func (w *Label) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Label) Compound added in v1.0.14

func (w *Label) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*Label) CompoundM added in v1.0.16

func (w *Label) CompoundM() string

CompoundM is like Compound but panics on error.

func (*Label) Cursor added in v1.0.14

func (w *Label) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Label) CursorM added in v1.0.16

func (w *Label) CursorM() string

CursorM is like Cursor but panics on error.

func (*Label) DisabledForeground added in v1.0.14

func (w *Label) DisabledForeground() (string, error)

DisabledForeground reports 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.

func (*Label) DisabledForegroundM added in v1.0.16

func (w *Label) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (*Label) Font added in v1.0.14

func (w *Label) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Label) FontM added in v1.0.16

func (w *Label) FontM() string

FontM is like Font but panics on error.

func (*Label) Foreground added in v1.0.14

func (w *Label) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*Label) ForegroundM added in v1.0.16

func (w *Label) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*Label) Height added in v1.0.14

func (w *Label) Height() (string, error)

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*Label) HeightM added in v1.0.16

func (w *Label) HeightM() string

HeightM is like Height but panics on error.

func (*Label) HighlightBackground added in v1.0.14

func (w *Label) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Label) HighlightBackgroundM added in v1.0.16

func (w *Label) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Label) HighlightColor added in v1.0.14

func (w *Label) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Label) HighlightColorM added in v1.0.16

func (w *Label) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Label) HighlightThickness added in v1.0.14

func (w *Label) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Label) HighlightThicknessM added in v1.0.16

func (w *Label) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Label) Image added in v1.0.14

func (w *Label) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*Label) ImageM added in v1.0.16

func (w *Label) ImageM() string

ImageM is like Image but panics on error.

func (*Label) Justify added in v1.0.14

func (w *Label) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*Label) JustifyM added in v1.0.16

func (w *Label) JustifyM() string

JustifyM is like Justify but panics on error.

func (*Label) PadX added in v1.0.14

func (w *Label) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Label) PadXM added in v1.0.16

func (w *Label) PadXM() string

PadXM is like PadX but panics on error.

func (*Label) PadY added in v1.0.14

func (w *Label) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Label) PadYM added in v1.0.16

func (w *Label) PadYM() string

PadYM is like PadY but panics on error.

func (*Label) Relief added in v1.0.14

func (w *Label) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Label) ReliefM added in v1.0.16

func (w *Label) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Label) SetActiveBackground added in v1.0.14

func (w *Label) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Label) SetActiveBackgroundM added in v1.0.16

func (w *Label) SetActiveBackgroundM(value string) *Label

SetActiveBackgroundM is like ActiveBackground but panics on error

func (*Label) SetActiveForeground added in v1.0.14

func (w *Label) SetActiveForeground(value string) error

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*Label) SetActiveForegroundM added in v1.0.16

func (w *Label) SetActiveForegroundM(value string) *Label

SetActiveForegroundM is like ActiveForeground but panics on error

func (*Label) SetAnchor added in v1.0.14

func (w *Label) SetAnchor(value string) error

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*Label) SetAnchorM added in v1.0.16

func (w *Label) SetAnchorM(value string) *Label

SetAnchorM is like Anchor but panics on error

func (*Label) SetBackground added in v1.0.14

func (w *Label) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Label) SetBackgroundM added in v1.0.16

func (w *Label) SetBackgroundM(value string) *Label

SetBackgroundM is like Background but panics on error

func (*Label) SetBitmap added in v1.0.14

func (w *Label) SetBitmap(value string) error

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*Label) SetBitmapM added in v1.0.16

func (w *Label) SetBitmapM(value string) *Label

SetBitmapM is like Bitmap but panics on error

func (*Label) SetBorderWidth added in v1.0.14

func (w *Label) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Label) SetBorderWidthM added in v1.0.16

func (w *Label) SetBorderWidthM(value string) *Label

SetBorderWidthM is like BorderWidth but panics on error

func (*Label) SetCompound added in v1.0.14

func (w *Label) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*Label) SetCompoundM added in v1.0.16

func (w *Label) SetCompoundM(value string) *Label

SetCompoundM is like Compound but panics on error

func (*Label) SetCursor added in v1.0.14

func (w *Label) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Label) SetCursorM added in v1.0.16

func (w *Label) SetCursorM(value string) *Label

SetCursorM is like Cursor but panics on error

func (*Label) SetDisabledForeground added in v1.0.14

func (w *Label) SetDisabledForeground(value string) error

DisabledForeground reports 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.

func (*Label) SetDisabledForegroundM added in v1.0.16

func (w *Label) SetDisabledForegroundM(value string) *Label

SetDisabledForegroundM is like DisabledForeground but panics on error

func (*Label) SetFont added in v1.0.14

func (w *Label) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Label) SetFontM added in v1.0.16

func (w *Label) SetFontM(value string) *Label

SetFontM is like Font but panics on error

func (*Label) SetForeground added in v1.0.14

func (w *Label) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*Label) SetForegroundM added in v1.0.16

func (w *Label) SetForegroundM(value string) *Label

SetForegroundM is like Foreground but panics on error

func (*Label) SetHeight added in v1.0.14

func (w *Label) SetHeight(value string) error

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*Label) SetHeightM added in v1.0.16

func (w *Label) SetHeightM(value string) *Label

SetHeightM is like Height but panics on error

func (*Label) SetHighlightBackground added in v1.0.14

func (w *Label) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Label) SetHighlightBackgroundM added in v1.0.16

func (w *Label) SetHighlightBackgroundM(value string) *Label

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Label) SetHighlightColor added in v1.0.14

func (w *Label) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Label) SetHighlightColorM added in v1.0.16

func (w *Label) SetHighlightColorM(value string) *Label

SetHighlightColorM is like HighlightColor but panics on error

func (*Label) SetHighlightThickness added in v1.0.14

func (w *Label) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Label) SetHighlightThicknessM added in v1.0.16

func (w *Label) SetHighlightThicknessM(value string) *Label

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Label) SetImage added in v1.0.14

func (w *Label) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*Label) SetImageM added in v1.0.16

func (w *Label) SetImageM(value string) *Label

SetImageM is like Image but panics on error

func (*Label) SetJustify added in v1.0.14

func (w *Label) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*Label) SetJustifyM added in v1.0.16

func (w *Label) SetJustifyM(value string) *Label

SetJustifyM is like Justify but panics on error

func (*Label) SetPadX added in v1.0.14

func (w *Label) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Label) SetPadXM added in v1.0.16

func (w *Label) SetPadXM(value string) *Label

SetPadXM is like PadX but panics on error

func (*Label) SetPadY added in v1.0.14

func (w *Label) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Label) SetPadYM added in v1.0.16

func (w *Label) SetPadYM(value string) *Label

SetPadYM is like PadY but panics on error

func (*Label) SetRelief added in v1.0.14

func (w *Label) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Label) SetReliefM added in v1.0.16

func (w *Label) SetReliefM(value string) *Label

SetReliefM is like Relief but panics on error

func (*Label) SetState added in v1.0.14

func (w *Label) SetState(value string) error

State reports one of three states for the label: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the \fB-foreground\fR and \fB-background\fR options. In active state the label is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR options. In the disabled state the \fB-disabledforeground\fR and \fB-background\fR options determine how the button is displayed.

func (*Label) SetStateM added in v1.0.16

func (w *Label) SetStateM(value string) *Label

SetStateM is like State but panics on error

func (*Label) SetTakeFocus added in v1.0.14

func (w *Label) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Label) SetTakeFocusM added in v1.0.16

func (w *Label) SetTakeFocusM(value string) *Label

SetTakeFocusM is like TakeFocus but panics on error

func (*Label) SetText added in v1.0.13

func (w *Label) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Label) SetTextM added in v1.0.16

func (w *Label) SetTextM(value string) *Label

SetTextM is like Text but panics on error

func (*Label) SetTextVariable added in v1.0.15

func (w *Label) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Label) SetTextVariableM added in v1.0.16

func (w *Label) SetTextVariableM(value string) *Label

SetTextVariableM is like TextVariable but panics on error

func (*Label) SetUnderline added in v1.0.14

func (w *Label) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*Label) SetUnderlineM added in v1.0.16

func (w *Label) SetUnderlineM(value string) *Label

SetUnderlineM is like Underline but panics on error

func (*Label) SetWidth added in v1.0.14

func (w *Label) SetWidth(value string) error

Width reports 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 \fBTk_GetPixels\fR); 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.

func (*Label) SetWidthM added in v1.0.16

func (w *Label) SetWidthM(value string) *Label

SetWidthM is like Width but panics on error

func (*Label) SetWrapLength added in v1.0.14

func (w *Label) SetWrapLength(value string) error

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*Label) SetWrapLengthM added in v1.0.16

func (w *Label) SetWrapLengthM(value string) *Label

SetWrapLengthM is like WrapLength but panics on error

func (*Label) State added in v1.0.14

func (w *Label) State() (string, error)

State reports one of three states for the label: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the \fB-foreground\fR and \fB-background\fR options. In active state the label is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR options. In the disabled state the \fB-disabledforeground\fR and \fB-background\fR options determine how the button is displayed.

func (*Label) StateM added in v1.0.16

func (w *Label) StateM() string

StateM is like State but panics on error.

func (*Label) TakeFocus added in v1.0.14

func (w *Label) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Label) TakeFocusM added in v1.0.16

func (w *Label) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Label) Text added in v1.0.13

func (w *Label) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Label) TextM added in v1.0.16

func (w *Label) TextM() string

TextM is like Text but panics on error.

func (*Label) TextVariable added in v1.0.15

func (w *Label) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Label) TextVariableM added in v1.0.16

func (w *Label) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*Label) Underline added in v1.0.14

func (w *Label) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*Label) UnderlineM added in v1.0.16

func (w *Label) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*Label) Width added in v1.0.14

func (w *Label) Width() (string, error)

Width reports 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 \fBTk_GetPixels\fR); 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.

func (*Label) WidthM added in v1.0.16

func (w *Label) WidthM() string

WidthM is like Width but panics on error.

func (*Label) WrapLength added in v1.0.14

func (w *Label) WrapLength() (string, error)

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*Label) WrapLengthM added in v1.0.16

func (w *Label) WrapLengthM() string

WrapLengthM is like WrapLength but panics on error.

type LabelFrame added in v1.0.14

type LabelFrame struct {
	Window
}

LabelFrame represents the Tk labelframe widget.

func (*LabelFrame) Background added in v1.0.14

func (w *LabelFrame) Background() (string, error)

This option is the same as the standard \fB-background\fR 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.

func (*LabelFrame) BackgroundM added in v1.0.16

func (w *LabelFrame) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*LabelFrame) BorderWidth added in v1.0.14

func (w *LabelFrame) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*LabelFrame) BorderWidthM added in v1.0.16

func (w *LabelFrame) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*LabelFrame) Class added in v1.0.14

func (w *LabelFrame) Class() (string, error)

Class reports 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 \fB-class\fR option may not be changed with the \fBconfigure\fR widget command.

func (*LabelFrame) ClassM added in v1.0.16

func (w *LabelFrame) ClassM() string

ClassM is like Class but panics on error.

func (*LabelFrame) Colormap added in v1.0.14

func (w *LabelFrame) Colormap() (string, error)

Colormap reports a colormap to use for the window. The value may be either \fBnew\fR, 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 \fIpathName\fR), in which case the new window will use the colormap from the specified window. If the \fB-colormap\fR option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the \fBconfigure\fR widget command.

func (*LabelFrame) ColormapM added in v1.0.16

func (w *LabelFrame) ColormapM() string

ColormapM is like Colormap but panics on error.

func (*LabelFrame) Cursor added in v1.0.14

func (w *LabelFrame) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*LabelFrame) CursorM added in v1.0.16

func (w *LabelFrame) CursorM() string

CursorM is like Cursor but panics on error.

func (*LabelFrame) Font added in v1.0.14

func (w *LabelFrame) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*LabelFrame) FontM added in v1.0.16

func (w *LabelFrame) FontM() string

FontM is like Font but panics on error.

func (*LabelFrame) Foreground added in v1.0.14

func (w *LabelFrame) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*LabelFrame) ForegroundM added in v1.0.16

func (w *LabelFrame) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*LabelFrame) Height added in v1.0.14

func (w *LabelFrame) Height() (string, error)

Height reports the desired height for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*LabelFrame) HeightM added in v1.0.16

func (w *LabelFrame) HeightM() string

HeightM is like Height but panics on error.

func (*LabelFrame) HighlightBackground added in v1.0.14

func (w *LabelFrame) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*LabelFrame) HighlightBackgroundM added in v1.0.16

func (w *LabelFrame) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*LabelFrame) HighlightColor added in v1.0.14

func (w *LabelFrame) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*LabelFrame) HighlightColorM added in v1.0.16

func (w *LabelFrame) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*LabelFrame) HighlightThickness added in v1.0.14

func (w *LabelFrame) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*LabelFrame) HighlightThicknessM added in v1.0.16

func (w *LabelFrame) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*LabelFrame) LabelAnchor added in v1.0.14

func (w *LabelFrame) LabelAnchor() (string, error)

LabelAnchor reports where to place the label. A label is only displayed if the \fB-text\fR option is not the empty string. Valid values for this option are (listing them clockwise) \fBnw\fR, \fBn\fR, \fBne\fR, \fBen\fR, \fBe\fR, \fBes\fR, \fBse\fR, \fBs\fR,\fBsw\fR, \fBws\fR, \fBw\fR and \fBwn\fR. The default value is \fBnw\fR.

func (*LabelFrame) LabelAnchorM added in v1.0.16

func (w *LabelFrame) LabelAnchorM() string

LabelAnchorM is like LabelAnchor but panics on error.

func (*LabelFrame) LabelWidget added in v1.0.14

func (w *LabelFrame) LabelWidget() (string, error)

LabelWidget reports a widget to use as label. This overrides any \fB-text\fR option. The widget must exist before being used as \fB-labelwidget\fR and if it is not a descendant of this window, it will be raised above it in the stacking order.

func (*LabelFrame) LabelWidgetM added in v1.0.16

func (w *LabelFrame) LabelWidgetM() string

LabelWidgetM is like LabelWidget but panics on error.

func (*LabelFrame) PadX added in v1.0.14

func (w *LabelFrame) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*LabelFrame) PadXM added in v1.0.16

func (w *LabelFrame) PadXM() string

PadXM is like PadX but panics on error.

func (*LabelFrame) PadY added in v1.0.14

func (w *LabelFrame) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*LabelFrame) PadYM added in v1.0.16

func (w *LabelFrame) PadYM() string

PadYM is like PadY but panics on error.

func (*LabelFrame) Relief added in v1.0.14

func (w *LabelFrame) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*LabelFrame) ReliefM added in v1.0.16

func (w *LabelFrame) ReliefM() string

ReliefM is like Relief but panics on error.

func (*LabelFrame) SetBackground added in v1.0.14

func (w *LabelFrame) SetBackground(value string) error

This option is the same as the standard \fB-background\fR 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.

func (*LabelFrame) SetBackgroundM added in v1.0.16

func (w *LabelFrame) SetBackgroundM(value string) *LabelFrame

SetBackgroundM is like Background but panics on error

func (*LabelFrame) SetBorderWidth added in v1.0.14

func (w *LabelFrame) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*LabelFrame) SetBorderWidthM added in v1.0.16

func (w *LabelFrame) SetBorderWidthM(value string) *LabelFrame

SetBorderWidthM is like BorderWidth but panics on error

func (*LabelFrame) SetColormap added in v1.0.14

func (w *LabelFrame) SetColormap(value string) error

Colormap reports a colormap to use for the window. The value may be either \fBnew\fR, 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 \fIpathName\fR), in which case the new window will use the colormap from the specified window. If the \fB-colormap\fR option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the \fBconfigure\fR widget command.

func (*LabelFrame) SetColormapM added in v1.0.16

func (w *LabelFrame) SetColormapM(value string) *LabelFrame

SetColormapM is like Colormap but panics on error

func (*LabelFrame) SetCursor added in v1.0.14

func (w *LabelFrame) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*LabelFrame) SetCursorM added in v1.0.16

func (w *LabelFrame) SetCursorM(value string) *LabelFrame

SetCursorM is like Cursor but panics on error

func (*LabelFrame) SetFont added in v1.0.14

func (w *LabelFrame) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*LabelFrame) SetFontM added in v1.0.16

func (w *LabelFrame) SetFontM(value string) *LabelFrame

SetFontM is like Font but panics on error

func (*LabelFrame) SetForeground added in v1.0.14

func (w *LabelFrame) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*LabelFrame) SetForegroundM added in v1.0.16

func (w *LabelFrame) SetForegroundM(value string) *LabelFrame

SetForegroundM is like Foreground but panics on error

func (*LabelFrame) SetHeight added in v1.0.14

func (w *LabelFrame) SetHeight(value string) error

Height reports the desired height for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*LabelFrame) SetHeightM added in v1.0.16

func (w *LabelFrame) SetHeightM(value string) *LabelFrame

SetHeightM is like Height but panics on error

func (*LabelFrame) SetHighlightBackground added in v1.0.14

func (w *LabelFrame) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*LabelFrame) SetHighlightBackgroundM added in v1.0.16

func (w *LabelFrame) SetHighlightBackgroundM(value string) *LabelFrame

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*LabelFrame) SetHighlightColor added in v1.0.14

func (w *LabelFrame) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*LabelFrame) SetHighlightColorM added in v1.0.16

func (w *LabelFrame) SetHighlightColorM(value string) *LabelFrame

SetHighlightColorM is like HighlightColor but panics on error

func (*LabelFrame) SetHighlightThickness added in v1.0.14

func (w *LabelFrame) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*LabelFrame) SetHighlightThicknessM added in v1.0.16

func (w *LabelFrame) SetHighlightThicknessM(value string) *LabelFrame

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*LabelFrame) SetLabelAnchor added in v1.0.14

func (w *LabelFrame) SetLabelAnchor(value string) error

LabelAnchor reports where to place the label. A label is only displayed if the \fB-text\fR option is not the empty string. Valid values for this option are (listing them clockwise) \fBnw\fR, \fBn\fR, \fBne\fR, \fBen\fR, \fBe\fR, \fBes\fR, \fBse\fR, \fBs\fR,\fBsw\fR, \fBws\fR, \fBw\fR and \fBwn\fR. The default value is \fBnw\fR.

func (*LabelFrame) SetLabelAnchorM added in v1.0.16

func (w *LabelFrame) SetLabelAnchorM(value string) *LabelFrame

SetLabelAnchorM is like LabelAnchor but panics on error

func (*LabelFrame) SetLabelWidget added in v1.0.14

func (w *LabelFrame) SetLabelWidget(value string) error

LabelWidget reports a widget to use as label. This overrides any \fB-text\fR option. The widget must exist before being used as \fB-labelwidget\fR and if it is not a descendant of this window, it will be raised above it in the stacking order.

func (*LabelFrame) SetLabelWidgetM added in v1.0.16

func (w *LabelFrame) SetLabelWidgetM(value string) *LabelFrame

SetLabelWidgetM is like LabelWidget but panics on error

func (*LabelFrame) SetPadX added in v1.0.14

func (w *LabelFrame) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*LabelFrame) SetPadXM added in v1.0.16

func (w *LabelFrame) SetPadXM(value string) *LabelFrame

SetPadXM is like PadX but panics on error

func (*LabelFrame) SetPadY added in v1.0.14

func (w *LabelFrame) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*LabelFrame) SetPadYM added in v1.0.16

func (w *LabelFrame) SetPadYM(value string) *LabelFrame

SetPadYM is like PadY but panics on error

func (*LabelFrame) SetRelief added in v1.0.14

func (w *LabelFrame) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*LabelFrame) SetReliefM added in v1.0.16

func (w *LabelFrame) SetReliefM(value string) *LabelFrame

SetReliefM is like Relief but panics on error

func (*LabelFrame) SetTakeFocus added in v1.0.14

func (w *LabelFrame) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*LabelFrame) SetTakeFocusM added in v1.0.16

func (w *LabelFrame) SetTakeFocusM(value string) *LabelFrame

SetTakeFocusM is like TakeFocus but panics on error

func (*LabelFrame) SetText added in v1.0.14

func (w *LabelFrame) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*LabelFrame) SetTextM added in v1.0.16

func (w *LabelFrame) SetTextM(value string) *LabelFrame

SetTextM is like Text but panics on error

func (*LabelFrame) SetVisual added in v1.0.14

func (w *LabelFrame) SetVisual(value string) error

Visual reports visual information for the new window in any of the forms accepted by \fBTk_GetVisual\fR. If this option is not specified, the new window will use the same visual as its parent. The \fB-visual\fR option may not be modified with the \fBconfigure\fR widget command.

func (*LabelFrame) SetVisualM added in v1.0.16

func (w *LabelFrame) SetVisualM(value string) *LabelFrame

SetVisualM is like Visual but panics on error

func (*LabelFrame) SetWidth added in v1.0.14

func (w *LabelFrame) SetWidth(value string) error

Width reports the desired width for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*LabelFrame) SetWidthM added in v1.0.16

func (w *LabelFrame) SetWidthM(value string) *LabelFrame

SetWidthM is like Width but panics on error

func (*LabelFrame) TakeFocus added in v1.0.14

func (w *LabelFrame) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*LabelFrame) TakeFocusM added in v1.0.16

func (w *LabelFrame) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*LabelFrame) Text added in v1.0.14

func (w *LabelFrame) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*LabelFrame) TextM added in v1.0.16

func (w *LabelFrame) TextM() string

TextM is like Text but panics on error.

func (*LabelFrame) Visual added in v1.0.14

func (w *LabelFrame) Visual() (string, error)

Visual reports visual information for the new window in any of the forms accepted by \fBTk_GetVisual\fR. If this option is not specified, the new window will use the same visual as its parent. The \fB-visual\fR option may not be modified with the \fBconfigure\fR widget command.

func (*LabelFrame) VisualM added in v1.0.16

func (w *LabelFrame) VisualM() string

VisualM is like Visual but panics on error.

func (*LabelFrame) Width added in v1.0.14

func (w *LabelFrame) Width() (string, error)

Width reports the desired width for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*LabelFrame) WidthM added in v1.0.16

func (w *LabelFrame) WidthM() string

WidthM is like Width but panics on error.

type ListBox added in v1.0.14

type ListBox struct {
	Window
}

ListBox represents the Tk listbox widget.

func (*ListBox) ActiveStyle added in v1.0.14

func (w *ListBox) ActiveStyle() (string, error)

ActiveStyle reports the style in which to draw the active element. This must be one of \fBdotbox\fR (show a focus ring around the active element), \fBnone\fR (no special indication of active element) or \fBunderline\fR (underline the active element). The default is \fBunderline\fR on Windows, and \fBdotbox\fR elsewhere.

func (*ListBox) ActiveStyleM added in v1.0.16

func (w *ListBox) ActiveStyleM() string

ActiveStyleM is like ActiveStyle but panics on error.

func (*ListBox) Background added in v1.0.14

func (w *ListBox) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*ListBox) BackgroundM added in v1.0.16

func (w *ListBox) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*ListBox) BorderWidth added in v1.0.14

func (w *ListBox) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*ListBox) BorderWidthM added in v1.0.16

func (w *ListBox) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*ListBox) Cursor added in v1.0.14

func (w *ListBox) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*ListBox) CursorM added in v1.0.16

func (w *ListBox) CursorM() string

CursorM is like Cursor but panics on error.

func (*ListBox) DisabledForeground added in v1.0.14

func (w *ListBox) DisabledForeground() (string, error)

DisabledForeground reports 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.

func (*ListBox) DisabledForegroundM added in v1.0.16

func (w *ListBox) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (*ListBox) ExportSelection added in v1.0.14

func (w *ListBox) ExportSelection() (bool, error)

ExportSelection reports whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*ListBox) ExportSelectionM added in v1.0.16

func (w *ListBox) ExportSelectionM() bool

ExportSelectionM is like ExportSelection but panics on error.

func (*ListBox) Font added in v1.0.14

func (w *ListBox) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*ListBox) FontM added in v1.0.16

func (w *ListBox) FontM() string

FontM is like Font but panics on error.

func (*ListBox) Foreground added in v1.0.14

func (w *ListBox) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*ListBox) ForegroundM added in v1.0.16

func (w *ListBox) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*ListBox) Height added in v1.0.14

func (w *ListBox) Height() (string, error)

Height reports 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.

func (*ListBox) HeightM added in v1.0.16

func (w *ListBox) HeightM() string

HeightM is like Height but panics on error.

func (*ListBox) HighlightBackground added in v1.0.14

func (w *ListBox) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*ListBox) HighlightBackgroundM added in v1.0.16

func (w *ListBox) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*ListBox) HighlightColor added in v1.0.14

func (w *ListBox) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*ListBox) HighlightColorM added in v1.0.16

func (w *ListBox) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*ListBox) HighlightThickness added in v1.0.14

func (w *ListBox) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*ListBox) HighlightThicknessM added in v1.0.16

func (w *ListBox) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*ListBox) Justify added in v1.0.14

func (w *ListBox) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*ListBox) JustifyM added in v1.0.16

func (w *ListBox) JustifyM() string

JustifyM is like Justify but panics on error.

func (*ListBox) ListVariable added in v1.0.15

func (w *ListBox) ListVariable() (string, error)

ListVariable reports 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 \fB-listvariable\fR will cause an error. Attempts to unset a variable in use as a \fB-listvariable\fR will fail but will not generate an error.

func (*ListBox) ListVariableM added in v1.0.16

func (w *ListBox) ListVariableM() string

ListVariableM is like ListVariable but panics on error.

func (*ListBox) Relief added in v1.0.14

func (w *ListBox) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*ListBox) ReliefM added in v1.0.16

func (w *ListBox) ReliefM() string

ReliefM is like Relief but panics on error.

func (*ListBox) SelectBackground added in v1.0.14

func (w *ListBox) SelectBackground() (string, error)

SelectBackground reports the background color to use when displaying selected items.

func (*ListBox) SelectBackgroundM added in v1.0.16

func (w *ListBox) SelectBackgroundM() string

SelectBackgroundM is like SelectBackground but panics on error.

func (*ListBox) SelectBorderWidth added in v1.0.17

func (w *ListBox) SelectBorderWidth() (string, error)

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*ListBox) SelectBorderWidthM added in v1.0.17

func (w *ListBox) SelectBorderWidthM() string

SelectBorderWidthM is like SelectBorderWidth but panics on error.

func (*ListBox) SelectForeground added in v1.0.14

func (w *ListBox) SelectForeground() (string, error)

SelectForeground reports the foreground color to use when displaying selected items.

func (*ListBox) SelectForegroundM added in v1.0.16

func (w *ListBox) SelectForegroundM() string

SelectForegroundM is like SelectForeground but panics on error.

func (*ListBox) SelectMode added in v1.0.14

func (w *ListBox) SelectMode() (string, error)

SelectMode reports 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 \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or \fBextended\fR; the default value is \fBbrowse\fR.

func (*ListBox) SelectModeM added in v1.0.16

func (w *ListBox) SelectModeM() string

SelectModeM is like SelectMode but panics on error.

func (*ListBox) SetActiveStyle added in v1.0.14

func (w *ListBox) SetActiveStyle(value string) error

ActiveStyle reports the style in which to draw the active element. This must be one of \fBdotbox\fR (show a focus ring around the active element), \fBnone\fR (no special indication of active element) or \fBunderline\fR (underline the active element). The default is \fBunderline\fR on Windows, and \fBdotbox\fR elsewhere.

func (*ListBox) SetActiveStyleM added in v1.0.16

func (w *ListBox) SetActiveStyleM(value string) *ListBox

SetActiveStyleM is like ActiveStyle but panics on error

func (*ListBox) SetBackground added in v1.0.14

func (w *ListBox) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*ListBox) SetBackgroundM added in v1.0.16

func (w *ListBox) SetBackgroundM(value string) *ListBox

SetBackgroundM is like Background but panics on error

func (*ListBox) SetBorderWidth added in v1.0.14

func (w *ListBox) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*ListBox) SetBorderWidthM added in v1.0.16

func (w *ListBox) SetBorderWidthM(value string) *ListBox

SetBorderWidthM is like BorderWidth but panics on error

func (*ListBox) SetCursor added in v1.0.14

func (w *ListBox) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*ListBox) SetCursorM added in v1.0.16

func (w *ListBox) SetCursorM(value string) *ListBox

SetCursorM is like Cursor but panics on error

func (*ListBox) SetDisabledForeground added in v1.0.14

func (w *ListBox) SetDisabledForeground(value string) error

DisabledForeground reports 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.

func (*ListBox) SetDisabledForegroundM added in v1.0.16

func (w *ListBox) SetDisabledForegroundM(value string) *ListBox

SetDisabledForegroundM is like DisabledForeground but panics on error

func (*ListBox) SetExportSelection added in v1.0.14

func (w *ListBox) SetExportSelection(value bool) error

ExportSelection 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 \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*ListBox) SetExportSelectionM added in v1.0.16

func (w *ListBox) SetExportSelectionM(value bool) *ListBox

ExportSelectionM is like ExportSelection but panics on error.

func (*ListBox) SetFont added in v1.0.14

func (w *ListBox) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*ListBox) SetFontM added in v1.0.16

func (w *ListBox) SetFontM(value string) *ListBox

SetFontM is like Font but panics on error

func (*ListBox) SetForeground added in v1.0.14

func (w *ListBox) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*ListBox) SetForegroundM added in v1.0.16

func (w *ListBox) SetForegroundM(value string) *ListBox

SetForegroundM is like Foreground but panics on error

func (*ListBox) SetGrid added in v1.0.14

func (w *ListBox) SetGrid() (string, error)

SetGrid reports a boolean value that determines whether this widget controls the resizing grid for its top-level window. This option is typically used in text widgets, where the information in the widget has a natural size (the size of a character) and it makes sense for the window's dimensions to be integral numbers of these units. These natural window sizes form a grid. If the \fB-setgrid\fR option is set to true then the widget will communicate with the window manager so that when the user interactively resizes the top-level window that contains the widget, the dimensions of the window will be displayed to the user in grid units and the window size will be constrained to integral numbers of grid units. See the section \fBGRIDDED GEOMETRY MANAGEMENT\fR in the \fBwm\fR manual entry for more details.

func (*ListBox) SetGridM added in v1.0.16

func (w *ListBox) SetGridM() string

SetGridM is like SetGrid but panics on error.

func (*ListBox) SetHeight added in v1.0.14

func (w *ListBox) SetHeight(value string) error

Height reports 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.

func (*ListBox) SetHeightM added in v1.0.16

func (w *ListBox) SetHeightM(value string) *ListBox

SetHeightM is like Height but panics on error

func (*ListBox) SetHighlightBackground added in v1.0.14

func (w *ListBox) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*ListBox) SetHighlightBackgroundM added in v1.0.16

func (w *ListBox) SetHighlightBackgroundM(value string) *ListBox

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*ListBox) SetHighlightColor added in v1.0.14

func (w *ListBox) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*ListBox) SetHighlightColorM added in v1.0.16

func (w *ListBox) SetHighlightColorM(value string) *ListBox

SetHighlightColorM is like HighlightColor but panics on error

func (*ListBox) SetHighlightThickness added in v1.0.14

func (w *ListBox) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*ListBox) SetHighlightThicknessM added in v1.0.16

func (w *ListBox) SetHighlightThicknessM(value string) *ListBox

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*ListBox) SetJustify added in v1.0.14

func (w *ListBox) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*ListBox) SetJustifyM added in v1.0.16

func (w *ListBox) SetJustifyM(value string) *ListBox

SetJustifyM is like Justify but panics on error

func (*ListBox) SetListVariable added in v1.0.15

func (w *ListBox) SetListVariable(value string) error

ListVariable reports 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 \fB-listvariable\fR will cause an error. Attempts to unset a variable in use as a \fB-listvariable\fR will fail but will not generate an error.

func (*ListBox) SetListVariableM added in v1.0.16

func (w *ListBox) SetListVariableM(value string) *ListBox

SetListVariableM is like ListVariable but panics on error

func (*ListBox) SetRelief added in v1.0.14

func (w *ListBox) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*ListBox) SetReliefM added in v1.0.16

func (w *ListBox) SetReliefM(value string) *ListBox

SetReliefM is like Relief but panics on error

func (*ListBox) SetSelectBackground added in v1.0.14

func (w *ListBox) SetSelectBackground(value string) error

SelectBackground reports the background color to use when displaying selected items.

func (*ListBox) SetSelectBackgroundM added in v1.0.16

func (w *ListBox) SetSelectBackgroundM(value string) *ListBox

SetSelectBackgroundM is like SelectBackground but panics on error

func (*ListBox) SetSelectBorderWidth added in v1.0.17

func (w *ListBox) SetSelectBorderWidth(value string) error

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*ListBox) SetSelectBorderWidthM added in v1.0.17

func (w *ListBox) SetSelectBorderWidthM(value string) *ListBox

SetSelectBorderWidthM is like SelectBorderWidth but panics on error

func (*ListBox) SetSelectForeground added in v1.0.14

func (w *ListBox) SetSelectForeground(value string) error

SelectForeground reports the foreground color to use when displaying selected items.

func (*ListBox) SetSelectForegroundM added in v1.0.16

func (w *ListBox) SetSelectForegroundM(value string) *ListBox

SetSelectForegroundM is like SelectForeground but panics on error

func (*ListBox) SetSelectMode added in v1.0.14

func (w *ListBox) SetSelectMode(value string) error

SelectMode reports 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 \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or \fBextended\fR; the default value is \fBbrowse\fR.

func (*ListBox) SetSelectModeM added in v1.0.16

func (w *ListBox) SetSelectModeM(value string) *ListBox

SetSelectModeM is like SelectMode but panics on error

func (*ListBox) SetSetGrid added in v1.0.14

func (w *ListBox) SetSetGrid(value string) error

SetGrid reports a boolean value that determines whether this widget controls the resizing grid for its top-level window. This option is typically used in text widgets, where the information in the widget has a natural size (the size of a character) and it makes sense for the window's dimensions to be integral numbers of these units. These natural window sizes form a grid. If the \fB-setgrid\fR option is set to true then the widget will communicate with the window manager so that when the user interactively resizes the top-level window that contains the widget, the dimensions of the window will be displayed to the user in grid units and the window size will be constrained to integral numbers of grid units. See the section \fBGRIDDED GEOMETRY MANAGEMENT\fR in the \fBwm\fR manual entry for more details.

func (*ListBox) SetSetGridM added in v1.0.16

func (w *ListBox) SetSetGridM(value string) *ListBox

SetSetGridM is like SetGrid but panics on error

func (*ListBox) SetState added in v1.0.14

func (w *ListBox) SetState(value string) error

State reports one of two states for the listbox: \fBnormal\fR or \fBdisabled\fR. If the listbox is disabled then items may not be inserted or deleted, items are drawn in the \fB-disabledforeground\fR color, and selection cannot be modified and is not shown (though selection information is retained).

func (*ListBox) SetStateM added in v1.0.16

func (w *ListBox) SetStateM(value string) *ListBox

SetStateM is like State but panics on error

func (*ListBox) SetTakeFocus added in v1.0.14

func (w *ListBox) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*ListBox) SetTakeFocusM added in v1.0.16

func (w *ListBox) SetTakeFocusM(value string) *ListBox

SetTakeFocusM is like TakeFocus but panics on error

func (*ListBox) SetWidth added in v1.0.14

func (w *ListBox) SetWidth(value string) error

Width reports the desired width for the window in characters. If the font does not have a uniform width then the width of the character TODO .QW(0) 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.

func (*ListBox) SetWidthM added in v1.0.16

func (w *ListBox) SetWidthM(value string) *ListBox

SetWidthM is like Width but panics on error

func (*ListBox) SetXScrollCommand added in v1.0.14

func (w *ListBox) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*ListBox) SetXScrollCommandM added in v1.0.16

func (w *ListBox) SetXScrollCommandM(value Command) *ListBox

SetXScrollCommandM is like XScrollCommand but panics on error

func (*ListBox) SetYScrollCommand added in v1.0.17

func (w *ListBox) SetYScrollCommand(value Command) error

YScrollCommand specifies the prefix for a command used to communicate with vertical scrollbars. This option is treated in the same way as the \fB-xscrollcommand\fR option, except that it is used for vertical scrollbars and is provided by widgets that support vertical scrolling. See the description of \fB-xscrollcommand\fR for details on how this option is used.

func (*ListBox) SetYScrollCommandM added in v1.0.17

func (w *ListBox) SetYScrollCommandM(value Command) *ListBox

SetYScrollCommandM is like YScrollCommand but panics on error

func (*ListBox) State added in v1.0.14

func (w *ListBox) State() (string, error)

State reports one of two states for the listbox: \fBnormal\fR or \fBdisabled\fR. If the listbox is disabled then items may not be inserted or deleted, items are drawn in the \fB-disabledforeground\fR color, and selection cannot be modified and is not shown (though selection information is retained).

func (*ListBox) StateM added in v1.0.16

func (w *ListBox) StateM() string

StateM is like State but panics on error.

func (*ListBox) TakeFocus added in v1.0.14

func (w *ListBox) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*ListBox) TakeFocusM added in v1.0.16

func (w *ListBox) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*ListBox) Width added in v1.0.14

func (w *ListBox) Width() (string, error)

Width reports the desired width for the window in characters. If the font does not have a uniform width then the width of the character TODO .QW(0) 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.

func (*ListBox) WidthM added in v1.0.16

func (w *ListBox) WidthM() string

WidthM is like Width but panics on error.

type Menu struct {
	Window
}

Menu represents the Tk menu widget.

func (w *Menu) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (w *Menu) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (w *Menu) ActiveBorderWidth() (string, error)

ActiveBorderWidth reports 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 \fBTk_GetPixels\fR. This option is typically only available in widgets displaying more than one element at a time (e.g. menus but not buttons).

func (w *Menu) ActiveBorderWidthM() string

ActiveBorderWidthM is like ActiveBorderWidth but panics on error.

func (w *Menu) ActiveForeground() (string, error)

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (w *Menu) ActiveForegroundM() string

ActiveForegroundM is like ActiveForeground but panics on error.

func (w *Menu) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (w *Menu) BackgroundM() string

BackgroundM is like Background but panics on error.

func (w *Menu) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (w *Menu) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (w *Menu) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (w *Menu) CursorM() string

CursorM is like Cursor but panics on error.

func (w *Menu) DisabledForeground() (string, error)

DisabledForeground reports 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.

func (w *Menu) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (w *Menu) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (w *Menu) FontM() string

FontM is like Font but panics on error.

func (w *Menu) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (w *Menu) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (w *Menu) PostCommand() (string, error)

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 \fBpost\fR 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.

func (w *Menu) PostCommandM() string

PostCommandM is like PostCommand but panics on error.

func (w *Menu) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (w *Menu) ReliefM() string

ReliefM is like Relief but panics on error.

func (w *Menu) SelectColor() (string, error)

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.

func (w *Menu) SelectColorM() string

SelectColorM is like SelectColor but panics on error.

func (w *Menu) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (w *Menu) SetActiveBackgroundM(value string) *Menu

SetActiveBackgroundM is like ActiveBackground but panics on error

func (w *Menu) SetActiveBorderWidth(value string) error

ActiveBorderWidth reports 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 \fBTk_GetPixels\fR. This option is typically only available in widgets displaying more than one element at a time (e.g. menus but not buttons).

func (w *Menu) SetActiveBorderWidthM(value string) *Menu

SetActiveBorderWidthM is like ActiveBorderWidth but panics on error

func (w *Menu) SetActiveForeground(value string) error

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (w *Menu) SetActiveForegroundM(value string) *Menu

SetActiveForegroundM is like ActiveForeground but panics on error

func (w *Menu) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (w *Menu) SetBackgroundM(value string) *Menu

SetBackgroundM is like Background but panics on error

func (w *Menu) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (w *Menu) SetBorderWidthM(value string) *Menu

SetBorderWidthM is like BorderWidth but panics on error

func (w *Menu) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (w *Menu) SetCursorM(value string) *Menu

SetCursorM is like Cursor but panics on error

func (w *Menu) SetDisabledForeground(value string) error

DisabledForeground reports 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.

func (w *Menu) SetDisabledForegroundM(value string) *Menu

SetDisabledForegroundM is like DisabledForeground but panics on error

func (w *Menu) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (w *Menu) SetFontM(value string) *Menu

SetFontM is like Font but panics on error

func (w *Menu) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (w *Menu) SetForegroundM(value string) *Menu

SetForegroundM is like Foreground but panics on error

func (w *Menu) SetPostCommand(value string) error

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 \fBpost\fR 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.

func (w *Menu) SetPostCommandM(value string) *Menu

SetPostCommandM is like PostCommand but panics on error

func (w *Menu) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (w *Menu) SetReliefM(value string) *Menu

SetReliefM is like Relief but panics on error

func (w *Menu) SetSelectColor(value string) error

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.

func (w *Menu) SetSelectColorM(value string) *Menu

SetSelectColorM is like SelectColor but panics on error

func (w *Menu) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (w *Menu) SetTakeFocusM(value string) *Menu

SetTakeFocusM is like TakeFocus but panics on error

func (w *Menu) SetTearOff(value string) error

This option must have a proper boolean value, 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.

func (w *Menu) SetTearOffCommand(value string) error

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 TODO .QW("\fBa b\fR") and menu \fB.x.y\fR is torn off to create a new menu \fB.x.tearoff1\fR, then the command TODO .QW("\fBa b .x.y .x.tearoff1\fR") will be invoked. This option is ignored under Aqua/MacOS, where menus cannot be torn off.

func (w *Menu) SetTearOffCommandM(value string) *Menu

SetTearOffCommandM is like TearOffCommand but panics on error

func (w *Menu) SetTearOffM(value string) *Menu

SetTearOffM is like TearOff but panics on error

func (w *Menu) SetTitle(value string) error

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.

func (w *Menu) SetTitleM(value string) *Menu

SetTitleM is like Title but panics on error

func (w *Menu) SetType(value string) error

This option can be one of \fBmenubar\fR, \fBtearoff\fR, or \fBnormal\fR, 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 (w *Menu) SetTypeM(value string) *Menu

SetTypeM is like Type but panics on error

func (w *Menu) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (w *Menu) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (w *Menu) TearOff() (string, error)

This option must have a proper boolean value, 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.

func (w *Menu) TearOffCommand() (string, error)

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 TODO .QW("\fBa b\fR") and menu \fB.x.y\fR is torn off to create a new menu \fB.x.tearoff1\fR, then the command TODO .QW("\fBa b .x.y .x.tearoff1\fR") will be invoked. This option is ignored under Aqua/MacOS, where menus cannot be torn off.

func (w *Menu) TearOffCommandM() string

TearOffCommandM is like TearOffCommand but panics on error.

func (w *Menu) TearOffM() string

TearOffM is like TearOff but panics on error.

func (w *Menu) Title() (string, error)

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.

func (w *Menu) TitleM() string

TitleM is like Title but panics on error.

func (w *Menu) Type() (string, error)

This option can be one of \fBmenubar\fR, \fBtearoff\fR, or \fBnormal\fR, 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 (w *Menu) TypeM() string

TypeM is like Type but panics on error.

type MenuButton struct {
	Window
}

MenuButton represents the Tk menubutton widget.

func (w *MenuButton) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (w *MenuButton) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (w *MenuButton) ActiveForeground() (string, error)

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (w *MenuButton) ActiveForegroundM() string

ActiveForegroundM is like ActiveForeground but panics on error.

func (w *MenuButton) Anchor() (string, error)

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (w *MenuButton) AnchorM() string

AnchorM is like Anchor but panics on error.

func (w *MenuButton) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (w *MenuButton) BackgroundM() string

BackgroundM is like Background but panics on error.

func (w *MenuButton) Bitmap() (string, error)

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (w *MenuButton) BitmapM() string

BitmapM is like Bitmap but panics on error.

func (w *MenuButton) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (w *MenuButton) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (w *MenuButton) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (w *MenuButton) CompoundM() string

CompoundM is like Compound but panics on error.

func (w *MenuButton) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (w *MenuButton) CursorM() string

CursorM is like Cursor but panics on error.

func (w *MenuButton) Direction() (string, error)

Direction reports where the menu is going to be popup up. \fBabove\fR tries to pop the menu above the menubutton. \fBbelow\fR tries to pop the menu below the menubutton. \fBleft\fR tries to pop the menu to the left of the menubutton. \fBright\fR tries to pop the menu to the right of the menu button. \fBflush\fR pops the menu directly over the menubutton. In the case of \fBabove\fR or \fBbelow\fR, the direction will be reversed if the menu would show offscreen.

func (w *MenuButton) DirectionM() string

DirectionM is like Direction but panics on error.

func (w *MenuButton) DisabledForeground() (string, error)

DisabledForeground reports 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.

func (w *MenuButton) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (w *MenuButton) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (w *MenuButton) FontM() string

FontM is like Font but panics on error.

func (w *MenuButton) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (w *MenuButton) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (w *MenuButton) Height() (string, error)

Height reports 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 \fBTk_GetPixels\fR); 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.

func (w *MenuButton) HeightM() string

HeightM is like Height but panics on error.

func (w *MenuButton) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (w *MenuButton) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (w *MenuButton) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (w *MenuButton) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (w *MenuButton) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (w *MenuButton) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (w *MenuButton) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (w *MenuButton) ImageM() string

ImageM is like Image but panics on error.

func (w *MenuButton) Indicatoron() (string, error)

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.

func (w *MenuButton) IndicatoronM() string

IndicatoronM is like Indicatoron but panics on error.

func (w *MenuButton) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (w *MenuButton) JustifyM() string

JustifyM is like Justify but panics on error.

func (w *MenuButton) Menu() (string, error)

Menu reports the path name of the menu associated with this menubutton. The menu must be a child of the menubutton.

func (w *MenuButton) MenuM() string

MenuM is like Menu but panics on error.

func (w *MenuButton) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (w *MenuButton) PadXM() string

PadXM is like PadX but panics on error.

func (w *MenuButton) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (w *MenuButton) PadYM() string

PadYM is like PadY but panics on error.

func (w *MenuButton) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (w *MenuButton) ReliefM() string

ReliefM is like Relief but panics on error.

func (w *MenuButton) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (w *MenuButton) SetActiveBackgroundM(value string) *MenuButton

SetActiveBackgroundM is like ActiveBackground but panics on error

func (w *MenuButton) SetActiveForeground(value string) error

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (w *MenuButton) SetActiveForegroundM(value string) *MenuButton

SetActiveForegroundM is like ActiveForeground but panics on error

func (w *MenuButton) SetAnchor(value string) error

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (w *MenuButton) SetAnchorM(value string) *MenuButton

SetAnchorM is like Anchor but panics on error

func (w *MenuButton) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (w *MenuButton) SetBackgroundM(value string) *MenuButton

SetBackgroundM is like Background but panics on error

func (w *MenuButton) SetBitmap(value string) error

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (w *MenuButton) SetBitmapM(value string) *MenuButton

SetBitmapM is like Bitmap but panics on error

func (w *MenuButton) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (w *MenuButton) SetBorderWidthM(value string) *MenuButton

SetBorderWidthM is like BorderWidth but panics on error

func (w *MenuButton) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (w *MenuButton) SetCompoundM(value string) *MenuButton

SetCompoundM is like Compound but panics on error

func (w *MenuButton) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (w *MenuButton) SetCursorM(value string) *MenuButton

SetCursorM is like Cursor but panics on error

func (w *MenuButton) SetDirection(value string) error

Direction reports where the menu is going to be popup up. \fBabove\fR tries to pop the menu above the menubutton. \fBbelow\fR tries to pop the menu below the menubutton. \fBleft\fR tries to pop the menu to the left of the menubutton. \fBright\fR tries to pop the menu to the right of the menu button. \fBflush\fR pops the menu directly over the menubutton. In the case of \fBabove\fR or \fBbelow\fR, the direction will be reversed if the menu would show offscreen.

func (w *MenuButton) SetDirectionM(value string) *MenuButton

SetDirectionM is like Direction but panics on error

func (w *MenuButton) SetDisabledForeground(value string) error

DisabledForeground reports 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.

func (w *MenuButton) SetDisabledForegroundM(value string) *MenuButton

SetDisabledForegroundM is like DisabledForeground but panics on error

func (w *MenuButton) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (w *MenuButton) SetFontM(value string) *MenuButton

SetFontM is like Font but panics on error

func (w *MenuButton) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (w *MenuButton) SetForegroundM(value string) *MenuButton

SetForegroundM is like Foreground but panics on error

func (w *MenuButton) SetHeight(value string) error

Height reports 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 \fBTk_GetPixels\fR); 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.

func (w *MenuButton) SetHeightM(value string) *MenuButton

SetHeightM is like Height but panics on error

func (w *MenuButton) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (w *MenuButton) SetHighlightBackgroundM(value string) *MenuButton

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (w *MenuButton) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (w *MenuButton) SetHighlightColorM(value string) *MenuButton

SetHighlightColorM is like HighlightColor but panics on error

func (w *MenuButton) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (w *MenuButton) SetHighlightThicknessM(value string) *MenuButton

SetHighlightThicknessM is like HighlightThickness but panics on error

func (w *MenuButton) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (w *MenuButton) SetImageM(value string) *MenuButton

SetImageM is like Image but panics on error

func (w *MenuButton) SetIndicatoron(value string) error

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.

func (w *MenuButton) SetIndicatoronM(value string) *MenuButton

SetIndicatoronM is like Indicatoron but panics on error

func (w *MenuButton) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (w *MenuButton) SetJustifyM(value string) *MenuButton

SetJustifyM is like Justify but panics on error

func (w *MenuButton) SetMenu(value string) error

Menu reports the path name of the menu associated with this menubutton. The menu must be a child of the menubutton.

func (w *MenuButton) SetMenuM(value string) *MenuButton

SetMenuM is like Menu but panics on error

func (w *MenuButton) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (w *MenuButton) SetPadXM(value string) *MenuButton

SetPadXM is like PadX but panics on error

func (w *MenuButton) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (w *MenuButton) SetPadYM(value string) *MenuButton

SetPadYM is like PadY but panics on error

func (w *MenuButton) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (w *MenuButton) SetReliefM(value string) *MenuButton

SetReliefM is like Relief but panics on error

func (w *MenuButton) SetState(value string) error

State reports one of three states for the menubutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the menubutton is displayed using the \fBforeground\fR and \fBbackground\fR options. The active state is typically used when the pointer is over the menubutton. In active state the menubutton is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR 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 \fB-disabledforeground\fR and \fB-background\fR options determine how the button is displayed.

func (w *MenuButton) SetStateM(value string) *MenuButton

SetStateM is like State but panics on error

func (w *MenuButton) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (w *MenuButton) SetTakeFocusM(value string) *MenuButton

SetTakeFocusM is like TakeFocus but panics on error

func (w *MenuButton) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (w *MenuButton) SetTextM(value string) *MenuButton

SetTextM is like Text but panics on error

func (w *MenuButton) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (w *MenuButton) SetTextVariableM(value string) *MenuButton

SetTextVariableM is like TextVariable but panics on error

func (w *MenuButton) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (w *MenuButton) SetUnderlineM(value string) *MenuButton

SetUnderlineM is like Underline but panics on error

func (w *MenuButton) SetWidth(value string) error

Width reports 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 \fBTk_GetPixels\fR); 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.

func (w *MenuButton) SetWidthM(value string) *MenuButton

SetWidthM is like Width but panics on error

func (w *MenuButton) SetWrapLength(value string) error

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (w *MenuButton) SetWrapLengthM(value string) *MenuButton

SetWrapLengthM is like WrapLength but panics on error

func (w *MenuButton) State() (string, error)

State reports one of three states for the menubutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the menubutton is displayed using the \fBforeground\fR and \fBbackground\fR options. The active state is typically used when the pointer is over the menubutton. In active state the menubutton is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR 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 \fB-disabledforeground\fR and \fB-background\fR options determine how the button is displayed.

func (w *MenuButton) StateM() string

StateM is like State but panics on error.

func (w *MenuButton) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (w *MenuButton) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (w *MenuButton) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (w *MenuButton) TextM() string

TextM is like Text but panics on error.

func (w *MenuButton) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (w *MenuButton) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (w *MenuButton) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (w *MenuButton) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (w *MenuButton) Width() (string, error)

Width reports 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 \fBTk_GetPixels\fR); 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.

func (w *MenuButton) WidthM() string

WidthM is like Width but panics on error.

func (w *MenuButton) WrapLength() (string, error)

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (w *MenuButton) WrapLengthM() string

WrapLengthM is like WrapLength but panics on error.

type Message added in v1.0.13

type Message struct {
	Window
}

Message represents the Tk message widget.

func (*Message) Anchor added in v1.0.14

func (w *Message) Anchor() (string, error)

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*Message) AnchorM added in v1.0.16

func (w *Message) AnchorM() string

AnchorM is like Anchor but panics on error.

func (*Message) Aspect added in v1.0.14

func (w *Message) Aspect() (string, error)

Aspect reports 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 \fB-width\fR option is not specified. Defaults to 150.

func (*Message) AspectM added in v1.0.16

func (w *Message) AspectM() string

AspectM is like Aspect but panics on error.

func (*Message) Background added in v1.0.14

func (w *Message) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Message) BackgroundM added in v1.0.16

func (w *Message) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Message) BorderWidth added in v1.0.14

func (w *Message) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Message) BorderWidthM added in v1.0.16

func (w *Message) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Message) Cursor added in v1.0.14

func (w *Message) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Message) CursorM added in v1.0.16

func (w *Message) CursorM() string

CursorM is like Cursor but panics on error.

func (*Message) Font added in v1.0.14

func (w *Message) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Message) FontM added in v1.0.16

func (w *Message) FontM() string

FontM is like Font but panics on error.

func (*Message) Foreground added in v1.0.14

func (w *Message) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*Message) ForegroundM added in v1.0.16

func (w *Message) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*Message) HighlightBackground added in v1.0.14

func (w *Message) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Message) HighlightBackgroundM added in v1.0.16

func (w *Message) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Message) HighlightColor added in v1.0.14

func (w *Message) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Message) HighlightColorM added in v1.0.16

func (w *Message) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Message) HighlightThickness added in v1.0.14

func (w *Message) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Message) HighlightThicknessM added in v1.0.16

func (w *Message) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Message) Justify added in v1.0.14

func (w *Message) Justify() (string, error)

Justify reports how to justify lines of text. Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR. Defaults to \fBleft\fR. This option works together with the \fB-anchor\fR, \fB-aspect\fR, \fB-padx\fR, \fB-pady\fR, and \fB-width\fR options to provide a variety of arrangements of the text within the window. The \fB-aspect\fR and \fB-width\fR options determine the amount of screen space needed to display the text. The \fB-anchor\fR, \fB-padx\fR, and \fB-pady\fR options determine where this rectangular area is displayed within the widget's window, and the \fB-justify\fR option determines how each line is displayed within that rectangular region. For example, suppose \fB-anchor\fR is \fBe\fR and \fB-justify\fR is \fBleft\fR, 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 \fB-padx\fR from the right side of the window; the entire text block will be centered in the vertical span of the window.

func (*Message) JustifyM added in v1.0.16

func (w *Message) JustifyM() string

JustifyM is like Justify but panics on error.

func (*Message) PadX added in v1.0.14

func (w *Message) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Message) PadXM added in v1.0.16

func (w *Message) PadXM() string

PadXM is like PadX but panics on error.

func (*Message) PadY added in v1.0.14

func (w *Message) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Message) PadYM added in v1.0.16

func (w *Message) PadYM() string

PadYM is like PadY but panics on error.

func (*Message) Relief added in v1.0.14

func (w *Message) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Message) ReliefM added in v1.0.16

func (w *Message) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Message) SetAnchor added in v1.0.14

func (w *Message) SetAnchor(value string) error

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*Message) SetAnchorM added in v1.0.16

func (w *Message) SetAnchorM(value string) *Message

SetAnchorM is like Anchor but panics on error

func (*Message) SetAspect added in v1.0.14

func (w *Message) SetAspect(value string) error

Aspect reports 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 \fB-width\fR option is not specified. Defaults to 150.

func (*Message) SetAspectM added in v1.0.16

func (w *Message) SetAspectM(value string) *Message

SetAspectM is like Aspect but panics on error

func (*Message) SetBackground added in v1.0.14

func (w *Message) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Message) SetBackgroundM added in v1.0.16

func (w *Message) SetBackgroundM(value string) *Message

SetBackgroundM is like Background but panics on error

func (*Message) SetBorderWidth added in v1.0.14

func (w *Message) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Message) SetBorderWidthM added in v1.0.16

func (w *Message) SetBorderWidthM(value string) *Message

SetBorderWidthM is like BorderWidth but panics on error

func (*Message) SetCursor added in v1.0.14

func (w *Message) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Message) SetCursorM added in v1.0.16

func (w *Message) SetCursorM(value string) *Message

SetCursorM is like Cursor but panics on error

func (*Message) SetFont added in v1.0.14

func (w *Message) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Message) SetFontM added in v1.0.16

func (w *Message) SetFontM(value string) *Message

SetFontM is like Font but panics on error

func (*Message) SetForeground added in v1.0.14

func (w *Message) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*Message) SetForegroundM added in v1.0.16

func (w *Message) SetForegroundM(value string) *Message

SetForegroundM is like Foreground but panics on error

func (*Message) SetHighlightBackground added in v1.0.14

func (w *Message) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Message) SetHighlightBackgroundM added in v1.0.16

func (w *Message) SetHighlightBackgroundM(value string) *Message

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Message) SetHighlightColor added in v1.0.14

func (w *Message) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Message) SetHighlightColorM added in v1.0.16

func (w *Message) SetHighlightColorM(value string) *Message

SetHighlightColorM is like HighlightColor but panics on error

func (*Message) SetHighlightThickness added in v1.0.14

func (w *Message) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Message) SetHighlightThicknessM added in v1.0.16

func (w *Message) SetHighlightThicknessM(value string) *Message

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Message) SetJustify added in v1.0.14

func (w *Message) SetJustify(value string) error

Justify reports how to justify lines of text. Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR. Defaults to \fBleft\fR. This option works together with the \fB-anchor\fR, \fB-aspect\fR, \fB-padx\fR, \fB-pady\fR, and \fB-width\fR options to provide a variety of arrangements of the text within the window. The \fB-aspect\fR and \fB-width\fR options determine the amount of screen space needed to display the text. The \fB-anchor\fR, \fB-padx\fR, and \fB-pady\fR options determine where this rectangular area is displayed within the widget's window, and the \fB-justify\fR option determines how each line is displayed within that rectangular region. For example, suppose \fB-anchor\fR is \fBe\fR and \fB-justify\fR is \fBleft\fR, 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 \fB-padx\fR from the right side of the window; the entire text block will be centered in the vertical span of the window.

func (*Message) SetJustifyM added in v1.0.16

func (w *Message) SetJustifyM(value string) *Message

SetJustifyM is like Justify but panics on error

func (*Message) SetPadX added in v1.0.14

func (w *Message) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Message) SetPadXM added in v1.0.16

func (w *Message) SetPadXM(value string) *Message

SetPadXM is like PadX but panics on error

func (*Message) SetPadY added in v1.0.14

func (w *Message) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Message) SetPadYM added in v1.0.16

func (w *Message) SetPadYM(value string) *Message

SetPadYM is like PadY but panics on error

func (*Message) SetRelief added in v1.0.14

func (w *Message) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Message) SetReliefM added in v1.0.16

func (w *Message) SetReliefM(value string) *Message

SetReliefM is like Relief but panics on error

func (*Message) SetTakeFocus added in v1.0.14

func (w *Message) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Message) SetTakeFocusM added in v1.0.16

func (w *Message) SetTakeFocusM(value string) *Message

SetTakeFocusM is like TakeFocus but panics on error

func (*Message) SetText added in v1.0.13

func (w *Message) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Message) SetTextM added in v1.0.16

func (w *Message) SetTextM(value string) *Message

SetTextM is like Text but panics on error

func (*Message) SetTextVariable added in v1.0.15

func (w *Message) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Message) SetTextVariableM added in v1.0.16

func (w *Message) SetTextVariableM(value string) *Message

SetTextVariableM is like TextVariable but panics on error

func (*Message) SetWidth added in v1.0.14

func (w *Message) SetWidth(value string) error

Width reports the length of lines in the window. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If this option has a value greater than zero then the \fB-aspect\fR option is ignored and the \fB-width\fR option determines the line length. If this option has a value less than or equal to zero, then the \fB-aspect\fR option determines the line length.

func (*Message) SetWidthM added in v1.0.16

func (w *Message) SetWidthM(value string) *Message

SetWidthM is like Width but panics on error

func (*Message) TakeFocus added in v1.0.14

func (w *Message) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Message) TakeFocusM added in v1.0.16

func (w *Message) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Message) Text added in v1.0.13

func (w *Message) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Message) TextM added in v1.0.16

func (w *Message) TextM() string

TextM is like Text but panics on error.

func (*Message) TextVariable added in v1.0.15

func (w *Message) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*Message) TextVariableM added in v1.0.16

func (w *Message) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*Message) Width added in v1.0.14

func (w *Message) Width() (string, error)

Width reports the length of lines in the window. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If this option has a value greater than zero then the \fB-aspect\fR option is ignored and the \fB-width\fR option determines the line length. If this option has a value less than or equal to zero, then the \fB-aspect\fR option determines the line length.

func (*Message) WidthM added in v1.0.16

func (w *Message) WidthM() string

WidthM is like Width but panics on error.

type PanedWindow added in v1.0.14

type PanedWindow struct {
	Window
}

PanedWindow represents the Tk panedwindow widget.

func (*PanedWindow) Background added in v1.0.14

func (w *PanedWindow) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*PanedWindow) BackgroundM added in v1.0.16

func (w *PanedWindow) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*PanedWindow) BorderWidth added in v1.0.14

func (w *PanedWindow) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*PanedWindow) BorderWidthM added in v1.0.16

func (w *PanedWindow) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*PanedWindow) Cursor added in v1.0.14

func (w *PanedWindow) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*PanedWindow) CursorM added in v1.0.16

func (w *PanedWindow) CursorM() string

CursorM is like Cursor but panics on error.

func (*PanedWindow) HandlePad added in v1.0.14

func (w *PanedWindow) HandlePad() (string, error)

When sash handles are drawn, specifies the distance from the top or left end of the sash (depending on the orientation of the widget) at which to draw the handle. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) HandlePadM added in v1.0.16

func (w *PanedWindow) HandlePadM() string

HandlePadM is like HandlePad but panics on error.

func (*PanedWindow) HandleSize added in v1.0.14

func (w *PanedWindow) HandleSize() (string, error)

HandleSize reports the side length of a sash handle. Handles are always drawn as squares. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) HandleSizeM added in v1.0.16

func (w *PanedWindow) HandleSizeM() string

HandleSizeM is like HandleSize but panics on error.

func (*PanedWindow) Height added in v1.0.14

func (w *PanedWindow) Height() (string, error)

Height reports a desired height for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height.

func (*PanedWindow) HeightM added in v1.0.16

func (w *PanedWindow) HeightM() string

HeightM is like Height but panics on error.

func (*PanedWindow) OpaqueResize added in v1.0.14

func (w *PanedWindow) OpaqueResize() (string, error)

OpaqueResize reports whether panes should be resized as a sash is moved (true), or if resizing should be deferred until the sash is placed (false). In the latter case, a TODO .QW(ghost) version of the sash is displayed during the resizing to show where the panes will be resized to when releasing the mouse button. This TODO .QW(ghost) version of the sash is the proxy. It's rendering can be configured using the \fB-proxybackground\fR, \fB-proxyborderwidth\fR and \fB-proxyrelief\fR options.

func (*PanedWindow) OpaqueResizeM added in v1.0.16

func (w *PanedWindow) OpaqueResizeM() string

OpaqueResizeM is like OpaqueResize but panics on error.

func (*PanedWindow) Orient added in v1.0.14

func (w *PanedWindow) Orient() (string, error)

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 \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*PanedWindow) OrientM added in v1.0.16

func (w *PanedWindow) OrientM() string

OrientM is like Orient but panics on error.

func (*PanedWindow) ProxyBackground added in v1.0.14

func (w *PanedWindow) ProxyBackground() (string, error)

Background color to use when drawing the proxy. If an empty string, the value of the \fB-background\fR option will be used.

func (*PanedWindow) ProxyBackgroundM added in v1.0.16

func (w *PanedWindow) ProxyBackgroundM() string

ProxyBackgroundM is like ProxyBackground but panics on error.

func (*PanedWindow) ProxyBorderWidth added in v1.0.14

func (w *PanedWindow) ProxyBorderWidth() (string, error)

ProxyBorderWidth reports the borderwidth of the proxy. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) ProxyBorderWidthM added in v1.0.16

func (w *PanedWindow) ProxyBorderWidthM() string

ProxyBorderWidthM is like ProxyBorderWidth but panics on error.

func (*PanedWindow) ProxyRelief added in v1.0.14

func (w *PanedWindow) ProxyRelief() (string, error)

Relief to use when drawing the proxy. May be any of the standard Tk relief values. If an empty string, the value of the \fB-sashrelief\fR option will be used.

func (*PanedWindow) ProxyReliefM added in v1.0.16

func (w *PanedWindow) ProxyReliefM() string

ProxyReliefM is like ProxyRelief but panics on error.

func (*PanedWindow) Relief added in v1.0.14

func (w *PanedWindow) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*PanedWindow) ReliefM added in v1.0.16

func (w *PanedWindow) ReliefM() string

ReliefM is like Relief but panics on error.

func (*PanedWindow) SashCursor added in v1.0.14

func (w *PanedWindow) SashCursor() (string, error)

Mouse cursor to use when over a sash. If null, \fBsb_h_double_arrow\fR will be used for horizontal panedwindows, and \fBsb_v_double_arrow\fR will be used for vertical panedwindows.

func (*PanedWindow) SashCursorM added in v1.0.16

func (w *PanedWindow) SashCursorM() string

SashCursorM is like SashCursor but panics on error.

func (*PanedWindow) SashPad added in v1.0.14

func (w *PanedWindow) SashPad() (string, error)

SashPad reports the amount of padding to leave of each side of a sash. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) SashPadM added in v1.0.16

func (w *PanedWindow) SashPadM() string

SashPadM is like SashPad but panics on error.

func (*PanedWindow) SashRelief added in v1.0.14

func (w *PanedWindow) SashRelief() (string, error)

Relief to use when drawing a sash. May be any of the standard Tk relief values.

func (*PanedWindow) SashReliefM added in v1.0.16

func (w *PanedWindow) SashReliefM() string

SashReliefM is like SashRelief but panics on error.

func (*PanedWindow) SashWidth added in v1.0.14

func (w *PanedWindow) SashWidth() (string, error)

SashWidth reports the width of each sash. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) SashWidthM added in v1.0.16

func (w *PanedWindow) SashWidthM() string

SashWidthM is like SashWidth but panics on error.

func (*PanedWindow) SetBackground added in v1.0.14

func (w *PanedWindow) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*PanedWindow) SetBackgroundM added in v1.0.16

func (w *PanedWindow) SetBackgroundM(value string) *PanedWindow

SetBackgroundM is like Background but panics on error

func (*PanedWindow) SetBorderWidth added in v1.0.14

func (w *PanedWindow) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*PanedWindow) SetBorderWidthM added in v1.0.16

func (w *PanedWindow) SetBorderWidthM(value string) *PanedWindow

SetBorderWidthM is like BorderWidth but panics on error

func (*PanedWindow) SetCursor added in v1.0.14

func (w *PanedWindow) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*PanedWindow) SetCursorM added in v1.0.16

func (w *PanedWindow) SetCursorM(value string) *PanedWindow

SetCursorM is like Cursor but panics on error

func (*PanedWindow) SetHandlePad added in v1.0.14

func (w *PanedWindow) SetHandlePad(value string) error

When sash handles are drawn, specifies the distance from the top or left end of the sash (depending on the orientation of the widget) at which to draw the handle. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) SetHandlePadM added in v1.0.16

func (w *PanedWindow) SetHandlePadM(value string) *PanedWindow

SetHandlePadM is like HandlePad but panics on error

func (*PanedWindow) SetHandleSize added in v1.0.14

func (w *PanedWindow) SetHandleSize(value string) error

HandleSize reports the side length of a sash handle. Handles are always drawn as squares. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) SetHandleSizeM added in v1.0.16

func (w *PanedWindow) SetHandleSizeM(value string) *PanedWindow

SetHandleSizeM is like HandleSize but panics on error

func (*PanedWindow) SetHeight added in v1.0.14

func (w *PanedWindow) SetHeight(value string) error

Height reports a desired height for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height.

func (*PanedWindow) SetHeightM added in v1.0.16

func (w *PanedWindow) SetHeightM(value string) *PanedWindow

SetHeightM is like Height but panics on error

func (*PanedWindow) SetOpaqueResize added in v1.0.14

func (w *PanedWindow) SetOpaqueResize(value string) error

OpaqueResize reports whether panes should be resized as a sash is moved (true), or if resizing should be deferred until the sash is placed (false). In the latter case, a TODO .QW(ghost) version of the sash is displayed during the resizing to show where the panes will be resized to when releasing the mouse button. This TODO .QW(ghost) version of the sash is the proxy. It's rendering can be configured using the \fB-proxybackground\fR, \fB-proxyborderwidth\fR and \fB-proxyrelief\fR options.

func (*PanedWindow) SetOpaqueResizeM added in v1.0.16

func (w *PanedWindow) SetOpaqueResizeM(value string) *PanedWindow

SetOpaqueResizeM is like OpaqueResize but panics on error

func (*PanedWindow) SetOrient added in v1.0.14

func (w *PanedWindow) SetOrient(value string) error

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 \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*PanedWindow) SetOrientM added in v1.0.16

func (w *PanedWindow) SetOrientM(value string) *PanedWindow

SetOrientM is like Orient but panics on error

func (*PanedWindow) SetProxyBackground added in v1.0.14

func (w *PanedWindow) SetProxyBackground(value string) error

Background color to use when drawing the proxy. If an empty string, the value of the \fB-background\fR option will be used.

func (*PanedWindow) SetProxyBackgroundM added in v1.0.16

func (w *PanedWindow) SetProxyBackgroundM(value string) *PanedWindow

SetProxyBackgroundM is like ProxyBackground but panics on error

func (*PanedWindow) SetProxyBorderWidth added in v1.0.14

func (w *PanedWindow) SetProxyBorderWidth(value string) error

ProxyBorderWidth reports the borderwidth of the proxy. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) SetProxyBorderWidthM added in v1.0.16

func (w *PanedWindow) SetProxyBorderWidthM(value string) *PanedWindow

SetProxyBorderWidthM is like ProxyBorderWidth but panics on error

func (*PanedWindow) SetProxyRelief added in v1.0.14

func (w *PanedWindow) SetProxyRelief(value string) error

Relief to use when drawing the proxy. May be any of the standard Tk relief values. If an empty string, the value of the \fB-sashrelief\fR option will be used.

func (*PanedWindow) SetProxyReliefM added in v1.0.16

func (w *PanedWindow) SetProxyReliefM(value string) *PanedWindow

SetProxyReliefM is like ProxyRelief but panics on error

func (*PanedWindow) SetRelief added in v1.0.14

func (w *PanedWindow) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*PanedWindow) SetReliefM added in v1.0.16

func (w *PanedWindow) SetReliefM(value string) *PanedWindow

SetReliefM is like Relief but panics on error

func (*PanedWindow) SetSashCursor added in v1.0.14

func (w *PanedWindow) SetSashCursor(value string) error

Mouse cursor to use when over a sash. If null, \fBsb_h_double_arrow\fR will be used for horizontal panedwindows, and \fBsb_v_double_arrow\fR will be used for vertical panedwindows.

func (*PanedWindow) SetSashCursorM added in v1.0.16

func (w *PanedWindow) SetSashCursorM(value string) *PanedWindow

SetSashCursorM is like SashCursor but panics on error

func (*PanedWindow) SetSashPad added in v1.0.14

func (w *PanedWindow) SetSashPad(value string) error

SashPad reports the amount of padding to leave of each side of a sash. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) SetSashPadM added in v1.0.16

func (w *PanedWindow) SetSashPadM(value string) *PanedWindow

SetSashPadM is like SashPad but panics on error

func (*PanedWindow) SetSashRelief added in v1.0.14

func (w *PanedWindow) SetSashRelief(value string) error

Relief to use when drawing a sash. May be any of the standard Tk relief values.

func (*PanedWindow) SetSashReliefM added in v1.0.16

func (w *PanedWindow) SetSashReliefM(value string) *PanedWindow

SetSashReliefM is like SashRelief but panics on error

func (*PanedWindow) SetSashWidth added in v1.0.14

func (w *PanedWindow) SetSashWidth(value string) error

SashWidth reports the width of each sash. May be any value accepted by \fBTk_GetPixels\fR.

func (*PanedWindow) SetSashWidthM added in v1.0.16

func (w *PanedWindow) SetSashWidthM(value string) *PanedWindow

SetSashWidthM is like SashWidth but panics on error

func (*PanedWindow) SetShowHandle added in v1.0.14

func (w *PanedWindow) SetShowHandle(value string) error

ShowHandle reports whether sash handles should be shown. May be any valid Tcl boolean value.

func (*PanedWindow) SetShowHandleM added in v1.0.16

func (w *PanedWindow) SetShowHandleM(value string) *PanedWindow

SetShowHandleM is like ShowHandle but panics on error

func (*PanedWindow) SetWidth added in v1.0.14

func (w *PanedWindow) SetWidth(value string) error

Width reports a desired width for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made wide enough to allow all contained widgets to have their natural width.

func (*PanedWindow) SetWidthM added in v1.0.16

func (w *PanedWindow) SetWidthM(value string) *PanedWindow

SetWidthM is like Width but panics on error

func (*PanedWindow) ShowHandle added in v1.0.14

func (w *PanedWindow) ShowHandle() (string, error)

ShowHandle reports whether sash handles should be shown. May be any valid Tcl boolean value.

func (*PanedWindow) ShowHandleM added in v1.0.16

func (w *PanedWindow) ShowHandleM() string

ShowHandleM is like ShowHandle but panics on error.

func (*PanedWindow) Width added in v1.0.14

func (w *PanedWindow) Width() (string, error)

Width reports a desired width for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made wide enough to allow all contained widgets to have their natural width.

func (*PanedWindow) WidthM added in v1.0.16

func (w *PanedWindow) WidthM() string

WidthM is like Width but panics on error.

type RadioButton added in v1.0.14

type RadioButton struct {
	Window
}

RadioButton represents the Tk radiobutton widget.

func (*RadioButton) ActiveBackground added in v1.0.14

func (w *RadioButton) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*RadioButton) ActiveBackgroundM added in v1.0.16

func (w *RadioButton) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (*RadioButton) ActiveForeground added in v1.0.14

func (w *RadioButton) ActiveForeground() (string, error)

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*RadioButton) ActiveForegroundM added in v1.0.16

func (w *RadioButton) ActiveForegroundM() string

ActiveForegroundM is like ActiveForeground but panics on error.

func (*RadioButton) Anchor added in v1.0.14

func (w *RadioButton) Anchor() (string, error)

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*RadioButton) AnchorM added in v1.0.16

func (w *RadioButton) AnchorM() string

AnchorM is like Anchor but panics on error.

func (*RadioButton) Background added in v1.0.14

func (w *RadioButton) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*RadioButton) BackgroundM added in v1.0.16

func (w *RadioButton) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*RadioButton) Bitmap added in v1.0.14

func (w *RadioButton) Bitmap() (string, error)

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*RadioButton) BitmapM added in v1.0.16

func (w *RadioButton) BitmapM() string

BitmapM is like Bitmap but panics on error.

func (*RadioButton) BorderWidth added in v1.0.14

func (w *RadioButton) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*RadioButton) BorderWidthM added in v1.0.16

func (w *RadioButton) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*RadioButton) Compound added in v1.0.14

func (w *RadioButton) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*RadioButton) CompoundM added in v1.0.16

func (w *RadioButton) CompoundM() string

CompoundM is like Compound but panics on error.

func (*RadioButton) Cursor added in v1.0.14

func (w *RadioButton) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*RadioButton) CursorM added in v1.0.16

func (w *RadioButton) CursorM() string

CursorM is like Cursor but panics on error.

func (*RadioButton) DisabledForeground added in v1.0.14

func (w *RadioButton) DisabledForeground() (string, error)

DisabledForeground reports 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.

func (*RadioButton) DisabledForegroundM added in v1.0.16

func (w *RadioButton) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (*RadioButton) Font added in v1.0.14

func (w *RadioButton) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*RadioButton) FontM added in v1.0.16

func (w *RadioButton) FontM() string

FontM is like Font but panics on error.

func (*RadioButton) Foreground added in v1.0.14

func (w *RadioButton) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*RadioButton) ForegroundM added in v1.0.16

func (w *RadioButton) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*RadioButton) Height added in v1.0.14

func (w *RadioButton) Height() (string, error)

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*RadioButton) HeightM added in v1.0.16

func (w *RadioButton) HeightM() string

HeightM is like Height but panics on error.

func (*RadioButton) HighlightBackground added in v1.0.14

func (w *RadioButton) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*RadioButton) HighlightBackgroundM added in v1.0.16

func (w *RadioButton) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*RadioButton) HighlightColor added in v1.0.14

func (w *RadioButton) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*RadioButton) HighlightColorM added in v1.0.16

func (w *RadioButton) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*RadioButton) HighlightThickness added in v1.0.14

func (w *RadioButton) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*RadioButton) HighlightThicknessM added in v1.0.16

func (w *RadioButton) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*RadioButton) Image added in v1.0.14

func (w *RadioButton) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*RadioButton) ImageM added in v1.0.16

func (w *RadioButton) ImageM() string

ImageM is like Image but panics on error.

func (*RadioButton) Indicatoron added in v1.0.14

func (w *RadioButton) Indicatoron() (string, error)

Indicatoron reports whether or not the indicator should be drawn. Must be a proper boolean value. If false, the \fB-relief\fR option is ignored and the widget's relief is always sunken if the widget is selected and raised otherwise.

func (*RadioButton) IndicatoronM added in v1.0.16

func (w *RadioButton) IndicatoronM() string

IndicatoronM is like Indicatoron but panics on error.

func (*RadioButton) Justify added in v1.0.14

func (w *RadioButton) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*RadioButton) JustifyM added in v1.0.16

func (w *RadioButton) JustifyM() string

JustifyM is like Justify but panics on error.

func (*RadioButton) OffRelief added in v1.0.14

func (w *RadioButton) OffRelief() (string, error)

OffRelief reports the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is TODO .QW(raised .) By setting this option to TODO .QW(flat) and setting \fB-indicatoron\fR to false and \fB-overrelief\fR to TODO .QW(raised ,) the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a word-processor, for example.

func (*RadioButton) OffReliefM added in v1.0.16

func (w *RadioButton) OffReliefM() string

OffReliefM is like OffRelief but panics on error.

func (*RadioButton) OverRelief added in v1.0.14

func (w *RadioButton) OverRelief() (string, error)

OverRelief reports an alternative relief for the radiobutton, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring \fB-relief flat -overrelief raised\fR. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the radiobutton. The empty string is the default value.

func (*RadioButton) OverReliefM added in v1.0.16

func (w *RadioButton) OverReliefM() string

OverReliefM is like OverRelief but panics on error.

func (*RadioButton) PadX added in v1.0.14

func (w *RadioButton) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*RadioButton) PadXM added in v1.0.16

func (w *RadioButton) PadXM() string

PadXM is like PadX but panics on error.

func (*RadioButton) PadY added in v1.0.14

func (w *RadioButton) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*RadioButton) PadYM added in v1.0.16

func (w *RadioButton) PadYM() string

PadYM is like PadY but panics on error.

func (*RadioButton) Relief added in v1.0.14

func (w *RadioButton) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*RadioButton) ReliefM added in v1.0.16

func (w *RadioButton) ReliefM() string

ReliefM is like Relief but panics on error.

func (*RadioButton) SelectColor added in v1.0.14

func (w *RadioButton) SelectColor() (string, error)

SelectColor reports a background color to use when the button is selected. If \fBindicatorOn\fR is true then the color is used as the background for the indicator regardless of the select state. If \fB-indicatoron\fR is false, this color is used as the background for the entire widget, in place of \fB-background\fR or \fB-activeBackground\fR, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected.

func (*RadioButton) SelectColorM added in v1.0.16

func (w *RadioButton) SelectColorM() string

SelectColorM is like SelectColor but panics on error.

func (*RadioButton) SelectImage added in v1.0.14

func (w *RadioButton) SelectImage() (string, error)

SelectImage reports an image to display (in place of the \fB-image\fR option) when the radiobutton is selected. This option is ignored unless the \fB-image\fR option has been specified.

func (*RadioButton) SelectImageM added in v1.0.16

func (w *RadioButton) SelectImageM() string

SelectImageM is like SelectImage but panics on error.

func (*RadioButton) SetActiveBackground added in v1.0.14

func (w *RadioButton) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*RadioButton) SetActiveBackgroundM added in v1.0.16

func (w *RadioButton) SetActiveBackgroundM(value string) *RadioButton

SetActiveBackgroundM is like ActiveBackground but panics on error

func (*RadioButton) SetActiveForeground added in v1.0.14

func (w *RadioButton) SetActiveForeground(value string) error

ActiveForeground reports foreground color to use when drawing active elements. See above for definition of active elements.

func (*RadioButton) SetActiveForegroundM added in v1.0.16

func (w *RadioButton) SetActiveForegroundM(value string) *RadioButton

SetActiveForegroundM is like ActiveForeground but panics on error

func (*RadioButton) SetAnchor added in v1.0.14

func (w *RadioButton) SetAnchor(value string) error

Anchor reports 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 \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. For example, \fBnw\fR means display the information such that its top-left corner is at the top-left corner of the widget.

func (*RadioButton) SetAnchorM added in v1.0.16

func (w *RadioButton) SetAnchorM(value string) *RadioButton

SetAnchorM is like Anchor but panics on error

func (*RadioButton) SetBackground added in v1.0.14

func (w *RadioButton) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*RadioButton) SetBackgroundM added in v1.0.16

func (w *RadioButton) SetBackgroundM(value string) *RadioButton

SetBackgroundM is like Background but panics on error

func (*RadioButton) SetBitmap added in v1.0.14

func (w *RadioButton) SetBitmap(value string) error

Bitmap reports a bitmap to display in the widget, in any of the forms acceptable to \fBTk_GetBitmap\fR. The exact way in which the bitmap is displayed may be affected by other options such as \fB-anchor\fR or \fB-justify\fR. 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 \fB-compound\fR option; the \fB-bitmap\fR option may be reset to an empty string to re-enable a text display. In widgets that support both \fB-bitmap\fR and \fB-image\fR options, \fB-image\fR will usually override \fB-bitmap\fR.

func (*RadioButton) SetBitmapM added in v1.0.16

func (w *RadioButton) SetBitmapM(value string) *RadioButton

SetBitmapM is like Bitmap but panics on error

func (*RadioButton) SetBorderWidth added in v1.0.14

func (w *RadioButton) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*RadioButton) SetBorderWidthM added in v1.0.16

func (w *RadioButton) SetBorderWidthM(value string) *RadioButton

SetBorderWidthM is like BorderWidth but panics on error

func (*RadioButton) SetCommand added in v1.0.14

func (w *RadioButton) SetCommand(value Command) error

Command specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button window. The button's global variable (\fB-variable\fR option) will be updated before the command is invoked.

func (*RadioButton) SetCommandM added in v1.0.16

func (w *RadioButton) SetCommandM(value Command) *RadioButton

SetCommandM is like Command but panics on error

func (*RadioButton) SetCompound added in v1.0.14

func (w *RadioButton) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*RadioButton) SetCompoundM added in v1.0.16

func (w *RadioButton) SetCompoundM(value string) *RadioButton

SetCompoundM is like Compound but panics on error

func (*RadioButton) SetCursor added in v1.0.14

func (w *RadioButton) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*RadioButton) SetCursorM added in v1.0.16

func (w *RadioButton) SetCursorM(value string) *RadioButton

SetCursorM is like Cursor but panics on error

func (*RadioButton) SetDisabledForeground added in v1.0.14

func (w *RadioButton) SetDisabledForeground(value string) error

DisabledForeground reports 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.

func (*RadioButton) SetDisabledForegroundM added in v1.0.16

func (w *RadioButton) SetDisabledForegroundM(value string) *RadioButton

SetDisabledForegroundM is like DisabledForeground but panics on error

func (*RadioButton) SetFont added in v1.0.14

func (w *RadioButton) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*RadioButton) SetFontM added in v1.0.16

func (w *RadioButton) SetFontM(value string) *RadioButton

SetFontM is like Font but panics on error

func (*RadioButton) SetForeground added in v1.0.14

func (w *RadioButton) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*RadioButton) SetForegroundM added in v1.0.16

func (w *RadioButton) SetForegroundM(value string) *RadioButton

SetForegroundM is like Foreground but panics on error

func (*RadioButton) SetHeight added in v1.0.14

func (w *RadioButton) SetHeight(value string) error

Height reports 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 \fBTk_GetPixels\fR); 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.

func (*RadioButton) SetHeightM added in v1.0.16

func (w *RadioButton) SetHeightM(value string) *RadioButton

SetHeightM is like Height but panics on error

func (*RadioButton) SetHighlightBackground added in v1.0.14

func (w *RadioButton) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*RadioButton) SetHighlightBackgroundM added in v1.0.16

func (w *RadioButton) SetHighlightBackgroundM(value string) *RadioButton

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*RadioButton) SetHighlightColor added in v1.0.14

func (w *RadioButton) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*RadioButton) SetHighlightColorM added in v1.0.16

func (w *RadioButton) SetHighlightColorM(value string) *RadioButton

SetHighlightColorM is like HighlightColor but panics on error

func (*RadioButton) SetHighlightThickness added in v1.0.14

func (w *RadioButton) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*RadioButton) SetHighlightThicknessM added in v1.0.16

func (w *RadioButton) SetHighlightThicknessM(value string) *RadioButton

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*RadioButton) SetImage added in v1.0.14

func (w *RadioButton) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*RadioButton) SetImageM added in v1.0.16

func (w *RadioButton) SetImageM(value string) *RadioButton

SetImageM is like Image but panics on error

func (*RadioButton) SetIndicatoron added in v1.0.14

func (w *RadioButton) SetIndicatoron(value string) error

Indicatoron reports whether or not the indicator should be drawn. Must be a proper boolean value. If false, the \fB-relief\fR option is ignored and the widget's relief is always sunken if the widget is selected and raised otherwise.

func (*RadioButton) SetIndicatoronM added in v1.0.16

func (w *RadioButton) SetIndicatoronM(value string) *RadioButton

SetIndicatoronM is like Indicatoron but panics on error

func (*RadioButton) SetJustify added in v1.0.14

func (w *RadioButton) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*RadioButton) SetJustifyM added in v1.0.16

func (w *RadioButton) SetJustifyM(value string) *RadioButton

SetJustifyM is like Justify but panics on error

func (*RadioButton) SetOffRelief added in v1.0.14

func (w *RadioButton) SetOffRelief(value string) error

OffRelief reports the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is TODO .QW(raised .) By setting this option to TODO .QW(flat) and setting \fB-indicatoron\fR to false and \fB-overrelief\fR to TODO .QW(raised ,) the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a word-processor, for example.

func (*RadioButton) SetOffReliefM added in v1.0.16

func (w *RadioButton) SetOffReliefM(value string) *RadioButton

SetOffReliefM is like OffRelief but panics on error

func (*RadioButton) SetOverRelief added in v1.0.14

func (w *RadioButton) SetOverRelief(value string) error

OverRelief reports an alternative relief for the radiobutton, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring \fB-relief flat -overrelief raised\fR. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the radiobutton. The empty string is the default value.

func (*RadioButton) SetOverReliefM added in v1.0.16

func (w *RadioButton) SetOverReliefM(value string) *RadioButton

SetOverReliefM is like OverRelief but panics on error

func (*RadioButton) SetPadX added in v1.0.14

func (w *RadioButton) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*RadioButton) SetPadXM added in v1.0.16

func (w *RadioButton) SetPadXM(value string) *RadioButton

SetPadXM is like PadX but panics on error

func (*RadioButton) SetPadY added in v1.0.14

func (w *RadioButton) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*RadioButton) SetPadYM added in v1.0.16

func (w *RadioButton) SetPadYM(value string) *RadioButton

SetPadYM is like PadY but panics on error

func (*RadioButton) SetRelief added in v1.0.14

func (w *RadioButton) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*RadioButton) SetReliefM added in v1.0.16

func (w *RadioButton) SetReliefM(value string) *RadioButton

SetReliefM is like Relief but panics on error

func (*RadioButton) SetSelectColor added in v1.0.14

func (w *RadioButton) SetSelectColor(value string) error

SelectColor reports a background color to use when the button is selected. If \fBindicatorOn\fR is true then the color is used as the background for the indicator regardless of the select state. If \fB-indicatoron\fR is false, this color is used as the background for the entire widget, in place of \fB-background\fR or \fB-activeBackground\fR, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected.

func (*RadioButton) SetSelectColorM added in v1.0.16

func (w *RadioButton) SetSelectColorM(value string) *RadioButton

SetSelectColorM is like SelectColor but panics on error

func (*RadioButton) SetSelectImage added in v1.0.14

func (w *RadioButton) SetSelectImage(value string) error

SelectImage reports an image to display (in place of the \fB-image\fR option) when the radiobutton is selected. This option is ignored unless the \fB-image\fR option has been specified.

func (*RadioButton) SetSelectImageM added in v1.0.16

func (w *RadioButton) SetSelectImageM(value string) *RadioButton

SetSelectImageM is like SelectImage but panics on error

func (*RadioButton) SetState added in v1.0.14

func (w *RadioButton) SetState(value string) error

State reports one of three states for the radiobutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the radiobutton is displayed using the \fB-foreground\fR and \fB-background\fR options. The active state is typically used when the pointer is over the radiobutton. In active state the radiobutton is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR options. Disabled state means that the radiobutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the \fB-disabledforeground\fR and \fB-background\fR options determine how the radiobutton is displayed.

func (*RadioButton) SetStateM added in v1.0.16

func (w *RadioButton) SetStateM(value string) *RadioButton

SetStateM is like State but panics on error

func (*RadioButton) SetTakeFocus added in v1.0.14

func (w *RadioButton) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*RadioButton) SetTakeFocusM added in v1.0.16

func (w *RadioButton) SetTakeFocusM(value string) *RadioButton

SetTakeFocusM is like TakeFocus but panics on error

func (*RadioButton) SetText added in v1.0.14

func (w *RadioButton) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*RadioButton) SetTextM added in v1.0.16

func (w *RadioButton) SetTextM(value string) *RadioButton

SetTextM is like Text but panics on error

func (*RadioButton) SetTextVariable added in v1.0.15

func (w *RadioButton) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*RadioButton) SetTextVariableM added in v1.0.16

func (w *RadioButton) SetTextVariableM(value string) *RadioButton

SetTextVariableM is like TextVariable but panics on error

func (*RadioButton) SetTristateImage added in v1.0.14

func (w *RadioButton) SetTristateImage(value string) error

TristateImage reports an image to display (in place of the \fB-image\fR option) when the radiobutton is selected. This option is ignored unless the \fB-image\fR option has been specified.

func (*RadioButton) SetTristateImageM added in v1.0.16

func (w *RadioButton) SetTristateImageM(value string) *RadioButton

SetTristateImageM is like TristateImage but panics on error

func (*RadioButton) SetTristateValue added in v1.0.14

func (w *RadioButton) SetTristateValue(value string) error

TristateValue reports the value that causes the radiobutton to display the multi-value selection, also known as the tri-state mode. Defaults to TODO .QW("" .)

func (*RadioButton) SetTristateValueM added in v1.0.16

func (w *RadioButton) SetTristateValueM(value string) *RadioButton

SetTristateValueM is like TristateValue but panics on error

func (*RadioButton) SetUnderline added in v1.0.14

func (w *RadioButton) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*RadioButton) SetUnderlineM added in v1.0.16

func (w *RadioButton) SetUnderlineM(value string) *RadioButton

SetUnderlineM is like Underline but panics on error

func (*RadioButton) SetValue added in v1.0.14

func (w *RadioButton) SetValue(value string) error

Value reports value to store in the button's associated variable whenever this button is selected.

func (*RadioButton) SetValueM added in v1.0.16

func (w *RadioButton) SetValueM(value string) *RadioButton

SetValueM is like Value but panics on error

func (*RadioButton) SetVariable added in v1.0.15

func (w *RadioButton) SetVariable(value string) error

Variable reports the name of a global variable to set whenever this button is selected. Changes in this variable also cause the button to select or deselect itself. Defaults to the value \fBselectedButton\fR.

func (*RadioButton) SetVariableM added in v1.0.16

func (w *RadioButton) SetVariableM(value string) *RadioButton

SetVariableM is like Variable but panics on error

func (*RadioButton) SetWidth added in v1.0.14

func (w *RadioButton) SetWidth(value string) error

Width reports a desired width for the button. If an image or bitmap is being displayed in the button, the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); 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 (*RadioButton) SetWidthM added in v1.0.16

func (w *RadioButton) SetWidthM(value string) *RadioButton

SetWidthM is like Width but panics on error

func (*RadioButton) SetWrapLength added in v1.0.14

func (w *RadioButton) SetWrapLength(value string) error

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*RadioButton) SetWrapLengthM added in v1.0.16

func (w *RadioButton) SetWrapLengthM(value string) *RadioButton

SetWrapLengthM is like WrapLength but panics on error

func (*RadioButton) State added in v1.0.14

func (w *RadioButton) State() (string, error)

State reports one of three states for the radiobutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the radiobutton is displayed using the \fB-foreground\fR and \fB-background\fR options. The active state is typically used when the pointer is over the radiobutton. In active state the radiobutton is displayed using the \fB-activeforeground\fR and \fB-activebackground\fR options. Disabled state means that the radiobutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the \fB-disabledforeground\fR and \fB-background\fR options determine how the radiobutton is displayed.

func (*RadioButton) StateM added in v1.0.16

func (w *RadioButton) StateM() string

StateM is like State but panics on error.

func (*RadioButton) TakeFocus added in v1.0.14

func (w *RadioButton) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*RadioButton) TakeFocusM added in v1.0.16

func (w *RadioButton) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*RadioButton) Text added in v1.0.14

func (w *RadioButton) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*RadioButton) TextM added in v1.0.16

func (w *RadioButton) TextM() string

TextM is like Text but panics on error.

func (*RadioButton) TextVariable added in v1.0.15

func (w *RadioButton) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*RadioButton) TextVariableM added in v1.0.16

func (w *RadioButton) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*RadioButton) TristateImage added in v1.0.14

func (w *RadioButton) TristateImage() (string, error)

TristateImage reports an image to display (in place of the \fB-image\fR option) when the radiobutton is selected. This option is ignored unless the \fB-image\fR option has been specified.

func (*RadioButton) TristateImageM added in v1.0.16

func (w *RadioButton) TristateImageM() string

TristateImageM is like TristateImage but panics on error.

func (*RadioButton) TristateValue added in v1.0.14

func (w *RadioButton) TristateValue() (string, error)

TristateValue reports the value that causes the radiobutton to display the multi-value selection, also known as the tri-state mode. Defaults to TODO .QW("" .)

func (*RadioButton) TristateValueM added in v1.0.16

func (w *RadioButton) TristateValueM() string

TristateValueM is like TristateValue but panics on error.

func (*RadioButton) Underline added in v1.0.14

func (w *RadioButton) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*RadioButton) UnderlineM added in v1.0.16

func (w *RadioButton) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*RadioButton) Value added in v1.0.14

func (w *RadioButton) Value() (string, error)

Value reports value to store in the button's associated variable whenever this button is selected.

func (*RadioButton) ValueM added in v1.0.16

func (w *RadioButton) ValueM() string

ValueM is like Value but panics on error.

func (*RadioButton) Variable added in v1.0.15

func (w *RadioButton) Variable() (string, error)

Variable reports the name of a global variable to set whenever this button is selected. Changes in this variable also cause the button to select or deselect itself. Defaults to the value \fBselectedButton\fR.

func (*RadioButton) VariableM added in v1.0.16

func (w *RadioButton) VariableM() string

VariableM is like Variable but panics on error.

func (*RadioButton) Width added in v1.0.14

func (w *RadioButton) Width() (string, error)

Width reports a desired width for the button. If an image or bitmap is being displayed in the button, the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); 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 (*RadioButton) WidthM added in v1.0.16

func (w *RadioButton) WidthM() string

WidthM is like Width but panics on error.

func (*RadioButton) WrapLength added in v1.0.14

func (w *RadioButton) WrapLength() (string, error)

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

func (*RadioButton) WrapLengthM added in v1.0.16

func (w *RadioButton) WrapLengthM() string

WrapLengthM is like WrapLength but panics on error.

type Scale added in v1.0.13

type Scale struct {
	Window
}

Scale represents the Tk scale widget.

func (*Scale) ActiveBackground added in v1.0.14

func (w *Scale) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Scale) ActiveBackgroundM added in v1.0.16

func (w *Scale) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (*Scale) Background added in v1.0.14

func (w *Scale) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Scale) BackgroundM added in v1.0.16

func (w *Scale) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Scale) BigIncrement added in v1.0.14

func (w *Scale) BigIncrement() (string, error)

Some interactions with the scale cause its value to change by TODO .QW(large) increments; this option specifies the size of the large increments. If specified as 0, the large increments default to 1/10 the range of the scale.

func (*Scale) BigIncrementM added in v1.0.16

func (w *Scale) BigIncrementM() string

BigIncrementM is like BigIncrement but panics on error.

func (*Scale) BorderWidth added in v1.0.14

func (w *Scale) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Scale) BorderWidthM added in v1.0.16

func (w *Scale) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Scale) Cursor added in v1.0.14

func (w *Scale) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Scale) CursorM added in v1.0.16

func (w *Scale) CursorM() string

CursorM is like Cursor but panics on error.

func (*Scale) Digits added in v1.0.14

func (w *Scale) Digits() (string, error)

An integer specifying how many significant digits should be retained when converting the value of the scale to a string. If the number is less than or equal to zero, then the scale picks the smallest value that guarantees that every possible slider position prints as a different string.

func (*Scale) DigitsM added in v1.0.16

func (w *Scale) DigitsM() string

DigitsM is like Digits but panics on error.

func (*Scale) Font added in v1.0.14

func (w *Scale) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Scale) FontM added in v1.0.16

func (w *Scale) FontM() string

FontM is like Font but panics on error.

func (*Scale) Foreground added in v1.0.14

func (w *Scale) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*Scale) ForegroundM added in v1.0.16

func (w *Scale) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*Scale) From added in v1.0.14

func (w *Scale) From() (string, error)

A real value corresponding to the left or top end of the scale.

func (*Scale) FromM added in v1.0.16

func (w *Scale) FromM() string

FromM is like From but panics on error.

func (*Scale) HighlightBackground added in v1.0.14

func (w *Scale) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Scale) HighlightBackgroundM added in v1.0.16

func (w *Scale) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Scale) HighlightColor added in v1.0.14

func (w *Scale) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Scale) HighlightColorM added in v1.0.16

func (w *Scale) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Scale) HighlightThickness added in v1.0.14

func (w *Scale) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Scale) HighlightThicknessM added in v1.0.16

func (w *Scale) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Scale) Label added in v1.0.14

func (w *Scale) Label() (string, error)

A string to display as a label for the scale. For vertical scales the label is displayed just to the right of the top end of the scale. For horizontal scales the label is displayed just above the left end of the scale. If the option is specified as an empty string, no label is displayed.

func (*Scale) LabelM added in v1.0.16

func (w *Scale) LabelM() string

LabelM is like Label but panics on error.

func (*Scale) Length added in v1.0.14

func (w *Scale) Length() (string, error)

Length reports the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). For vertical scales this is the scale's height; for horizontal scales it is the scale's width.

func (*Scale) LengthM added in v1.0.16

func (w *Scale) LengthM() string

LengthM is like Length but panics on error.

func (*Scale) Orient added in v1.0.14

func (w *Scale) Orient() (string, error)

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 \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*Scale) OrientM added in v1.0.16

func (w *Scale) OrientM() string

OrientM is like Orient but panics on error.

func (*Scale) Relief added in v1.0.14

func (w *Scale) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Scale) ReliefM added in v1.0.16

func (w *Scale) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Scale) RepeatDelay added in v1.0.14

func (w *Scale) RepeatDelay() (string, error)

RepeatDelay reports 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.

func (*Scale) RepeatDelayM added in v1.0.16

func (w *Scale) RepeatDelayM() string

RepeatDelayM is like RepeatDelay but panics on error.

func (*Scale) RepeatInterval added in v1.0.14

func (w *Scale) RepeatInterval() (string, error)

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*Scale) RepeatIntervalM added in v1.0.16

func (w *Scale) RepeatIntervalM() string

RepeatIntervalM is like RepeatInterval but panics on error.

func (*Scale) Resolution added in v1.0.14

func (w *Scale) Resolution() (string, error)

A real value specifying the resolution for the scale. If this value is greater than zero then the scale's value will always be rounded to an even multiple of this value, as will the endpoints of the scale. If the value is less than zero then no rounding occurs. Defaults to 1 (i.e., the value will be integral).

func (*Scale) ResolutionM added in v1.0.16

func (w *Scale) ResolutionM() string

ResolutionM is like Resolution but panics on error.

func (*Scale) SetActiveBackground added in v1.0.14

func (w *Scale) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Scale) SetActiveBackgroundM added in v1.0.16

func (w *Scale) SetActiveBackgroundM(value string) *Scale

SetActiveBackgroundM is like ActiveBackground but panics on error

func (*Scale) SetBackground added in v1.0.14

func (w *Scale) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Scale) SetBackgroundM added in v1.0.16

func (w *Scale) SetBackgroundM(value string) *Scale

SetBackgroundM is like Background but panics on error

func (*Scale) SetBigIncrement added in v1.0.14

func (w *Scale) SetBigIncrement(value string) error

Some interactions with the scale cause its value to change by TODO .QW(large) increments; this option specifies the size of the large increments. If specified as 0, the large increments default to 1/10 the range of the scale.

func (*Scale) SetBigIncrementM added in v1.0.16

func (w *Scale) SetBigIncrementM(value string) *Scale

SetBigIncrementM is like BigIncrement but panics on error

func (*Scale) SetBorderWidth added in v1.0.14

func (w *Scale) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Scale) SetBorderWidthM added in v1.0.16

func (w *Scale) SetBorderWidthM(value string) *Scale

SetBorderWidthM is like BorderWidth but panics on error

func (*Scale) SetCommand added in v1.0.14

func (w *Scale) SetCommand(value Command) error

Command specifies the prefix of a Tcl command to invoke whenever the scale's value is changed via a widget command. The actual command consists of this option followed by a space and a real number indicating the new value of the scale.

func (*Scale) SetCommandM added in v1.0.16

func (w *Scale) SetCommandM(value Command) *Scale

SetCommandM is like Command but panics on error

func (*Scale) SetCursor added in v1.0.14

func (w *Scale) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Scale) SetCursorM added in v1.0.16

func (w *Scale) SetCursorM(value string) *Scale

SetCursorM is like Cursor but panics on error

func (*Scale) SetDigits added in v1.0.14

func (w *Scale) SetDigits(value string) error

An integer specifying how many significant digits should be retained when converting the value of the scale to a string. If the number is less than or equal to zero, then the scale picks the smallest value that guarantees that every possible slider position prints as a different string.

func (*Scale) SetDigitsM added in v1.0.16

func (w *Scale) SetDigitsM(value string) *Scale

SetDigitsM is like Digits but panics on error

func (*Scale) SetFont added in v1.0.14

func (w *Scale) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Scale) SetFontM added in v1.0.16

func (w *Scale) SetFontM(value string) *Scale

SetFontM is like Font but panics on error

func (*Scale) SetForeground added in v1.0.14

func (w *Scale) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*Scale) SetForegroundM added in v1.0.16

func (w *Scale) SetForegroundM(value string) *Scale

SetForegroundM is like Foreground but panics on error

func (*Scale) SetFrom added in v1.0.14

func (w *Scale) SetFrom(value string) error

A real value corresponding to the left or top end of the scale.

func (*Scale) SetFromM added in v1.0.16

func (w *Scale) SetFromM(value string) *Scale

SetFromM is like From but panics on error

func (*Scale) SetHighlightBackground added in v1.0.14

func (w *Scale) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Scale) SetHighlightBackgroundM added in v1.0.16

func (w *Scale) SetHighlightBackgroundM(value string) *Scale

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Scale) SetHighlightColor added in v1.0.14

func (w *Scale) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Scale) SetHighlightColorM added in v1.0.16

func (w *Scale) SetHighlightColorM(value string) *Scale

SetHighlightColorM is like HighlightColor but panics on error

func (*Scale) SetHighlightThickness added in v1.0.14

func (w *Scale) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Scale) SetHighlightThicknessM added in v1.0.16

func (w *Scale) SetHighlightThicknessM(value string) *Scale

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Scale) SetLabel added in v1.0.14

func (w *Scale) SetLabel(value string) error

A string to display as a label for the scale. For vertical scales the label is displayed just to the right of the top end of the scale. For horizontal scales the label is displayed just above the left end of the scale. If the option is specified as an empty string, no label is displayed.

func (*Scale) SetLabelM added in v1.0.16

func (w *Scale) SetLabelM(value string) *Scale

SetLabelM is like Label but panics on error

func (*Scale) SetLength added in v1.0.14

func (w *Scale) SetLength(value string) error

Length reports the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). For vertical scales this is the scale's height; for horizontal scales it is the scale's width.

func (*Scale) SetLengthM added in v1.0.16

func (w *Scale) SetLengthM(value string) *Scale

SetLengthM is like Length but panics on error

func (*Scale) SetOrient added in v1.0.14

func (w *Scale) SetOrient(value string) error

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 \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*Scale) SetOrientM added in v1.0.16

func (w *Scale) SetOrientM(value string) *Scale

SetOrientM is like Orient but panics on error

func (*Scale) SetRelief added in v1.0.14

func (w *Scale) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Scale) SetReliefM added in v1.0.16

func (w *Scale) SetReliefM(value string) *Scale

SetReliefM is like Relief but panics on error

func (*Scale) SetRepeatDelay added in v1.0.14

func (w *Scale) SetRepeatDelay(value string) error

RepeatDelay reports 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.

func (*Scale) SetRepeatDelayM added in v1.0.16

func (w *Scale) SetRepeatDelayM(value string) *Scale

SetRepeatDelayM is like RepeatDelay but panics on error

func (*Scale) SetRepeatInterval added in v1.0.14

func (w *Scale) SetRepeatInterval(value string) error

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*Scale) SetRepeatIntervalM added in v1.0.16

func (w *Scale) SetRepeatIntervalM(value string) *Scale

SetRepeatIntervalM is like RepeatInterval but panics on error

func (*Scale) SetResolution added in v1.0.14

func (w *Scale) SetResolution(value string) error

A real value specifying the resolution for the scale. If this value is greater than zero then the scale's value will always be rounded to an even multiple of this value, as will the endpoints of the scale. If the value is less than zero then no rounding occurs. Defaults to 1 (i.e., the value will be integral).

func (*Scale) SetResolutionM added in v1.0.16

func (w *Scale) SetResolutionM(value string) *Scale

SetResolutionM is like Resolution but panics on error

func (*Scale) SetShowValue added in v1.0.14

func (w *Scale) SetShowValue(value string) error

ShowValue reports a boolean value indicating whether or not the current value of the scale is to be displayed.

func (*Scale) SetShowValueM added in v1.0.16

func (w *Scale) SetShowValueM(value string) *Scale

SetShowValueM is like ShowValue but panics on error

func (*Scale) SetSliderLength added in v1.0.14

func (w *Scale) SetSliderLength(value string) error

SliderLength reports the size of the slider, measured in screen units along the slider's long dimension. The value may be specified in any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Scale) SetSliderLengthM added in v1.0.16

func (w *Scale) SetSliderLengthM(value string) *Scale

SetSliderLengthM is like SliderLength but panics on error

func (*Scale) SetSliderRelief added in v1.0.14

func (w *Scale) SetSliderRelief(value string) error

SliderRelief reports the relief to use when drawing the slider, such as \fBraised\fR or \fBsunken\fR.

func (*Scale) SetSliderReliefM added in v1.0.16

func (w *Scale) SetSliderReliefM(value string) *Scale

SetSliderReliefM is like SliderRelief but panics on error

func (*Scale) SetState added in v1.0.14

func (w *Scale) SetState(value string) error

State reports one of three states for the scale: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. If the scale is disabled then the value may not be changed and the scale will not activate. If the scale is active, the slider is displayed using the color specified by the \fB-activebackground\fR option.

func (*Scale) SetStateM added in v1.0.16

func (w *Scale) SetStateM(value string) *Scale

SetStateM is like State but panics on error

func (*Scale) SetTakeFocus added in v1.0.14

func (w *Scale) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Scale) SetTakeFocusM added in v1.0.16

func (w *Scale) SetTakeFocusM(value string) *Scale

SetTakeFocusM is like TakeFocus but panics on error

func (*Scale) SetTickInterval added in v1.0.14

func (w *Scale) SetTickInterval(value string) error

Must be a real value. Determines the spacing between numerical tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval. If 0, no tick marks will be displayed.

func (*Scale) SetTickIntervalM added in v1.0.16

func (w *Scale) SetTickIntervalM(value string) *Scale

SetTickIntervalM is like TickInterval but panics on error

func (*Scale) SetTo added in v1.0.14

func (w *Scale) SetTo(value string) error

To reports a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the \fB-from\fR option.

func (*Scale) SetToM added in v1.0.16

func (w *Scale) SetToM(value string) *Scale

SetToM is like To but panics on error

func (*Scale) SetTroughColor added in v1.0.14

func (w *Scale) SetTroughColor(value string) error

TroughColor reports the color to use for the rectangular trough areas in widgets such as scrollbars and scales. This option is ignored for scrollbars on Windows (native widget does not recognize this option).

func (*Scale) SetTroughColorM added in v1.0.16

func (w *Scale) SetTroughColorM(value string) *Scale

SetTroughColorM is like TroughColor but panics on error

func (*Scale) SetVariable added in v1.0.15

func (w *Scale) SetVariable(value string) error

Variable reports the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale's new value.

func (*Scale) SetVariableM added in v1.0.16

func (w *Scale) SetVariableM(value string) *Scale

SetVariableM is like Variable but panics on error

func (*Scale) SetWidth added in v1.0.14

func (w *Scale) SetWidth(value string) error

Width reports the desired narrow dimension of the scale in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). For vertical scales this is the scale's width; for horizontal scales this is the scale's height.

func (*Scale) SetWidthM added in v1.0.16

func (w *Scale) SetWidthM(value string) *Scale

SetWidthM is like Width but panics on error

func (*Scale) ShowValue added in v1.0.14

func (w *Scale) ShowValue() (string, error)

ShowValue reports a boolean value indicating whether or not the current value of the scale is to be displayed.

func (*Scale) ShowValueM added in v1.0.16

func (w *Scale) ShowValueM() string

ShowValueM is like ShowValue but panics on error.

func (*Scale) SliderLength added in v1.0.14

func (w *Scale) SliderLength() (string, error)

SliderLength reports the size of the slider, measured in screen units along the slider's long dimension. The value may be specified in any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Scale) SliderLengthM added in v1.0.16

func (w *Scale) SliderLengthM() string

SliderLengthM is like SliderLength but panics on error.

func (*Scale) SliderRelief added in v1.0.14

func (w *Scale) SliderRelief() (string, error)

SliderRelief reports the relief to use when drawing the slider, such as \fBraised\fR or \fBsunken\fR.

func (*Scale) SliderReliefM added in v1.0.16

func (w *Scale) SliderReliefM() string

SliderReliefM is like SliderRelief but panics on error.

func (*Scale) State added in v1.0.14

func (w *Scale) State() (string, error)

State reports one of three states for the scale: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. If the scale is disabled then the value may not be changed and the scale will not activate. If the scale is active, the slider is displayed using the color specified by the \fB-activebackground\fR option.

func (*Scale) StateM added in v1.0.16

func (w *Scale) StateM() string

StateM is like State but panics on error.

func (*Scale) TakeFocus added in v1.0.14

func (w *Scale) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Scale) TakeFocusM added in v1.0.16

func (w *Scale) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Scale) TickInterval added in v1.0.14

func (w *Scale) TickInterval() (string, error)

Must be a real value. Determines the spacing between numerical tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval. If 0, no tick marks will be displayed.

func (*Scale) TickIntervalM added in v1.0.16

func (w *Scale) TickIntervalM() string

TickIntervalM is like TickInterval but panics on error.

func (*Scale) To added in v1.0.14

func (w *Scale) To() (string, error)

To reports a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the \fB-from\fR option.

func (*Scale) ToM added in v1.0.16

func (w *Scale) ToM() string

ToM is like To but panics on error.

func (*Scale) TroughColor added in v1.0.14

func (w *Scale) TroughColor() (string, error)

TroughColor reports the color to use for the rectangular trough areas in widgets such as scrollbars and scales. This option is ignored for scrollbars on Windows (native widget does not recognize this option).

func (*Scale) TroughColorM added in v1.0.16

func (w *Scale) TroughColorM() string

TroughColorM is like TroughColor but panics on error.

func (*Scale) Variable added in v1.0.15

func (w *Scale) Variable() (string, error)

Variable reports the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale's new value.

func (*Scale) VariableM added in v1.0.16

func (w *Scale) VariableM() string

VariableM is like Variable but panics on error.

func (*Scale) Width added in v1.0.14

func (w *Scale) Width() (string, error)

Width reports the desired narrow dimension of the scale in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). For vertical scales this is the scale's width; for horizontal scales this is the scale's height.

func (*Scale) WidthM added in v1.0.16

func (w *Scale) WidthM() string

WidthM is like Width but panics on error.

type Scrollbar added in v1.0.13

type Scrollbar struct {
	Window
}

Scrollbar represents the Tk scrollbar widget.

func (*Scrollbar) ActiveBackground added in v1.0.14

func (w *Scrollbar) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Scrollbar) ActiveBackgroundM added in v1.0.16

func (w *Scrollbar) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (*Scrollbar) ActiveRelief added in v1.0.14

func (w *Scrollbar) ActiveRelief() (string, error)

ActiveRelief reports the relief to use when displaying the element that is active, if any. Elements other than the active element are always displayed with a raised relief.

func (*Scrollbar) ActiveReliefM added in v1.0.16

func (w *Scrollbar) ActiveReliefM() string

ActiveReliefM is like ActiveRelief but panics on error.

func (*Scrollbar) Background added in v1.0.14

func (w *Scrollbar) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Scrollbar) BackgroundM added in v1.0.16

func (w *Scrollbar) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Scrollbar) BorderWidth added in v1.0.14

func (w *Scrollbar) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Scrollbar) BorderWidthM added in v1.0.16

func (w *Scrollbar) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Scrollbar) Cursor added in v1.0.14

func (w *Scrollbar) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Scrollbar) CursorM added in v1.0.16

func (w *Scrollbar) CursorM() string

CursorM is like Cursor but panics on error.

func (*Scrollbar) ElementBorderWidth added in v1.0.14

func (w *Scrollbar) ElementBorderWidth() (string, error)

ElementBorderWidth reports the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If this value is less than zero, the value of the \fB-borderwidth\fR option is used in its place.

func (*Scrollbar) ElementBorderWidthM added in v1.0.16

func (w *Scrollbar) ElementBorderWidthM() string

ElementBorderWidthM is like ElementBorderWidth but panics on error.

func (*Scrollbar) HighlightBackground added in v1.0.14

func (w *Scrollbar) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Scrollbar) HighlightBackgroundM added in v1.0.16

func (w *Scrollbar) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Scrollbar) HighlightColor added in v1.0.14

func (w *Scrollbar) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Scrollbar) HighlightColorM added in v1.0.16

func (w *Scrollbar) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Scrollbar) HighlightThickness added in v1.0.14

func (w *Scrollbar) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Scrollbar) HighlightThicknessM added in v1.0.16

func (w *Scrollbar) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Scrollbar) Jump added in v1.0.14

func (w *Scrollbar) Jump() (string, error)

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 \fBTcl_GetBoolean\fR. 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 TODO .QW(jumps) rather than changing smoothly).

func (*Scrollbar) JumpM added in v1.0.16

func (w *Scrollbar) JumpM() string

JumpM is like Jump but panics on error.

func (*Scrollbar) Orient added in v1.0.14

func (w *Scrollbar) Orient() (string, error)

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 \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*Scrollbar) OrientM added in v1.0.16

func (w *Scrollbar) OrientM() string

OrientM is like Orient but panics on error.

func (*Scrollbar) Relief added in v1.0.14

func (w *Scrollbar) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Scrollbar) ReliefM added in v1.0.16

func (w *Scrollbar) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Scrollbar) RepeatDelay added in v1.0.14

func (w *Scrollbar) RepeatDelay() (string, error)

RepeatDelay reports 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.

func (*Scrollbar) RepeatDelayM added in v1.0.16

func (w *Scrollbar) RepeatDelayM() string

RepeatDelayM is like RepeatDelay but panics on error.

func (*Scrollbar) RepeatInterval added in v1.0.14

func (w *Scrollbar) RepeatInterval() (string, error)

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*Scrollbar) RepeatIntervalM added in v1.0.16

func (w *Scrollbar) RepeatIntervalM() string

RepeatIntervalM is like RepeatInterval but panics on error.

func (*Scrollbar) SetActiveBackground added in v1.0.14

func (w *Scrollbar) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*Scrollbar) SetActiveBackgroundM added in v1.0.16

func (w *Scrollbar) SetActiveBackgroundM(value string) *Scrollbar

SetActiveBackgroundM is like ActiveBackground but panics on error

func (*Scrollbar) SetActiveRelief added in v1.0.14

func (w *Scrollbar) SetActiveRelief(value string) error

ActiveRelief reports the relief to use when displaying the element that is active, if any. Elements other than the active element are always displayed with a raised relief.

func (*Scrollbar) SetActiveReliefM added in v1.0.16

func (w *Scrollbar) SetActiveReliefM(value string) *Scrollbar

SetActiveReliefM is like ActiveRelief but panics on error

func (*Scrollbar) SetBackground added in v1.0.14

func (w *Scrollbar) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Scrollbar) SetBackgroundM added in v1.0.16

func (w *Scrollbar) SetBackgroundM(value string) *Scrollbar

SetBackgroundM is like Background but panics on error

func (*Scrollbar) SetBorderWidth added in v1.0.14

func (w *Scrollbar) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Scrollbar) SetBorderWidthM added in v1.0.16

func (w *Scrollbar) SetBorderWidthM(value string) *Scrollbar

SetBorderWidthM is like BorderWidth but panics on error

func (*Scrollbar) SetCommand added in v1.0.14

func (w *Scrollbar) SetCommand(value Command) error

Command specifies the prefix of a Tcl command to invoke to change the view in the widget associated with the scrollbar. When a user requests a view change by manipulating the scrollbar, a Tcl command is invoked. The actual command consists of this option followed by additional information as described later. This option almost always has a value such as \fB.t xview\fR or \fB.t yview\fR, consisting of the name of a widget and either \fBxview\fR (if the scrollbar is for horizontal scrolling) or \fByview\fR (for vertical scrolling). All scrollable widgets have \fBxview\fR and \fByview\fR commands that take exactly the additional arguments appended by the scrollbar as described in \fBSCROLLING COMMANDS\fR below.

func (*Scrollbar) SetCommandM added in v1.0.16

func (w *Scrollbar) SetCommandM(value Command) *Scrollbar

SetCommandM is like Command but panics on error

func (*Scrollbar) SetCursor added in v1.0.14

func (w *Scrollbar) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Scrollbar) SetCursorM added in v1.0.16

func (w *Scrollbar) SetCursorM(value string) *Scrollbar

SetCursorM is like Cursor but panics on error

func (*Scrollbar) SetElementBorderWidth added in v1.0.14

func (w *Scrollbar) SetElementBorderWidth(value string) error

ElementBorderWidth reports the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If this value is less than zero, the value of the \fB-borderwidth\fR option is used in its place.

func (*Scrollbar) SetElementBorderWidthM added in v1.0.16

func (w *Scrollbar) SetElementBorderWidthM(value string) *Scrollbar

SetElementBorderWidthM is like ElementBorderWidth but panics on error

func (*Scrollbar) SetHighlightBackground added in v1.0.14

func (w *Scrollbar) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Scrollbar) SetHighlightBackgroundM added in v1.0.16

func (w *Scrollbar) SetHighlightBackgroundM(value string) *Scrollbar

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Scrollbar) SetHighlightColor added in v1.0.14

func (w *Scrollbar) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Scrollbar) SetHighlightColorM added in v1.0.16

func (w *Scrollbar) SetHighlightColorM(value string) *Scrollbar

SetHighlightColorM is like HighlightColor but panics on error

func (*Scrollbar) SetHighlightThickness added in v1.0.14

func (w *Scrollbar) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Scrollbar) SetHighlightThicknessM added in v1.0.16

func (w *Scrollbar) SetHighlightThicknessM(value string) *Scrollbar

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Scrollbar) SetJump added in v1.0.14

func (w *Scrollbar) SetJump(value string) error

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 \fBTcl_GetBoolean\fR. 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 TODO .QW(jumps) rather than changing smoothly).

func (*Scrollbar) SetJumpM added in v1.0.16

func (w *Scrollbar) SetJumpM(value string) *Scrollbar

SetJumpM is like Jump but panics on error

func (*Scrollbar) SetOrient added in v1.0.14

func (w *Scrollbar) SetOrient(value string) error

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 \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*Scrollbar) SetOrientM added in v1.0.16

func (w *Scrollbar) SetOrientM(value string) *Scrollbar

SetOrientM is like Orient but panics on error

func (*Scrollbar) SetRelief added in v1.0.14

func (w *Scrollbar) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Scrollbar) SetReliefM added in v1.0.16

func (w *Scrollbar) SetReliefM(value string) *Scrollbar

SetReliefM is like Relief but panics on error

func (*Scrollbar) SetRepeatDelay added in v1.0.14

func (w *Scrollbar) SetRepeatDelay(value string) error

RepeatDelay reports 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.

func (*Scrollbar) SetRepeatDelayM added in v1.0.16

func (w *Scrollbar) SetRepeatDelayM(value string) *Scrollbar

SetRepeatDelayM is like RepeatDelay but panics on error

func (*Scrollbar) SetRepeatInterval added in v1.0.14

func (w *Scrollbar) SetRepeatInterval(value string) error

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*Scrollbar) SetRepeatIntervalM added in v1.0.16

func (w *Scrollbar) SetRepeatIntervalM(value string) *Scrollbar

SetRepeatIntervalM is like RepeatInterval but panics on error

func (*Scrollbar) SetTakeFocus added in v1.0.14

func (w *Scrollbar) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Scrollbar) SetTakeFocusM added in v1.0.16

func (w *Scrollbar) SetTakeFocusM(value string) *Scrollbar

SetTakeFocusM is like TakeFocus but panics on error

func (*Scrollbar) SetTroughColor added in v1.0.14

func (w *Scrollbar) SetTroughColor(value string) error

TroughColor reports the color to use for the rectangular trough areas in widgets such as scrollbars and scales. This option is ignored for scrollbars on Windows (native widget does not recognize this option).

func (*Scrollbar) SetTroughColorM added in v1.0.16

func (w *Scrollbar) SetTroughColorM(value string) *Scrollbar

SetTroughColorM is like TroughColor but panics on error

func (*Scrollbar) SetWidth added in v1.0.14

func (w *Scrollbar) SetWidth(value string) error

Width reports the desired narrow dimension of the scrollbar window, not including 3-D border, if any. For vertical scrollbars this will be the width and for horizontal scrollbars this will be the height. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Scrollbar) SetWidthM added in v1.0.16

func (w *Scrollbar) SetWidthM(value string) *Scrollbar

SetWidthM is like Width but panics on error

func (*Scrollbar) TakeFocus added in v1.0.14

func (w *Scrollbar) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Scrollbar) TakeFocusM added in v1.0.16

func (w *Scrollbar) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Scrollbar) TroughColor added in v1.0.14

func (w *Scrollbar) TroughColor() (string, error)

TroughColor reports the color to use for the rectangular trough areas in widgets such as scrollbars and scales. This option is ignored for scrollbars on Windows (native widget does not recognize this option).

func (*Scrollbar) TroughColorM added in v1.0.16

func (w *Scrollbar) TroughColorM() string

TroughColorM is like TroughColor but panics on error.

func (*Scrollbar) Width added in v1.0.14

func (w *Scrollbar) Width() (string, error)

Width reports the desired narrow dimension of the scrollbar window, not including 3-D border, if any. For vertical scrollbars this will be the width and for horizontal scrollbars this will be the height. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Scrollbar) WidthM added in v1.0.16

func (w *Scrollbar) WidthM() string

WidthM is like Width but panics on error.

type SpinBox added in v1.0.14

type SpinBox struct {
	Window
}

SpinBox represents the Tk spinbox widget.

func (*SpinBox) ActiveBackground added in v1.0.14

func (w *SpinBox) ActiveBackground() (string, error)

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*SpinBox) ActiveBackgroundM added in v1.0.16

func (w *SpinBox) ActiveBackgroundM() string

ActiveBackgroundM is like ActiveBackground but panics on error.

func (*SpinBox) Background added in v1.0.14

func (w *SpinBox) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*SpinBox) BackgroundM added in v1.0.16

func (w *SpinBox) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*SpinBox) BorderWidth added in v1.0.14

func (w *SpinBox) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*SpinBox) BorderWidthM added in v1.0.16

func (w *SpinBox) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*SpinBox) ButtonBackground added in v1.0.14

func (w *SpinBox) ButtonBackground() (string, error)

The background color to be used for the spin buttons.

func (*SpinBox) ButtonBackgroundM added in v1.0.16

func (w *SpinBox) ButtonBackgroundM() string

ButtonBackgroundM is like ButtonBackground but panics on error.

func (*SpinBox) ButtonCursor added in v1.0.14

func (w *SpinBox) ButtonCursor() (string, error)

The cursor to be used when over the spin buttons. If this is empty (the default), a default cursor will be used.

func (*SpinBox) ButtonCursorM added in v1.0.16

func (w *SpinBox) ButtonCursorM() string

ButtonCursorM is like ButtonCursor but panics on error.

func (*SpinBox) ButtonDownRelief added in v1.0.14

func (w *SpinBox) ButtonDownRelief() (string, error)

The relief to be used for the upper spin button.

func (*SpinBox) ButtonDownReliefM added in v1.0.16

func (w *SpinBox) ButtonDownReliefM() string

ButtonDownReliefM is like ButtonDownRelief but panics on error.

func (*SpinBox) ButtonuPRelief added in v1.0.14

func (w *SpinBox) ButtonuPRelief() (string, error)

The relief to be used for the lower spin button.

func (*SpinBox) ButtonuPReliefM added in v1.0.16

func (w *SpinBox) ButtonuPReliefM() string

ButtonuPReliefM is like ButtonuPRelief but panics on error.

func (*SpinBox) Cursor added in v1.0.14

func (w *SpinBox) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*SpinBox) CursorM added in v1.0.16

func (w *SpinBox) CursorM() string

CursorM is like Cursor but panics on error.

func (*SpinBox) DisabledBackground added in v1.0.14

func (w *SpinBox) DisabledBackground() (string, error)

DisabledBackground reports the background color to use when the spinbox is disabled. If this option is the empty string, the normal background color is used.

func (*SpinBox) DisabledBackgroundM added in v1.0.16

func (w *SpinBox) DisabledBackgroundM() string

DisabledBackgroundM is like DisabledBackground but panics on error.

func (*SpinBox) DisabledForeground added in v1.0.14

func (w *SpinBox) DisabledForeground() (string, error)

DisabledForeground reports the foreground color to use when the spinbox is disabled. If this option is the empty string, the normal foreground color is used.

func (*SpinBox) DisabledForegroundM added in v1.0.16

func (w *SpinBox) DisabledForegroundM() string

DisabledForegroundM is like DisabledForeground but panics on error.

func (*SpinBox) ExportSelection added in v1.0.14

func (w *SpinBox) ExportSelection() (bool, error)

ExportSelection reports whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*SpinBox) ExportSelectionM added in v1.0.16

func (w *SpinBox) ExportSelectionM() bool

ExportSelectionM is like ExportSelection but panics on error.

func (*SpinBox) Font added in v1.0.14

func (w *SpinBox) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*SpinBox) FontM added in v1.0.16

func (w *SpinBox) FontM() string

FontM is like Font but panics on error.

func (*SpinBox) Foreground added in v1.0.14

func (w *SpinBox) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*SpinBox) ForegroundM added in v1.0.16

func (w *SpinBox) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*SpinBox) Format added in v1.0.14

func (w *SpinBox) Format() (string, error)

Format reports an alternate format to use when setting the string value when using the \fB-from\fR and \fB-to\fR range. This must be a format specifier of the form \fB%<pad>.<pad>f\fR, as it will format a floating-point number.

func (*SpinBox) FormatM added in v1.0.16

func (w *SpinBox) FormatM() string

FormatM is like Format but panics on error.

func (*SpinBox) From added in v1.0.14

func (w *SpinBox) From() (string, error)

A floating-point value corresponding to the lowest value for a spinbox, to be used in conjunction with \fB-to\fR and \fB-increment\fR. When all are specified correctly, the spinbox will use these values to control its contents. This value must be less than the \fB-to\fR option. If \fB-values\fR is specified, it supersedes this option.

func (*SpinBox) FromM added in v1.0.16

func (w *SpinBox) FromM() string

FromM is like From but panics on error.

func (*SpinBox) HighlightBackground added in v1.0.14

func (w *SpinBox) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*SpinBox) HighlightBackgroundM added in v1.0.16

func (w *SpinBox) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*SpinBox) HighlightColor added in v1.0.14

func (w *SpinBox) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*SpinBox) HighlightColorM added in v1.0.16

func (w *SpinBox) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*SpinBox) HighlightThickness added in v1.0.14

func (w *SpinBox) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*SpinBox) HighlightThicknessM added in v1.0.16

func (w *SpinBox) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*SpinBox) Increment added in v1.0.14

func (w *SpinBox) Increment() (string, error)

A floating-point value specifying the increment. When used with \fB-from\fR and \fB-to\fR, the value in the widget will be adjusted by \fB-increment\fR when a spin button is pressed (up adds the value, down subtracts the value).

func (*SpinBox) IncrementM added in v1.0.16

func (w *SpinBox) IncrementM() string

IncrementM is like Increment but panics on error.

func (*SpinBox) InsertBackground added in v1.0.14

func (w *SpinBox) InsertBackground() (string, error)

InsertBackground reports 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).

func (*SpinBox) InsertBackgroundM added in v1.0.16

func (w *SpinBox) InsertBackgroundM() string

InsertBackgroundM is like InsertBackground but panics on error.

func (*SpinBox) InsertBorderWidth added in v1.0.14

func (w *SpinBox) InsertBorderWidth() (string, error)

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*SpinBox) InsertBorderWidthM added in v1.0.16

func (w *SpinBox) InsertBorderWidthM() string

InsertBorderWidthM is like InsertBorderWidth but panics on error.

func (*SpinBox) InsertOffTime added in v1.0.14

func (w *SpinBox) InsertOffTime() (int, error)

InsertOffTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*SpinBox) InsertOffTimeM added in v1.0.16

func (w *SpinBox) InsertOffTimeM() int

InsertOffTimeM is like InsertOffTime but panics on error.

func (*SpinBox) InsertOnTime added in v1.0.14

func (w *SpinBox) InsertOnTime() (int, error)

InsertOnTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*SpinBox) InsertOnTimeM added in v1.0.16

func (w *SpinBox) InsertOnTimeM() int

InsertOnTimeM is like InsertOnTime but panics on error.

func (*SpinBox) InsertWidth added in v1.0.14

func (w *SpinBox) InsertWidth() (string, error)

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*SpinBox) InsertWidthM added in v1.0.16

func (w *SpinBox) InsertWidthM() string

InsertWidthM is like InsertWidth but panics on error.

func (*SpinBox) InvalidCommand added in v1.0.14

func (w *SpinBox) InvalidCommand() (string, error)

InvalidCommand reports a script to eval when \fB-validatecommand\fR returns 0. Setting it to an empty string disables this feature (the default). The best use of this option is to set it to \fIbell\fR. See \fBVALIDATION\fR below for more information.

func (*SpinBox) InvalidCommandM added in v1.0.16

func (w *SpinBox) InvalidCommandM() string

InvalidCommandM is like InvalidCommand but panics on error.

func (*SpinBox) Justify added in v1.0.14

func (w *SpinBox) Justify() (string, error)

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*SpinBox) JustifyM added in v1.0.16

func (w *SpinBox) JustifyM() string

JustifyM is like Justify but panics on error.

func (*SpinBox) ReadonlyBackground added in v1.0.14

func (w *SpinBox) ReadonlyBackground() (string, error)

ReadonlyBackground reports the background color to use when the spinbox is readonly. If this option is the empty string, the normal background color is used.

func (*SpinBox) ReadonlyBackgroundM added in v1.0.16

func (w *SpinBox) ReadonlyBackgroundM() string

ReadonlyBackgroundM is like ReadonlyBackground but panics on error.

func (*SpinBox) Relief added in v1.0.14

func (w *SpinBox) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*SpinBox) ReliefM added in v1.0.16

func (w *SpinBox) ReliefM() string

ReliefM is like Relief but panics on error.

func (*SpinBox) RepeatDelay added in v1.0.14

func (w *SpinBox) RepeatDelay() (string, error)

RepeatDelay reports 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.

func (*SpinBox) RepeatDelayM added in v1.0.16

func (w *SpinBox) RepeatDelayM() string

RepeatDelayM is like RepeatDelay but panics on error.

func (*SpinBox) RepeatInterval added in v1.0.14

func (w *SpinBox) RepeatInterval() (string, error)

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*SpinBox) RepeatIntervalM added in v1.0.16

func (w *SpinBox) RepeatIntervalM() string

RepeatIntervalM is like RepeatInterval but panics on error.

func (*SpinBox) SelectBackground added in v1.0.14

func (w *SpinBox) SelectBackground() (string, error)

SelectBackground reports the background color to use when displaying selected items.

func (*SpinBox) SelectBackgroundM added in v1.0.16

func (w *SpinBox) SelectBackgroundM() string

SelectBackgroundM is like SelectBackground but panics on error.

func (*SpinBox) SelectBorderWidth added in v1.0.17

func (w *SpinBox) SelectBorderWidth() (string, error)

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*SpinBox) SelectBorderWidthM added in v1.0.17

func (w *SpinBox) SelectBorderWidthM() string

SelectBorderWidthM is like SelectBorderWidth but panics on error.

func (*SpinBox) SelectForeground added in v1.0.14

func (w *SpinBox) SelectForeground() (string, error)

SelectForeground reports the foreground color to use when displaying selected items.

func (*SpinBox) SelectForegroundM added in v1.0.16

func (w *SpinBox) SelectForegroundM() string

SelectForegroundM is like SelectForeground but panics on error.

func (*SpinBox) SetActiveBackground added in v1.0.14

func (w *SpinBox) SetActiveBackground(value string) error

ActiveBackground reports 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 \fBtk_strictMotif\fR 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.

func (*SpinBox) SetActiveBackgroundM added in v1.0.16

func (w *SpinBox) SetActiveBackgroundM(value string) *SpinBox

SetActiveBackgroundM is like ActiveBackground but panics on error

func (*SpinBox) SetBackground added in v1.0.14

func (w *SpinBox) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*SpinBox) SetBackgroundM added in v1.0.16

func (w *SpinBox) SetBackgroundM(value string) *SpinBox

SetBackgroundM is like Background but panics on error

func (*SpinBox) SetBorderWidth added in v1.0.14

func (w *SpinBox) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*SpinBox) SetBorderWidthM added in v1.0.16

func (w *SpinBox) SetBorderWidthM(value string) *SpinBox

SetBorderWidthM is like BorderWidth but panics on error

func (*SpinBox) SetButtonBackground added in v1.0.14

func (w *SpinBox) SetButtonBackground(value string) error

The background color to be used for the spin buttons.

func (*SpinBox) SetButtonBackgroundM added in v1.0.16

func (w *SpinBox) SetButtonBackgroundM(value string) *SpinBox

SetButtonBackgroundM is like ButtonBackground but panics on error

func (*SpinBox) SetButtonCursor added in v1.0.14

func (w *SpinBox) SetButtonCursor(value string) error

The cursor to be used when over the spin buttons. If this is empty (the default), a default cursor will be used.

func (*SpinBox) SetButtonCursorM added in v1.0.16

func (w *SpinBox) SetButtonCursorM(value string) *SpinBox

SetButtonCursorM is like ButtonCursor but panics on error

func (*SpinBox) SetButtonDownRelief added in v1.0.14

func (w *SpinBox) SetButtonDownRelief(value string) error

The relief to be used for the upper spin button.

func (*SpinBox) SetButtonDownReliefM added in v1.0.16

func (w *SpinBox) SetButtonDownReliefM(value string) *SpinBox

SetButtonDownReliefM is like ButtonDownRelief but panics on error

func (*SpinBox) SetButtonuPRelief added in v1.0.14

func (w *SpinBox) SetButtonuPRelief(value string) error

The relief to be used for the lower spin button.

func (*SpinBox) SetButtonuPReliefM added in v1.0.16

func (w *SpinBox) SetButtonuPReliefM(value string) *SpinBox

SetButtonuPReliefM is like ButtonuPRelief but panics on error

func (*SpinBox) SetCommand added in v1.0.14

func (w *SpinBox) SetCommand(value Command) error

Command specifies a Tcl command to invoke whenever a spinbutton is invoked. The command recognizes several percent substitutions: \fB%W\fR for the widget path, \fB%s\fR for the current value of the widget, and \fB%d\fR for the direction of the button pressed (\fBup\fR or \fBdown\fR).

func (*SpinBox) SetCommandM added in v1.0.16

func (w *SpinBox) SetCommandM(value Command) *SpinBox

SetCommandM is like Command but panics on error

func (*SpinBox) SetCursor added in v1.0.14

func (w *SpinBox) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*SpinBox) SetCursorM added in v1.0.16

func (w *SpinBox) SetCursorM(value string) *SpinBox

SetCursorM is like Cursor but panics on error

func (*SpinBox) SetDisabledBackground added in v1.0.14

func (w *SpinBox) SetDisabledBackground(value string) error

DisabledBackground reports the background color to use when the spinbox is disabled. If this option is the empty string, the normal background color is used.

func (*SpinBox) SetDisabledBackgroundM added in v1.0.16

func (w *SpinBox) SetDisabledBackgroundM(value string) *SpinBox

SetDisabledBackgroundM is like DisabledBackground but panics on error

func (*SpinBox) SetDisabledForeground added in v1.0.14

func (w *SpinBox) SetDisabledForeground(value string) error

DisabledForeground reports the foreground color to use when the spinbox is disabled. If this option is the empty string, the normal foreground color is used.

func (*SpinBox) SetDisabledForegroundM added in v1.0.16

func (w *SpinBox) SetDisabledForegroundM(value string) *SpinBox

SetDisabledForegroundM is like DisabledForeground but panics on error

func (*SpinBox) SetExportSelection added in v1.0.14

func (w *SpinBox) SetExportSelection(value bool) error

ExportSelection 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 \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*SpinBox) SetExportSelectionM added in v1.0.16

func (w *SpinBox) SetExportSelectionM(value bool) *SpinBox

ExportSelectionM is like ExportSelection but panics on error.

func (*SpinBox) SetFont added in v1.0.14

func (w *SpinBox) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*SpinBox) SetFontM added in v1.0.16

func (w *SpinBox) SetFontM(value string) *SpinBox

SetFontM is like Font but panics on error

func (*SpinBox) SetForeground added in v1.0.14

func (w *SpinBox) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*SpinBox) SetForegroundM added in v1.0.16

func (w *SpinBox) SetForegroundM(value string) *SpinBox

SetForegroundM is like Foreground but panics on error

func (*SpinBox) SetFormat added in v1.0.14

func (w *SpinBox) SetFormat(value string) error

Format reports an alternate format to use when setting the string value when using the \fB-from\fR and \fB-to\fR range. This must be a format specifier of the form \fB%<pad>.<pad>f\fR, as it will format a floating-point number.

func (*SpinBox) SetFormatM added in v1.0.16

func (w *SpinBox) SetFormatM(value string) *SpinBox

SetFormatM is like Format but panics on error

func (*SpinBox) SetFrom added in v1.0.14

func (w *SpinBox) SetFrom(value string) error

A floating-point value corresponding to the lowest value for a spinbox, to be used in conjunction with \fB-to\fR and \fB-increment\fR. When all are specified correctly, the spinbox will use these values to control its contents. This value must be less than the \fB-to\fR option. If \fB-values\fR is specified, it supersedes this option.

func (*SpinBox) SetFromM added in v1.0.16

func (w *SpinBox) SetFromM(value string) *SpinBox

SetFromM is like From but panics on error

func (*SpinBox) SetHighlightBackground added in v1.0.14

func (w *SpinBox) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*SpinBox) SetHighlightBackgroundM added in v1.0.16

func (w *SpinBox) SetHighlightBackgroundM(value string) *SpinBox

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*SpinBox) SetHighlightColor added in v1.0.14

func (w *SpinBox) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*SpinBox) SetHighlightColorM added in v1.0.16

func (w *SpinBox) SetHighlightColorM(value string) *SpinBox

SetHighlightColorM is like HighlightColor but panics on error

func (*SpinBox) SetHighlightThickness added in v1.0.14

func (w *SpinBox) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*SpinBox) SetHighlightThicknessM added in v1.0.16

func (w *SpinBox) SetHighlightThicknessM(value string) *SpinBox

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*SpinBox) SetIncrement added in v1.0.14

func (w *SpinBox) SetIncrement(value string) error

A floating-point value specifying the increment. When used with \fB-from\fR and \fB-to\fR, the value in the widget will be adjusted by \fB-increment\fR when a spin button is pressed (up adds the value, down subtracts the value).

func (*SpinBox) SetIncrementM added in v1.0.16

func (w *SpinBox) SetIncrementM(value string) *SpinBox

SetIncrementM is like Increment but panics on error

func (*SpinBox) SetInsertBackground added in v1.0.14

func (w *SpinBox) SetInsertBackground(value string) error

InsertBackground reports 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).

func (*SpinBox) SetInsertBackgroundM added in v1.0.16

func (w *SpinBox) SetInsertBackgroundM(value string) *SpinBox

SetInsertBackgroundM is like InsertBackground but panics on error

func (*SpinBox) SetInsertBorderWidth added in v1.0.14

func (w *SpinBox) SetInsertBorderWidth(value string) error

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*SpinBox) SetInsertBorderWidthM added in v1.0.16

func (w *SpinBox) SetInsertBorderWidthM(value string) *SpinBox

SetInsertBorderWidthM is like InsertBorderWidth but panics on error

func (*SpinBox) SetInsertOffTime added in v1.0.14

func (w *SpinBox) SetInsertOffTime(value int) error

InsertOffTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*SpinBox) SetInsertOffTimeM added in v1.0.16

func (w *SpinBox) SetInsertOffTimeM(value int) *SpinBox

InsertOffTimeM is like InsertOffTime but panics on error.

func (*SpinBox) SetInsertOnTime added in v1.0.14

func (w *SpinBox) SetInsertOnTime(value int) error

InsertOnTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*SpinBox) SetInsertOnTimeM added in v1.0.16

func (w *SpinBox) SetInsertOnTimeM(value int) *SpinBox

InsertOnTimeM is like InsertOnTime but panics on error.

func (*SpinBox) SetInsertWidth added in v1.0.14

func (w *SpinBox) SetInsertWidth(value string) error

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*SpinBox) SetInsertWidthM added in v1.0.16

func (w *SpinBox) SetInsertWidthM(value string) *SpinBox

SetInsertWidthM is like InsertWidth but panics on error

func (*SpinBox) SetInvalidCommand added in v1.0.14

func (w *SpinBox) SetInvalidCommand(value string) error

InvalidCommand reports a script to eval when \fB-validatecommand\fR returns 0. Setting it to an empty string disables this feature (the default). The best use of this option is to set it to \fIbell\fR. See \fBVALIDATION\fR below for more information.

func (*SpinBox) SetInvalidCommandM added in v1.0.16

func (w *SpinBox) SetInvalidCommandM(value string) *SpinBox

SetInvalidCommandM is like InvalidCommand but panics on error

func (*SpinBox) SetJustify added in v1.0.14

func (w *SpinBox) SetJustify(value string) error

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 \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR means that the lines' centers are aligned, and \fBright\fR means that the lines' right edges line up.

func (*SpinBox) SetJustifyM added in v1.0.16

func (w *SpinBox) SetJustifyM(value string) *SpinBox

SetJustifyM is like Justify but panics on error

func (*SpinBox) SetReadonlyBackground added in v1.0.14

func (w *SpinBox) SetReadonlyBackground(value string) error

ReadonlyBackground reports the background color to use when the spinbox is readonly. If this option is the empty string, the normal background color is used.

func (*SpinBox) SetReadonlyBackgroundM added in v1.0.16

func (w *SpinBox) SetReadonlyBackgroundM(value string) *SpinBox

SetReadonlyBackgroundM is like ReadonlyBackground but panics on error

func (*SpinBox) SetRelief added in v1.0.14

func (w *SpinBox) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*SpinBox) SetReliefM added in v1.0.16

func (w *SpinBox) SetReliefM(value string) *SpinBox

SetReliefM is like Relief but panics on error

func (*SpinBox) SetRepeatDelay added in v1.0.14

func (w *SpinBox) SetRepeatDelay(value string) error

RepeatDelay reports 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.

func (*SpinBox) SetRepeatDelayM added in v1.0.16

func (w *SpinBox) SetRepeatDelayM(value string) *SpinBox

SetRepeatDelayM is like RepeatDelay but panics on error

func (*SpinBox) SetRepeatInterval added in v1.0.14

func (w *SpinBox) SetRepeatInterval(value string) error

Used in conjunction with \fB-repeatdelay\fR: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

func (*SpinBox) SetRepeatIntervalM added in v1.0.16

func (w *SpinBox) SetRepeatIntervalM(value string) *SpinBox

SetRepeatIntervalM is like RepeatInterval but panics on error

func (*SpinBox) SetSelectBackground added in v1.0.14

func (w *SpinBox) SetSelectBackground(value string) error

SelectBackground reports the background color to use when displaying selected items.

func (*SpinBox) SetSelectBackgroundM added in v1.0.16

func (w *SpinBox) SetSelectBackgroundM(value string) *SpinBox

SetSelectBackgroundM is like SelectBackground but panics on error

func (*SpinBox) SetSelectBorderWidth added in v1.0.17

func (w *SpinBox) SetSelectBorderWidth(value string) error

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*SpinBox) SetSelectBorderWidthM added in v1.0.17

func (w *SpinBox) SetSelectBorderWidthM(value string) *SpinBox

SetSelectBorderWidthM is like SelectBorderWidth but panics on error

func (*SpinBox) SetSelectForeground added in v1.0.14

func (w *SpinBox) SetSelectForeground(value string) error

SelectForeground reports the foreground color to use when displaying selected items.

func (*SpinBox) SetSelectForegroundM added in v1.0.16

func (w *SpinBox) SetSelectForegroundM(value string) *SpinBox

SetSelectForegroundM is like SelectForeground but panics on error

func (*SpinBox) SetState added in v1.0.14

func (w *SpinBox) SetState(value string) error

State reports one of three states for the spinbox: \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. If the spinbox is readonly, then the value may not be changed using widget commands and no insertion cursor will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the spinbox is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the spinbox may be displayed in a different color, depending on the values of the \fB-disabledforeground\fR and \fB-disabledbackground\fR options.

func (*SpinBox) SetStateM added in v1.0.16

func (w *SpinBox) SetStateM(value string) *SpinBox

SetStateM is like State but panics on error

func (*SpinBox) SetTakeFocus added in v1.0.14

func (w *SpinBox) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*SpinBox) SetTakeFocusM added in v1.0.16

func (w *SpinBox) SetTakeFocusM(value string) *SpinBox

SetTakeFocusM is like TakeFocus but panics on error

func (*SpinBox) SetTextVariable added in v1.0.15

func (w *SpinBox) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*SpinBox) SetTextVariableM added in v1.0.16

func (w *SpinBox) SetTextVariableM(value string) *SpinBox

SetTextVariableM is like TextVariable but panics on error

func (*SpinBox) SetTo added in v1.0.14

func (w *SpinBox) SetTo(value string) error

A floating-point value corresponding to the highest value for the spinbox, to be used in conjunction with \fB-from\fR and \fB-increment\fR. When all are specified correctly, the spinbox will use these values to control its contents. This value must be greater than the \fB-from\fR option. If \fB-values\fR is specified, it supersedes this option.

func (*SpinBox) SetToM added in v1.0.16

func (w *SpinBox) SetToM(value string) *SpinBox

SetToM is like To but panics on error

func (*SpinBox) SetValidate added in v1.0.14

func (w *SpinBox) SetValidate(value string) error

Validate reports the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. It defaults to \fBnone\fR. When you want validation, you must explicitly state which mode you wish to use. See \fBVALIDATION\fR below for more.

func (*SpinBox) SetValidateCommand added in v1.0.14

func (w *SpinBox) SetValidateCommand(value string) error

ValidateCommand reports a script to evaluate when you want to validate the input in the widget. Setting it to an empty string disables this feature (the default). Validation occurs according to the value of \fB-validate\fR. This command must return a valid Tcl boolean value. If it returns 0 (or the valid Tcl boolean equivalent) then the value of the widget will not change and the \fB-invalidcommand\fR will be evaluated if it is set. If it returns 1, then value will be changed. See \fBVALIDATION\fR below for more information.

func (*SpinBox) SetValidateCommandM added in v1.0.16

func (w *SpinBox) SetValidateCommandM(value string) *SpinBox

SetValidateCommandM is like ValidateCommand but panics on error

func (*SpinBox) SetValidateM added in v1.0.16

func (w *SpinBox) SetValidateM(value string) *SpinBox

SetValidateM is like Validate but panics on error

func (*SpinBox) SetValues added in v1.0.14

func (w *SpinBox) SetValues(value string) error

Must be a proper list value. If specified, the spinbox will use these values as to control its contents, starting with the first value. This option has precedence over the \fB-from\fR and \fB-to\fR range.

func (*SpinBox) SetValuesM added in v1.0.16

func (w *SpinBox) SetValuesM(value string) *SpinBox

SetValuesM is like Values but panics on error

func (*SpinBox) SetWidth added in v1.0.14

func (w *SpinBox) SetWidth(value string) error

Width reports an integer value indicating the desired width of the spinbox window, in average-size characters of the widget's font. If the value is less than or equal to zero, the widget picks a size just large enough to hold its current text.

func (*SpinBox) SetWidthM added in v1.0.16

func (w *SpinBox) SetWidthM(value string) *SpinBox

SetWidthM is like Width but panics on error

func (*SpinBox) SetWrap added in v1.0.14

func (w *SpinBox) SetWrap(value string) error

Must be a proper boolean value. If on, the spinbox will wrap around the values of data in the widget.

func (*SpinBox) SetWrapM added in v1.0.16

func (w *SpinBox) SetWrapM(value string) *SpinBox

SetWrapM is like Wrap but panics on error

func (*SpinBox) SetXScrollCommand added in v1.0.14

func (w *SpinBox) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*SpinBox) SetXScrollCommandM added in v1.0.16

func (w *SpinBox) SetXScrollCommandM(value Command) *SpinBox

SetXScrollCommandM is like XScrollCommand but panics on error

func (*SpinBox) State added in v1.0.14

func (w *SpinBox) State() (string, error)

State reports one of three states for the spinbox: \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. If the spinbox is readonly, then the value may not be changed using widget commands and no insertion cursor will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the spinbox is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the spinbox may be displayed in a different color, depending on the values of the \fB-disabledforeground\fR and \fB-disabledbackground\fR options.

func (*SpinBox) StateM added in v1.0.16

func (w *SpinBox) StateM() string

StateM is like State but panics on error.

func (*SpinBox) TakeFocus added in v1.0.14

func (w *SpinBox) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*SpinBox) TakeFocusM added in v1.0.16

func (w *SpinBox) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*SpinBox) TextVariable added in v1.0.15

func (w *SpinBox) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*SpinBox) TextVariableM added in v1.0.16

func (w *SpinBox) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*SpinBox) To added in v1.0.14

func (w *SpinBox) To() (string, error)

A floating-point value corresponding to the highest value for the spinbox, to be used in conjunction with \fB-from\fR and \fB-increment\fR. When all are specified correctly, the spinbox will use these values to control its contents. This value must be greater than the \fB-from\fR option. If \fB-values\fR is specified, it supersedes this option.

func (*SpinBox) ToM added in v1.0.16

func (w *SpinBox) ToM() string

ToM is like To but panics on error.

func (*SpinBox) Validate added in v1.0.14

func (w *SpinBox) Validate() (string, error)

Validate reports the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. It defaults to \fBnone\fR. When you want validation, you must explicitly state which mode you wish to use. See \fBVALIDATION\fR below for more.

func (*SpinBox) ValidateCommand added in v1.0.14

func (w *SpinBox) ValidateCommand() (string, error)

ValidateCommand reports a script to evaluate when you want to validate the input in the widget. Setting it to an empty string disables this feature (the default). Validation occurs according to the value of \fB-validate\fR. This command must return a valid Tcl boolean value. If it returns 0 (or the valid Tcl boolean equivalent) then the value of the widget will not change and the \fB-invalidcommand\fR will be evaluated if it is set. If it returns 1, then value will be changed. See \fBVALIDATION\fR below for more information.

func (*SpinBox) ValidateCommandM added in v1.0.16

func (w *SpinBox) ValidateCommandM() string

ValidateCommandM is like ValidateCommand but panics on error.

func (*SpinBox) ValidateM added in v1.0.16

func (w *SpinBox) ValidateM() string

ValidateM is like Validate but panics on error.

func (*SpinBox) Values added in v1.0.14

func (w *SpinBox) Values() (string, error)

Must be a proper list value. If specified, the spinbox will use these values as to control its contents, starting with the first value. This option has precedence over the \fB-from\fR and \fB-to\fR range.

func (*SpinBox) ValuesM added in v1.0.16

func (w *SpinBox) ValuesM() string

ValuesM is like Values but panics on error.

func (*SpinBox) Width added in v1.0.14

func (w *SpinBox) Width() (string, error)

Width reports an integer value indicating the desired width of the spinbox window, in average-size characters of the widget's font. If the value is less than or equal to zero, the widget picks a size just large enough to hold its current text.

func (*SpinBox) WidthM added in v1.0.16

func (w *SpinBox) WidthM() string

WidthM is like Width but panics on error.

func (*SpinBox) Wrap added in v1.0.14

func (w *SpinBox) Wrap() (string, error)

Must be a proper boolean value. If on, the spinbox will wrap around the values of data in the widget.

func (*SpinBox) WrapM added in v1.0.16

func (w *SpinBox) WrapM() string

WrapM is like Wrap but panics on error.

type TButton added in v1.0.13

type TButton struct {
	Window
}

TButton represents the Tk ttk::button widget.

func (*TButton) Class added in v1.0.14

func (w *TButton) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TButton) ClassM added in v1.0.16

func (w *TButton) ClassM() string

ClassM is like Class but panics on error.

func (*TButton) Compound added in v1.0.14

func (w *TButton) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TButton) CompoundM added in v1.0.16

func (w *TButton) CompoundM() string

CompoundM is like Compound but panics on error.

func (*TButton) Cursor added in v1.0.14

func (w *TButton) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TButton) CursorM added in v1.0.16

func (w *TButton) CursorM() string

CursorM is like Cursor but panics on error.

func (*TButton) Default added in v1.0.14

func (w *TButton) Default() (string, error)

May be set to one of \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In a dialog box, one button may be designated the TODO .QW(default) button (meaning, roughly, TODO .QW("the one that gets invoked when the user presses <Enter>" ).) \fBactive\fR indicates that this is currently the default button; \fBnormal\fR means that it may become the default button, and \fBdisabled\fR means that it is not defaultable. The default is \fBnormal\fR.

func (*TButton) DefaultM added in v1.0.16

func (w *TButton) DefaultM() string

DefaultM is like Default but panics on error.

func (*TButton) Image added in v1.0.14

func (w *TButton) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TButton) ImageM added in v1.0.16

func (w *TButton) ImageM() string

ImageM is like Image but panics on error.

func (*TButton) SetCommand added in v1.0.14

func (w *TButton) SetCommand(value Command) error

A script to evaluate when the widget is invoked.

func (*TButton) SetCommandM added in v1.0.16

func (w *TButton) SetCommandM(value Command) *TButton

SetCommandM is like Command but panics on error

func (*TButton) SetCompound added in v1.0.14

func (w *TButton) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TButton) SetCompoundM added in v1.0.16

func (w *TButton) SetCompoundM(value string) *TButton

SetCompoundM is like Compound but panics on error

func (*TButton) SetCursor added in v1.0.14

func (w *TButton) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TButton) SetCursorM added in v1.0.16

func (w *TButton) SetCursorM(value string) *TButton

SetCursorM is like Cursor but panics on error

func (*TButton) SetDefault added in v1.0.14

func (w *TButton) SetDefault(value string) error

May be set to one of \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In a dialog box, one button may be designated the TODO .QW(default) button (meaning, roughly, TODO .QW("the one that gets invoked when the user presses <Enter>" ).) \fBactive\fR indicates that this is currently the default button; \fBnormal\fR means that it may become the default button, and \fBdisabled\fR means that it is not defaultable. The default is \fBnormal\fR.

func (*TButton) SetDefaultM added in v1.0.16

func (w *TButton) SetDefaultM(value string) *TButton

SetDefaultM is like Default but panics on error

func (*TButton) SetImage added in v1.0.14

func (w *TButton) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TButton) SetImageM added in v1.0.16

func (w *TButton) SetImageM(value string) *TButton

SetImageM is like Image but panics on error

func (*TButton) SetState added in v1.0.14

func (w *TButton) SetState(value string) error

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TButton) SetStateM added in v1.0.16

func (w *TButton) SetStateM(value string) *TButton

SetStateM is like State but panics on error

func (*TButton) SetStyle added in v1.0.14

func (w *TButton) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TButton) SetStyleM added in v1.0.16

func (w *TButton) SetStyleM(value string) *TButton

SetStyleM is like Style but panics on error

func (*TButton) SetTakeFocus added in v1.0.14

func (w *TButton) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TButton) SetTakeFocusM added in v1.0.16

func (w *TButton) SetTakeFocusM(value string) *TButton

SetTakeFocusM is like TakeFocus but panics on error

func (*TButton) SetText added in v1.0.13

func (w *TButton) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TButton) SetTextM added in v1.0.16

func (w *TButton) SetTextM(value string) *TButton

SetTextM is like Text but panics on error

func (*TButton) SetTextVariable added in v1.0.15

func (w *TButton) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TButton) SetTextVariableM added in v1.0.16

func (w *TButton) SetTextVariableM(value string) *TButton

SetTextVariableM is like TextVariable but panics on error

func (*TButton) SetUnderline added in v1.0.14

func (w *TButton) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TButton) SetUnderlineM added in v1.0.16

func (w *TButton) SetUnderlineM(value string) *TButton

SetUnderlineM is like Underline but panics on error

func (*TButton) SetWidth added in v1.0.14

func (w *TButton) SetWidth(value string) error

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TButton) SetWidthM added in v1.0.16

func (w *TButton) SetWidthM(value string) *TButton

SetWidthM is like Width but panics on error

func (*TButton) State added in v1.0.14

func (w *TButton) State() (string, error)

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TButton) StateM added in v1.0.16

func (w *TButton) StateM() string

StateM is like State but panics on error.

func (*TButton) Style added in v1.0.14

func (w *TButton) Style() (string, error)

May be used to specify a custom widget style.

func (*TButton) StyleM added in v1.0.16

func (w *TButton) StyleM() string

StyleM is like Style but panics on error.

func (*TButton) TakeFocus added in v1.0.14

func (w *TButton) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TButton) TakeFocusM added in v1.0.16

func (w *TButton) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TButton) Text added in v1.0.13

func (w *TButton) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TButton) TextM added in v1.0.16

func (w *TButton) TextM() string

TextM is like Text but panics on error.

func (*TButton) TextVariable added in v1.0.15

func (w *TButton) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TButton) TextVariableM added in v1.0.16

func (w *TButton) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*TButton) Underline added in v1.0.14

func (w *TButton) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TButton) UnderlineM added in v1.0.16

func (w *TButton) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*TButton) Width added in v1.0.14

func (w *TButton) Width() (string, error)

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TButton) WidthM added in v1.0.16

func (w *TButton) WidthM() string

WidthM is like Width but panics on error.

type TCheckButton added in v1.0.14

type TCheckButton struct {
	Window
}

TCheckButton represents the Tk ttk::checkbutton widget.

func (*TCheckButton) Class added in v1.0.14

func (w *TCheckButton) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TCheckButton) ClassM added in v1.0.16

func (w *TCheckButton) ClassM() string

ClassM is like Class but panics on error.

func (*TCheckButton) Compound added in v1.0.14

func (w *TCheckButton) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TCheckButton) CompoundM added in v1.0.16

func (w *TCheckButton) CompoundM() string

CompoundM is like Compound but panics on error.

func (*TCheckButton) Cursor added in v1.0.14

func (w *TCheckButton) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TCheckButton) CursorM added in v1.0.16

func (w *TCheckButton) CursorM() string

CursorM is like Cursor but panics on error.

func (*TCheckButton) Image added in v1.0.14

func (w *TCheckButton) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TCheckButton) ImageM added in v1.0.16

func (w *TCheckButton) ImageM() string

ImageM is like Image but panics on error.

func (*TCheckButton) OffValue added in v1.0.14

func (w *TCheckButton) OffValue() (string, error)

The value to store in the associated \fB-variable\fR when the widget is deselected. Defaults to \fB0\fR.

func (*TCheckButton) OffValueM added in v1.0.16

func (w *TCheckButton) OffValueM() string

OffValueM is like OffValue but panics on error.

func (*TCheckButton) OnValue added in v1.0.14

func (w *TCheckButton) OnValue() (string, error)

The value to store in the associated \fB-variable\fR when the widget is selected. Defaults to \fB1\fR.

func (*TCheckButton) OnValueM added in v1.0.16

func (w *TCheckButton) OnValueM() string

OnValueM is like OnValue but panics on error.

func (*TCheckButton) SetCommand added in v1.0.14

func (w *TCheckButton) SetCommand(value Command) error

A Tcl script to execute whenever the widget is invoked.

func (*TCheckButton) SetCommandM added in v1.0.16

func (w *TCheckButton) SetCommandM(value Command) *TCheckButton

SetCommandM is like Command but panics on error

func (*TCheckButton) SetCompound added in v1.0.14

func (w *TCheckButton) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TCheckButton) SetCompoundM added in v1.0.16

func (w *TCheckButton) SetCompoundM(value string) *TCheckButton

SetCompoundM is like Compound but panics on error

func (*TCheckButton) SetCursor added in v1.0.14

func (w *TCheckButton) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TCheckButton) SetCursorM added in v1.0.16

func (w *TCheckButton) SetCursorM(value string) *TCheckButton

SetCursorM is like Cursor but panics on error

func (*TCheckButton) SetImage added in v1.0.14

func (w *TCheckButton) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TCheckButton) SetImageM added in v1.0.16

func (w *TCheckButton) SetImageM(value string) *TCheckButton

SetImageM is like Image but panics on error

func (*TCheckButton) SetOffValue added in v1.0.14

func (w *TCheckButton) SetOffValue(value string) error

The value to store in the associated \fB-variable\fR when the widget is deselected. Defaults to \fB0\fR.

func (*TCheckButton) SetOffValueM added in v1.0.16

func (w *TCheckButton) SetOffValueM(value string) *TCheckButton

SetOffValueM is like OffValue but panics on error

func (*TCheckButton) SetOnValue added in v1.0.14

func (w *TCheckButton) SetOnValue(value string) error

The value to store in the associated \fB-variable\fR when the widget is selected. Defaults to \fB1\fR.

func (*TCheckButton) SetOnValueM added in v1.0.16

func (w *TCheckButton) SetOnValueM(value string) *TCheckButton

SetOnValueM is like OnValue but panics on error

func (*TCheckButton) SetState added in v1.0.14

func (w *TCheckButton) SetState(value string) error

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TCheckButton) SetStateM added in v1.0.16

func (w *TCheckButton) SetStateM(value string) *TCheckButton

SetStateM is like State but panics on error

func (*TCheckButton) SetStyle added in v1.0.14

func (w *TCheckButton) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TCheckButton) SetStyleM added in v1.0.16

func (w *TCheckButton) SetStyleM(value string) *TCheckButton

SetStyleM is like Style but panics on error

func (*TCheckButton) SetTakeFocus added in v1.0.14

func (w *TCheckButton) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TCheckButton) SetTakeFocusM added in v1.0.16

func (w *TCheckButton) SetTakeFocusM(value string) *TCheckButton

SetTakeFocusM is like TakeFocus but panics on error

func (*TCheckButton) SetText added in v1.0.14

func (w *TCheckButton) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TCheckButton) SetTextM added in v1.0.16

func (w *TCheckButton) SetTextM(value string) *TCheckButton

SetTextM is like Text but panics on error

func (*TCheckButton) SetTextVariable added in v1.0.15

func (w *TCheckButton) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TCheckButton) SetTextVariableM added in v1.0.16

func (w *TCheckButton) SetTextVariableM(value string) *TCheckButton

SetTextVariableM is like TextVariable but panics on error

func (*TCheckButton) SetUnderline added in v1.0.14

func (w *TCheckButton) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TCheckButton) SetUnderlineM added in v1.0.16

func (w *TCheckButton) SetUnderlineM(value string) *TCheckButton

SetUnderlineM is like Underline but panics on error

func (*TCheckButton) SetVariable added in v1.0.15

func (w *TCheckButton) SetVariable(value string) error

The name of a global variable whose value is linked to the widget. Defaults to the widget pathname if not specified.

func (*TCheckButton) SetVariableM added in v1.0.16

func (w *TCheckButton) SetVariableM(value string) *TCheckButton

SetVariableM is like Variable but panics on error

func (*TCheckButton) SetWidth added in v1.0.14

func (w *TCheckButton) SetWidth(value string) error

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TCheckButton) SetWidthM added in v1.0.16

func (w *TCheckButton) SetWidthM(value string) *TCheckButton

SetWidthM is like Width but panics on error

func (*TCheckButton) State added in v1.0.14

func (w *TCheckButton) State() (string, error)

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TCheckButton) StateM added in v1.0.16

func (w *TCheckButton) StateM() string

StateM is like State but panics on error.

func (*TCheckButton) Style added in v1.0.14

func (w *TCheckButton) Style() (string, error)

May be used to specify a custom widget style.

func (*TCheckButton) StyleM added in v1.0.16

func (w *TCheckButton) StyleM() string

StyleM is like Style but panics on error.

func (*TCheckButton) TakeFocus added in v1.0.14

func (w *TCheckButton) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TCheckButton) TakeFocusM added in v1.0.16

func (w *TCheckButton) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TCheckButton) Text added in v1.0.14

func (w *TCheckButton) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TCheckButton) TextM added in v1.0.16

func (w *TCheckButton) TextM() string

TextM is like Text but panics on error.

func (*TCheckButton) TextVariable added in v1.0.15

func (w *TCheckButton) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TCheckButton) TextVariableM added in v1.0.16

func (w *TCheckButton) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*TCheckButton) Underline added in v1.0.14

func (w *TCheckButton) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TCheckButton) UnderlineM added in v1.0.16

func (w *TCheckButton) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*TCheckButton) Variable added in v1.0.15

func (w *TCheckButton) Variable() (string, error)

The name of a global variable whose value is linked to the widget. Defaults to the widget pathname if not specified.

func (*TCheckButton) VariableM added in v1.0.16

func (w *TCheckButton) VariableM() string

VariableM is like Variable but panics on error.

func (*TCheckButton) Width added in v1.0.14

func (w *TCheckButton) Width() (string, error)

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TCheckButton) WidthM added in v1.0.16

func (w *TCheckButton) WidthM() string

WidthM is like Width but panics on error.

type TComboBox added in v1.0.14

type TComboBox struct {
	Window
}

TComboBox represents the Tk ttk::combobox widget.

func (*TComboBox) Class added in v1.0.14

func (w *TComboBox) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TComboBox) ClassM added in v1.0.16

func (w *TComboBox) ClassM() string

ClassM is like Class but panics on error.

func (*TComboBox) Cursor added in v1.0.14

func (w *TComboBox) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TComboBox) CursorM added in v1.0.16

func (w *TComboBox) CursorM() string

CursorM is like Cursor but panics on error.

func (*TComboBox) ExportSelection added in v1.0.14

func (w *TComboBox) ExportSelection() (bool, error)

Boolean value. If set, the widget selection is linked to the X selection.

func (*TComboBox) ExportSelectionM added in v1.0.16

func (w *TComboBox) ExportSelectionM() bool

ExportSelectionM is like ExportSelection but panics on error.

func (*TComboBox) Height added in v1.0.14

func (w *TComboBox) Height() (string, error)

Height reports the height of the pop-down listbox, in rows.

func (*TComboBox) HeightM added in v1.0.16

func (w *TComboBox) HeightM() string

HeightM is like Height but panics on error.

func (*TComboBox) Justify added in v1.0.14

func (w *TComboBox) Justify() (string, error)

Justify reports how the text is aligned within the widget. Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR.

func (*TComboBox) JustifyM added in v1.0.16

func (w *TComboBox) JustifyM() string

JustifyM is like Justify but panics on error.

func (*TComboBox) PostCommand added in v1.0.14

func (w *TComboBox) PostCommand() (string, error)

A Tcl script to evaluate immediately before displaying the listbox. The \fB-postcommand\fR script may specify the \fB-values\fR to display.

func (*TComboBox) PostCommandM added in v1.0.16

func (w *TComboBox) PostCommandM() string

PostCommandM is like PostCommand but panics on error.

func (*TComboBox) SetCursor added in v1.0.14

func (w *TComboBox) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TComboBox) SetCursorM added in v1.0.16

func (w *TComboBox) SetCursorM(value string) *TComboBox

SetCursorM is like Cursor but panics on error

func (*TComboBox) SetExportSelection added in v1.0.14

func (w *TComboBox) SetExportSelection(value bool) error

Boolean value. If set, the widget selection is linked to the X selection.

func (*TComboBox) SetExportSelectionM added in v1.0.16

func (w *TComboBox) SetExportSelectionM(value bool) *TComboBox

ExportSelectionM is like ExportSelection but panics on error.

func (*TComboBox) SetHeight added in v1.0.14

func (w *TComboBox) SetHeight(value string) error

Height reports the height of the pop-down listbox, in rows.

func (*TComboBox) SetHeightM added in v1.0.16

func (w *TComboBox) SetHeightM(value string) *TComboBox

SetHeightM is like Height but panics on error

func (*TComboBox) SetJustify added in v1.0.14

func (w *TComboBox) SetJustify(value string) error

Justify reports how the text is aligned within the widget. Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR.

func (*TComboBox) SetJustifyM added in v1.0.16

func (w *TComboBox) SetJustifyM(value string) *TComboBox

SetJustifyM is like Justify but panics on error

func (*TComboBox) SetPostCommand added in v1.0.14

func (w *TComboBox) SetPostCommand(value string) error

A Tcl script to evaluate immediately before displaying the listbox. The \fB-postcommand\fR script may specify the \fB-values\fR to display.

func (*TComboBox) SetPostCommandM added in v1.0.16

func (w *TComboBox) SetPostCommandM(value string) *TComboBox

SetPostCommandM is like PostCommand but panics on error

func (*TComboBox) SetState added in v1.0.14

func (w *TComboBox) SetState(value string) error

One of \fBnormal\fR, \fBreadonly\fR, or \fBdisabled\fR. In the \fBreadonly\fR state, the value may not be edited directly, and the user can only select one of the \fB-values\fR from the dropdown list. In the \fBnormal\fR state, the text field is directly editable. In the \fBdisabled\fR state, no interaction is possible.

func (*TComboBox) SetStateM added in v1.0.16

func (w *TComboBox) SetStateM(value string) *TComboBox

SetStateM is like State but panics on error

func (*TComboBox) SetStyle added in v1.0.14

func (w *TComboBox) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TComboBox) SetStyleM added in v1.0.16

func (w *TComboBox) SetStyleM(value string) *TComboBox

SetStyleM is like Style but panics on error

func (*TComboBox) SetTakeFocus added in v1.0.14

func (w *TComboBox) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TComboBox) SetTakeFocusM added in v1.0.16

func (w *TComboBox) SetTakeFocusM(value string) *TComboBox

SetTakeFocusM is like TakeFocus but panics on error

func (*TComboBox) SetTextVariable added in v1.0.15

func (w *TComboBox) SetTextVariable(value string) error

TextVariable reports the name of a global variable whose value is linked to the widget value. Whenever the variable changes value the widget value is updated, and vice versa.

func (*TComboBox) SetTextVariableM added in v1.0.16

func (w *TComboBox) SetTextVariableM(value string) *TComboBox

SetTextVariableM is like TextVariable but panics on error

func (*TComboBox) SetValues added in v1.0.14

func (w *TComboBox) SetValues(value string) error

Values reports the list of values to display in the drop-down listbox.

func (*TComboBox) SetValuesM added in v1.0.16

func (w *TComboBox) SetValuesM(value string) *TComboBox

SetValuesM is like Values but panics on error

func (*TComboBox) SetWidth added in v1.0.14

func (w *TComboBox) SetWidth(value string) error

Width reports an integer value indicating the desired width of the entry window, in average-size characters of the widget's font.

func (*TComboBox) SetWidthM added in v1.0.16

func (w *TComboBox) SetWidthM(value string) *TComboBox

SetWidthM is like Width but panics on error

func (*TComboBox) State added in v1.0.14

func (w *TComboBox) State() (string, error)

One of \fBnormal\fR, \fBreadonly\fR, or \fBdisabled\fR. In the \fBreadonly\fR state, the value may not be edited directly, and the user can only select one of the \fB-values\fR from the dropdown list. In the \fBnormal\fR state, the text field is directly editable. In the \fBdisabled\fR state, no interaction is possible.

func (*TComboBox) StateM added in v1.0.16

func (w *TComboBox) StateM() string

StateM is like State but panics on error.

func (*TComboBox) Style added in v1.0.14

func (w *TComboBox) Style() (string, error)

May be used to specify a custom widget style.

func (*TComboBox) StyleM added in v1.0.16

func (w *TComboBox) StyleM() string

StyleM is like Style but panics on error.

func (*TComboBox) TakeFocus added in v1.0.14

func (w *TComboBox) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TComboBox) TakeFocusM added in v1.0.16

func (w *TComboBox) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TComboBox) TextVariable added in v1.0.15

func (w *TComboBox) TextVariable() (string, error)

TextVariable reports the name of a global variable whose value is linked to the widget value. Whenever the variable changes value the widget value is updated, and vice versa.

func (*TComboBox) TextVariableM added in v1.0.16

func (w *TComboBox) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*TComboBox) Values added in v1.0.14

func (w *TComboBox) Values() (string, error)

Values reports the list of values to display in the drop-down listbox.

func (*TComboBox) ValuesM added in v1.0.16

func (w *TComboBox) ValuesM() string

ValuesM is like Values but panics on error.

func (*TComboBox) Width added in v1.0.14

func (w *TComboBox) Width() (string, error)

Width reports an integer value indicating the desired width of the entry window, in average-size characters of the widget's font.

func (*TComboBox) WidthM added in v1.0.16

func (w *TComboBox) WidthM() string

WidthM is like Width but panics on error.

type TEntry added in v1.0.13

type TEntry struct {
	Window
}

TEntry represents the Tk ttk::entry widget.

func (*TEntry) Class added in v1.0.14

func (w *TEntry) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TEntry) ClassM added in v1.0.16

func (w *TEntry) ClassM() string

ClassM is like Class but panics on error.

func (*TEntry) Cursor added in v1.0.14

func (w *TEntry) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TEntry) CursorM added in v1.0.16

func (w *TEntry) CursorM() string

CursorM is like Cursor but panics on error.

func (*TEntry) ExportSelection added in v1.0.14

func (w *TEntry) ExportSelection() (bool, error)

A boolean value specifying whether or not a selection in the widget should be linked to the X selection. If the selection is exported, then selecting in the widget deselects the current X selection, selecting outside the widget deselects any widget selection, and the widget will respond to selection retrieval requests when it has a selection.

func (*TEntry) ExportSelectionM added in v1.0.16

func (w *TEntry) ExportSelectionM() bool

ExportSelectionM is like ExportSelection but panics on error.

func (*TEntry) Font added in v1.0.18

func (w *TEntry) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*TEntry) FontM added in v1.0.18

func (w *TEntry) FontM() string

FontM is like Font but panics on error.

func (*TEntry) Foreground added in v1.0.18

func (w *TEntry) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*TEntry) ForegroundM added in v1.0.18

func (w *TEntry) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*TEntry) InvalidCommand added in v1.0.14

func (w *TEntry) InvalidCommand() (string, error)

A script template to evaluate whenever the \fB-validatecommand\fR returns 0. See \fBVALIDATION\fR below for more information.

func (*TEntry) InvalidCommandM added in v1.0.16

func (w *TEntry) InvalidCommandM() string

InvalidCommandM is like InvalidCommand but panics on error.

func (*TEntry) Justify added in v1.0.14

func (w *TEntry) Justify() (string, error)

Justify reports how the text is aligned within the entry widget. One of \fBleft\fR, \fBcenter\fR, or \fBright\fR.

func (*TEntry) JustifyM added in v1.0.16

func (w *TEntry) JustifyM() string

JustifyM is like Justify but panics on error.

func (*TEntry) SetCursor added in v1.0.14

func (w *TEntry) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TEntry) SetCursorM added in v1.0.16

func (w *TEntry) SetCursorM(value string) *TEntry

SetCursorM is like Cursor but panics on error

func (*TEntry) SetExportSelection added in v1.0.14

func (w *TEntry) SetExportSelection(value bool) error

A boolean value specifying whether or not a selection in the widget should be linked to the X selection. If the selection is exported, then selecting in the widget deselects the current X selection, selecting outside the widget deselects any widget selection, and the widget will respond to selection retrieval requests when it has a selection.

func (*TEntry) SetExportSelectionM added in v1.0.16

func (w *TEntry) SetExportSelectionM(value bool) *TEntry

ExportSelectionM is like ExportSelection but panics on error.

func (*TEntry) SetFont added in v1.0.18

func (w *TEntry) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*TEntry) SetFontM added in v1.0.18

func (w *TEntry) SetFontM(value string) *TEntry

SetFontM is like Font but panics on error

func (*TEntry) SetForeground added in v1.0.18

func (w *TEntry) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*TEntry) SetForegroundM added in v1.0.18

func (w *TEntry) SetForegroundM(value string) *TEntry

SetForegroundM is like Foreground but panics on error

func (*TEntry) SetInvalidCommand added in v1.0.14

func (w *TEntry) SetInvalidCommand(value string) error

A script template to evaluate whenever the \fB-validatecommand\fR returns 0. See \fBVALIDATION\fR below for more information.

func (*TEntry) SetInvalidCommandM added in v1.0.16

func (w *TEntry) SetInvalidCommandM(value string) *TEntry

SetInvalidCommandM is like InvalidCommand but panics on error

func (*TEntry) SetJustify added in v1.0.14

func (w *TEntry) SetJustify(value string) error

Justify reports how the text is aligned within the entry widget. One of \fBleft\fR, \fBcenter\fR, or \fBright\fR.

func (*TEntry) SetJustifyM added in v1.0.16

func (w *TEntry) SetJustifyM(value string) *TEntry

SetJustifyM is like Justify but panics on error

func (*TEntry) SetShow added in v1.0.14

func (w *TEntry) SetShow(value string) error

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 TODO .QW(*) or a bullet. This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry.

func (*TEntry) SetShowM added in v1.0.16

func (w *TEntry) SetShowM(value string) *TEntry

SetShowM is like Show but panics on error

func (*TEntry) SetState added in v1.0.14

func (w *TEntry) SetState(value string) error

Compatibility option; see \fIttk::widget(n)\fR for details. Specifies one of three states for the entry, \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. See \fBWIDGET STATES\fR, below.

func (*TEntry) SetStateM added in v1.0.16

func (w *TEntry) SetStateM(value string) *TEntry

SetStateM is like State but panics on error

func (*TEntry) SetStyle added in v1.0.14

func (w *TEntry) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TEntry) SetStyleM added in v1.0.16

func (w *TEntry) SetStyleM(value string) *TEntry

SetStyleM is like Style but panics on error

func (*TEntry) SetTakeFocus added in v1.0.14

func (w *TEntry) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TEntry) SetTakeFocusM added in v1.0.16

func (w *TEntry) SetTakeFocusM(value string) *TEntry

SetTakeFocusM is like TakeFocus but panics on error

func (*TEntry) SetTextVariable added in v1.0.15

func (w *TEntry) SetTextVariable(value string) error

TextVariable reports the name of a global variable whose value is linked to the entry widget's contents. Whenever the variable changes value, the widget's contents are updated, and vice versa.

func (*TEntry) SetTextVariableM added in v1.0.16

func (w *TEntry) SetTextVariableM(value string) *TEntry

SetTextVariableM is like TextVariable but panics on error

func (*TEntry) SetValidate added in v1.0.14

func (w *TEntry) SetValidate(value string) error

Validate reports the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. Default is \fBnone\fR, meaning that validation is disabled. See \fBVALIDATION\fR below.

func (*TEntry) SetValidateCommand added in v1.0.14

func (w *TEntry) SetValidateCommand(value string) error

A script template to evaluate whenever validation is triggered. If set to the empty string (the default), validation is disabled. The script must return a boolean value. See \fBVALIDATION\fR below.

func (*TEntry) SetValidateCommandM added in v1.0.16

func (w *TEntry) SetValidateCommandM(value string) *TEntry

SetValidateCommandM is like ValidateCommand but panics on error

func (*TEntry) SetValidateM added in v1.0.16

func (w *TEntry) SetValidateM(value string) *TEntry

SetValidateM is like Validate but panics on error

func (*TEntry) SetWidth added in v1.0.14

func (w *TEntry) SetWidth(value string) error

Width reports an integer value indicating the desired width of the entry window, in average-size characters of the widget's font.

func (*TEntry) SetWidthM added in v1.0.16

func (w *TEntry) SetWidthM(value string) *TEntry

SetWidthM is like Width but panics on error

func (*TEntry) SetXScrollCommand added in v1.0.14

func (w *TEntry) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*TEntry) SetXScrollCommandM added in v1.0.16

func (w *TEntry) SetXScrollCommandM(value Command) *TEntry

SetXScrollCommandM is like XScrollCommand but panics on error

func (*TEntry) Show added in v1.0.14

func (w *TEntry) Show() (string, error)

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 TODO .QW(*) or a bullet. This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry.

func (*TEntry) ShowM added in v1.0.16

func (w *TEntry) ShowM() string

ShowM is like Show but panics on error.

func (*TEntry) State added in v1.0.14

func (w *TEntry) State() (string, error)

Compatibility option; see \fIttk::widget(n)\fR for details. Specifies one of three states for the entry, \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. See \fBWIDGET STATES\fR, below.

func (*TEntry) StateM added in v1.0.16

func (w *TEntry) StateM() string

StateM is like State but panics on error.

func (*TEntry) Style added in v1.0.14

func (w *TEntry) Style() (string, error)

May be used to specify a custom widget style.

func (*TEntry) StyleM added in v1.0.16

func (w *TEntry) StyleM() string

StyleM is like Style but panics on error.

func (*TEntry) TakeFocus added in v1.0.14

func (w *TEntry) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TEntry) TakeFocusM added in v1.0.16

func (w *TEntry) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TEntry) TextVariable added in v1.0.15

func (w *TEntry) TextVariable() (string, error)

TextVariable reports the name of a global variable whose value is linked to the entry widget's contents. Whenever the variable changes value, the widget's contents are updated, and vice versa.

func (*TEntry) TextVariableM added in v1.0.16

func (w *TEntry) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*TEntry) Validate added in v1.0.14

func (w *TEntry) Validate() (string, error)

Validate reports the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. Default is \fBnone\fR, meaning that validation is disabled. See \fBVALIDATION\fR below.

func (*TEntry) ValidateCommand added in v1.0.14

func (w *TEntry) ValidateCommand() (string, error)

A script template to evaluate whenever validation is triggered. If set to the empty string (the default), validation is disabled. The script must return a boolean value. See \fBVALIDATION\fR below.

func (*TEntry) ValidateCommandM added in v1.0.16

func (w *TEntry) ValidateCommandM() string

ValidateCommandM is like ValidateCommand but panics on error.

func (*TEntry) ValidateM added in v1.0.16

func (w *TEntry) ValidateM() string

ValidateM is like Validate but panics on error.

func (*TEntry) Width added in v1.0.14

func (w *TEntry) Width() (string, error)

Width reports an integer value indicating the desired width of the entry window, in average-size characters of the widget's font.

func (*TEntry) WidthM added in v1.0.16

func (w *TEntry) WidthM() string

WidthM is like Width but panics on error.

type TFrame added in v1.0.13

type TFrame struct {
	Window
}

TFrame represents the Tk ttk::frame widget.

func (*TFrame) BorderWidth added in v1.0.14

func (w *TFrame) BorderWidth() (string, error)

The desired width of the widget border. Defaults to 0. May be ignored depending on the theme used.

func (*TFrame) BorderWidthM added in v1.0.16

func (w *TFrame) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*TFrame) Class added in v1.0.14

func (w *TFrame) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TFrame) ClassM added in v1.0.16

func (w *TFrame) ClassM() string

ClassM is like Class but panics on error.

func (*TFrame) Cursor added in v1.0.14

func (w *TFrame) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TFrame) CursorM added in v1.0.16

func (w *TFrame) CursorM() string

CursorM is like Cursor but panics on error.

func (*TFrame) Height added in v1.0.14

func (w *TFrame) Height() (string, error)

If specified, the widget's requested height in pixels.

func (*TFrame) HeightM added in v1.0.16

func (w *TFrame) HeightM() string

HeightM is like Height but panics on error.

func (*TFrame) Padding added in v1.0.14

func (w *TFrame) Padding() (string, error)

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TFrame) PaddingM added in v1.0.16

func (w *TFrame) PaddingM() string

PaddingM is like Padding but panics on error.

func (*TFrame) Relief added in v1.0.14

func (w *TFrame) Relief() (string, error)

One of the standard Tk border styles: \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, \fBsolid\fR, or \fBsunken\fR. Defaults to \fBflat\fR.

func (*TFrame) ReliefM added in v1.0.16

func (w *TFrame) ReliefM() string

ReliefM is like Relief but panics on error.

func (*TFrame) SetBorderWidth added in v1.0.14

func (w *TFrame) SetBorderWidth(value string) error

The desired width of the widget border. Defaults to 0. May be ignored depending on the theme used.

func (*TFrame) SetBorderWidthM added in v1.0.16

func (w *TFrame) SetBorderWidthM(value string) *TFrame

SetBorderWidthM is like BorderWidth but panics on error

func (*TFrame) SetCursor added in v1.0.14

func (w *TFrame) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TFrame) SetCursorM added in v1.0.16

func (w *TFrame) SetCursorM(value string) *TFrame

SetCursorM is like Cursor but panics on error

func (*TFrame) SetHeight added in v1.0.14

func (w *TFrame) SetHeight(value string) error

If specified, the widget's requested height in pixels.

func (*TFrame) SetHeightM added in v1.0.16

func (w *TFrame) SetHeightM(value string) *TFrame

SetHeightM is like Height but panics on error

func (*TFrame) SetPadding added in v1.0.14

func (w *TFrame) SetPadding(value string) error

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TFrame) SetPaddingM added in v1.0.16

func (w *TFrame) SetPaddingM(value string) *TFrame

SetPaddingM is like Padding but panics on error

func (*TFrame) SetRelief added in v1.0.14

func (w *TFrame) SetRelief(value string) error

One of the standard Tk border styles: \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, \fBsolid\fR, or \fBsunken\fR. Defaults to \fBflat\fR.

func (*TFrame) SetReliefM added in v1.0.16

func (w *TFrame) SetReliefM(value string) *TFrame

SetReliefM is like Relief but panics on error

func (*TFrame) SetStyle added in v1.0.14

func (w *TFrame) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TFrame) SetStyleM added in v1.0.16

func (w *TFrame) SetStyleM(value string) *TFrame

SetStyleM is like Style but panics on error

func (*TFrame) SetTakeFocus added in v1.0.14

func (w *TFrame) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TFrame) SetTakeFocusM added in v1.0.16

func (w *TFrame) SetTakeFocusM(value string) *TFrame

SetTakeFocusM is like TakeFocus but panics on error

func (*TFrame) SetWidth added in v1.0.14

func (w *TFrame) SetWidth(value string) error

If specified, the widget's requested width in pixels.

func (*TFrame) SetWidthM added in v1.0.16

func (w *TFrame) SetWidthM(value string) *TFrame

SetWidthM is like Width but panics on error

func (*TFrame) Style added in v1.0.14

func (w *TFrame) Style() (string, error)

May be used to specify a custom widget style.

func (*TFrame) StyleM added in v1.0.16

func (w *TFrame) StyleM() string

StyleM is like Style but panics on error.

func (*TFrame) TakeFocus added in v1.0.14

func (w *TFrame) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TFrame) TakeFocusM added in v1.0.16

func (w *TFrame) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TFrame) Width added in v1.0.14

func (w *TFrame) Width() (string, error)

If specified, the widget's requested width in pixels.

func (*TFrame) WidthM added in v1.0.16

func (w *TFrame) WidthM() string

WidthM is like Width but panics on error.

type TLabel added in v1.0.13

type TLabel struct {
	Window
}

TLabel represents the Tk ttk::label widget.

func (*TLabel) Anchor added in v1.0.14

func (w *TLabel) Anchor() (string, error)

Anchor reports how the information in the widget is positioned relative to the inner margins. Legal values are \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, and \fBcenter\fR. See also \fB-justify\fR.

func (*TLabel) AnchorM added in v1.0.16

func (w *TLabel) AnchorM() string

AnchorM is like Anchor but panics on error.

func (*TLabel) Background added in v1.0.14

func (w *TLabel) Background() (string, error)

The widget's background color. If unspecified, the theme default is used.

func (*TLabel) BackgroundM added in v1.0.16

func (w *TLabel) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*TLabel) Class added in v1.0.14

func (w *TLabel) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TLabel) ClassM added in v1.0.16

func (w *TLabel) ClassM() string

ClassM is like Class but panics on error.

func (*TLabel) Compound added in v1.0.14

func (w *TLabel) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TLabel) CompoundM added in v1.0.16

func (w *TLabel) CompoundM() string

CompoundM is like Compound but panics on error.

func (*TLabel) Cursor added in v1.0.14

func (w *TLabel) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TLabel) CursorM added in v1.0.16

func (w *TLabel) CursorM() string

CursorM is like Cursor but panics on error.

func (*TLabel) Font added in v1.0.14

func (w *TLabel) Font() (string, error)

Font to use for label text.

func (*TLabel) FontM added in v1.0.16

func (w *TLabel) FontM() string

FontM is like Font but panics on error.

func (*TLabel) Foreground added in v1.0.14

func (w *TLabel) Foreground() (string, error)

The widget's foreground color. If unspecified, the theme default is used.

func (*TLabel) ForegroundM added in v1.0.16

func (w *TLabel) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*TLabel) Image added in v1.0.14

func (w *TLabel) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TLabel) ImageM added in v1.0.16

func (w *TLabel) ImageM() string

ImageM is like Image but panics on error.

func (*TLabel) Justify added in v1.0.14

func (w *TLabel) Justify() (string, error)

If there are multiple lines of text, specifies how the lines are laid out relative to one another. One of \fBleft\fR, \fBcenter\fR, or \fBright\fR. See also \fB-anchor\fR.

func (*TLabel) JustifyM added in v1.0.16

func (w *TLabel) JustifyM() string

JustifyM is like Justify but panics on error.

func (*TLabel) Padding added in v1.0.14

func (w *TLabel) Padding() (string, error)

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TLabel) PaddingM added in v1.0.16

func (w *TLabel) PaddingM() string

PaddingM is like Padding but panics on error.

func (*TLabel) Relief added in v1.0.14

func (w *TLabel) Relief() (string, error)

Relief reports the 3-D effect desired for the widget border. Valid values are \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, \fBsolid\fR, and \fBsunken\fR.

func (*TLabel) ReliefM added in v1.0.16

func (w *TLabel) ReliefM() string

ReliefM is like Relief but panics on error.

func (*TLabel) SetAnchor added in v1.0.14

func (w *TLabel) SetAnchor(value string) error

Anchor reports how the information in the widget is positioned relative to the inner margins. Legal values are \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, and \fBcenter\fR. See also \fB-justify\fR.

func (*TLabel) SetAnchorM added in v1.0.16

func (w *TLabel) SetAnchorM(value string) *TLabel

SetAnchorM is like Anchor but panics on error

func (*TLabel) SetBackground added in v1.0.14

func (w *TLabel) SetBackground(value string) error

The widget's background color. If unspecified, the theme default is used.

func (*TLabel) SetBackgroundM added in v1.0.16

func (w *TLabel) SetBackgroundM(value string) *TLabel

SetBackgroundM is like Background but panics on error

func (*TLabel) SetCompound added in v1.0.14

func (w *TLabel) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TLabel) SetCompoundM added in v1.0.16

func (w *TLabel) SetCompoundM(value string) *TLabel

SetCompoundM is like Compound but panics on error

func (*TLabel) SetCursor added in v1.0.14

func (w *TLabel) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TLabel) SetCursorM added in v1.0.16

func (w *TLabel) SetCursorM(value string) *TLabel

SetCursorM is like Cursor but panics on error

func (*TLabel) SetFont added in v1.0.14

func (w *TLabel) SetFont(value string) error

Font to use for label text.

func (*TLabel) SetFontM added in v1.0.16

func (w *TLabel) SetFontM(value string) *TLabel

SetFontM is like Font but panics on error

func (*TLabel) SetForeground added in v1.0.14

func (w *TLabel) SetForeground(value string) error

The widget's foreground color. If unspecified, the theme default is used.

func (*TLabel) SetForegroundM added in v1.0.16

func (w *TLabel) SetForegroundM(value string) *TLabel

SetForegroundM is like Foreground but panics on error

func (*TLabel) SetImage added in v1.0.14

func (w *TLabel) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TLabel) SetImageM added in v1.0.16

func (w *TLabel) SetImageM(value string) *TLabel

SetImageM is like Image but panics on error

func (*TLabel) SetJustify added in v1.0.14

func (w *TLabel) SetJustify(value string) error

If there are multiple lines of text, specifies how the lines are laid out relative to one another. One of \fBleft\fR, \fBcenter\fR, or \fBright\fR. See also \fB-anchor\fR.

func (*TLabel) SetJustifyM added in v1.0.16

func (w *TLabel) SetJustifyM(value string) *TLabel

SetJustifyM is like Justify but panics on error

func (*TLabel) SetPadding added in v1.0.14

func (w *TLabel) SetPadding(value string) error

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TLabel) SetPaddingM added in v1.0.16

func (w *TLabel) SetPaddingM(value string) *TLabel

SetPaddingM is like Padding but panics on error

func (*TLabel) SetRelief added in v1.0.14

func (w *TLabel) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget border. Valid values are \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, \fBsolid\fR, and \fBsunken\fR.

func (*TLabel) SetReliefM added in v1.0.16

func (w *TLabel) SetReliefM(value string) *TLabel

SetReliefM is like Relief but panics on error

func (*TLabel) SetState added in v1.0.14

func (w *TLabel) SetState(value string) error

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TLabel) SetStateM added in v1.0.16

func (w *TLabel) SetStateM(value string) *TLabel

SetStateM is like State but panics on error

func (*TLabel) SetStyle added in v1.0.14

func (w *TLabel) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TLabel) SetStyleM added in v1.0.16

func (w *TLabel) SetStyleM(value string) *TLabel

SetStyleM is like Style but panics on error

func (*TLabel) SetTakeFocus added in v1.0.14

func (w *TLabel) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TLabel) SetTakeFocusM added in v1.0.16

func (w *TLabel) SetTakeFocusM(value string) *TLabel

SetTakeFocusM is like TakeFocus but panics on error

func (*TLabel) SetText added in v1.0.13

func (w *TLabel) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TLabel) SetTextM added in v1.0.16

func (w *TLabel) SetTextM(value string) *TLabel

SetTextM is like Text but panics on error

func (*TLabel) SetTextVariable added in v1.0.15

func (w *TLabel) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TLabel) SetTextVariableM added in v1.0.16

func (w *TLabel) SetTextVariableM(value string) *TLabel

SetTextVariableM is like TextVariable but panics on error

func (*TLabel) SetUnderline added in v1.0.14

func (w *TLabel) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TLabel) SetUnderlineM added in v1.0.16

func (w *TLabel) SetUnderlineM(value string) *TLabel

SetUnderlineM is like Underline but panics on error

func (*TLabel) SetWidth added in v1.0.14

func (w *TLabel) SetWidth(value string) error

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TLabel) SetWidthM added in v1.0.16

func (w *TLabel) SetWidthM(value string) *TLabel

SetWidthM is like Width but panics on error

func (*TLabel) SetWrapLength added in v1.0.14

func (w *TLabel) SetWrapLength(value string) error

WrapLength reports the maximum line length (in pixels). If this option is less than or equal to zero, then automatic wrapping is not performed; otherwise the text is split into lines such that no line is longer than the specified value.

func (*TLabel) SetWrapLengthM added in v1.0.16

func (w *TLabel) SetWrapLengthM(value string) *TLabel

SetWrapLengthM is like WrapLength but panics on error

func (*TLabel) State added in v1.0.14

func (w *TLabel) State() (string, error)

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TLabel) StateM added in v1.0.16

func (w *TLabel) StateM() string

StateM is like State but panics on error.

func (*TLabel) Style added in v1.0.14

func (w *TLabel) Style() (string, error)

May be used to specify a custom widget style.

func (*TLabel) StyleM added in v1.0.16

func (w *TLabel) StyleM() string

StyleM is like Style but panics on error.

func (*TLabel) TakeFocus added in v1.0.14

func (w *TLabel) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TLabel) TakeFocusM added in v1.0.16

func (w *TLabel) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TLabel) Text added in v1.0.13

func (w *TLabel) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TLabel) TextM added in v1.0.16

func (w *TLabel) TextM() string

TextM is like Text but panics on error.

func (*TLabel) TextVariable added in v1.0.15

func (w *TLabel) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TLabel) TextVariableM added in v1.0.16

func (w *TLabel) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*TLabel) Underline added in v1.0.14

func (w *TLabel) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TLabel) UnderlineM added in v1.0.16

func (w *TLabel) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*TLabel) Width added in v1.0.14

func (w *TLabel) Width() (string, error)

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TLabel) WidthM added in v1.0.16

func (w *TLabel) WidthM() string

WidthM is like Width but panics on error.

func (*TLabel) WrapLength added in v1.0.14

func (w *TLabel) WrapLength() (string, error)

WrapLength reports the maximum line length (in pixels). If this option is less than or equal to zero, then automatic wrapping is not performed; otherwise the text is split into lines such that no line is longer than the specified value.

func (*TLabel) WrapLengthM added in v1.0.16

func (w *TLabel) WrapLengthM() string

WrapLengthM is like WrapLength but panics on error.

type TLabelFrame added in v1.0.14

type TLabelFrame struct {
	Window
}

TLabelFrame represents the Tk ttk::labelframe widget.

func (*TLabelFrame) Class added in v1.0.14

func (w *TLabelFrame) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TLabelFrame) ClassM added in v1.0.16

func (w *TLabelFrame) ClassM() string

ClassM is like Class but panics on error.

func (*TLabelFrame) Cursor added in v1.0.14

func (w *TLabelFrame) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TLabelFrame) CursorM added in v1.0.16

func (w *TLabelFrame) CursorM() string

CursorM is like Cursor but panics on error.

func (*TLabelFrame) Height added in v1.0.14

func (w *TLabelFrame) Height() (string, error)

If specified, the widget's requested height in pixels. (See \fIttk::frame(n)\fR for further notes on \fB-width\fR and \fB-height\fR).

func (*TLabelFrame) HeightM added in v1.0.16

func (w *TLabelFrame) HeightM() string

HeightM is like Height but panics on error.

func (*TLabelFrame) LabelAnchor added in v1.0.14

func (w *TLabelFrame) LabelAnchor() (string, error)

LabelAnchor reports where to place the label. Allowed values are (clockwise from the top upper left corner): \fBnw\fR, \fBn\fR, \fBne\fR, \fBen\fR, \fBe\fR, \fBes\fR, \fBse\fR, \fBs\fR,\fBsw\fR, \fBws\fR, \fBw\fR and \fBwn\fR. The default value is theme-dependent.

func (*TLabelFrame) LabelAnchorM added in v1.0.16

func (w *TLabelFrame) LabelAnchorM() string

LabelAnchorM is like LabelAnchor but panics on error.

func (*TLabelFrame) LabelWidget added in v1.0.14

func (w *TLabelFrame) LabelWidget() (string, error)

The name of a widget to use for the label. If set, overrides the \fB-text\fR option. The \fB-labelwidget\fR must be a child of the \fBlabelframe\fR widget or one of the \fBlabelframe\fR's ancestors, and must belong to the same top-level widget as the \fBlabelframe\fR.

func (*TLabelFrame) LabelWidgetM added in v1.0.16

func (w *TLabelFrame) LabelWidgetM() string

LabelWidgetM is like LabelWidget but panics on error.

func (*TLabelFrame) Padding added in v1.0.14

func (w *TLabelFrame) Padding() (string, error)

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TLabelFrame) PaddingM added in v1.0.16

func (w *TLabelFrame) PaddingM() string

PaddingM is like Padding but panics on error.

func (*TLabelFrame) SetCursor added in v1.0.14

func (w *TLabelFrame) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TLabelFrame) SetCursorM added in v1.0.16

func (w *TLabelFrame) SetCursorM(value string) *TLabelFrame

SetCursorM is like Cursor but panics on error

func (*TLabelFrame) SetHeight added in v1.0.14

func (w *TLabelFrame) SetHeight(value string) error

If specified, the widget's requested height in pixels. (See \fIttk::frame(n)\fR for further notes on \fB-width\fR and \fB-height\fR).

func (*TLabelFrame) SetHeightM added in v1.0.16

func (w *TLabelFrame) SetHeightM(value string) *TLabelFrame

SetHeightM is like Height but panics on error

func (*TLabelFrame) SetLabelAnchor added in v1.0.14

func (w *TLabelFrame) SetLabelAnchor(value string) error

LabelAnchor reports where to place the label. Allowed values are (clockwise from the top upper left corner): \fBnw\fR, \fBn\fR, \fBne\fR, \fBen\fR, \fBe\fR, \fBes\fR, \fBse\fR, \fBs\fR,\fBsw\fR, \fBws\fR, \fBw\fR and \fBwn\fR. The default value is theme-dependent.

func (*TLabelFrame) SetLabelAnchorM added in v1.0.16

func (w *TLabelFrame) SetLabelAnchorM(value string) *TLabelFrame

SetLabelAnchorM is like LabelAnchor but panics on error

func (*TLabelFrame) SetLabelWidget added in v1.0.14

func (w *TLabelFrame) SetLabelWidget(value string) error

The name of a widget to use for the label. If set, overrides the \fB-text\fR option. The \fB-labelwidget\fR must be a child of the \fBlabelframe\fR widget or one of the \fBlabelframe\fR's ancestors, and must belong to the same top-level widget as the \fBlabelframe\fR.

func (*TLabelFrame) SetLabelWidgetM added in v1.0.16

func (w *TLabelFrame) SetLabelWidgetM(value string) *TLabelFrame

SetLabelWidgetM is like LabelWidget but panics on error

func (*TLabelFrame) SetPadding added in v1.0.14

func (w *TLabelFrame) SetPadding(value string) error

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TLabelFrame) SetPaddingM added in v1.0.16

func (w *TLabelFrame) SetPaddingM(value string) *TLabelFrame

SetPaddingM is like Padding but panics on error

func (*TLabelFrame) SetStyle added in v1.0.14

func (w *TLabelFrame) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TLabelFrame) SetStyleM added in v1.0.16

func (w *TLabelFrame) SetStyleM(value string) *TLabelFrame

SetStyleM is like Style but panics on error

func (*TLabelFrame) SetTakeFocus added in v1.0.14

func (w *TLabelFrame) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TLabelFrame) SetTakeFocusM added in v1.0.16

func (w *TLabelFrame) SetTakeFocusM(value string) *TLabelFrame

SetTakeFocusM is like TakeFocus but panics on error

func (*TLabelFrame) SetText added in v1.0.14

func (w *TLabelFrame) SetText(value string) error

Text reports the text of the label.

func (*TLabelFrame) SetTextM added in v1.0.16

func (w *TLabelFrame) SetTextM(value string) *TLabelFrame

SetTextM is like Text but panics on error

func (*TLabelFrame) SetUnderline added in v1.0.14

func (w *TLabelFrame) SetUnderline(value string) error

If set, specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation. Mnemonic activation for a \fBttk::labelframe\fR sets the keyboard focus to the first child of the \fBttk::labelframe\fR widget.

func (*TLabelFrame) SetUnderlineM added in v1.0.16

func (w *TLabelFrame) SetUnderlineM(value string) *TLabelFrame

SetUnderlineM is like Underline but panics on error

func (*TLabelFrame) SetWidth added in v1.0.14

func (w *TLabelFrame) SetWidth(value string) error

If specified, the widget's requested width in pixels.

func (*TLabelFrame) SetWidthM added in v1.0.16

func (w *TLabelFrame) SetWidthM(value string) *TLabelFrame

SetWidthM is like Width but panics on error

func (*TLabelFrame) Style added in v1.0.14

func (w *TLabelFrame) Style() (string, error)

May be used to specify a custom widget style.

func (*TLabelFrame) StyleM added in v1.0.16

func (w *TLabelFrame) StyleM() string

StyleM is like Style but panics on error.

func (*TLabelFrame) TakeFocus added in v1.0.14

func (w *TLabelFrame) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TLabelFrame) TakeFocusM added in v1.0.16

func (w *TLabelFrame) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TLabelFrame) Text added in v1.0.14

func (w *TLabelFrame) Text() (string, error)

Text reports the text of the label.

func (*TLabelFrame) TextM added in v1.0.16

func (w *TLabelFrame) TextM() string

TextM is like Text but panics on error.

func (*TLabelFrame) Underline added in v1.0.14

func (w *TLabelFrame) Underline() (string, error)

If set, specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation. Mnemonic activation for a \fBttk::labelframe\fR sets the keyboard focus to the first child of the \fBttk::labelframe\fR widget.

func (*TLabelFrame) UnderlineM added in v1.0.16

func (w *TLabelFrame) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*TLabelFrame) Width added in v1.0.14

func (w *TLabelFrame) Width() (string, error)

If specified, the widget's requested width in pixels.

func (*TLabelFrame) WidthM added in v1.0.16

func (w *TLabelFrame) WidthM() string

WidthM is like Width but panics on error.

type TMenuButton added in v1.0.14

type TMenuButton struct {
	Window
}

TMenuButton represents the Tk ttk::menubutton widget.

func (*TMenuButton) Class added in v1.0.14

func (w *TMenuButton) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TMenuButton) ClassM added in v1.0.16

func (w *TMenuButton) ClassM() string

ClassM is like Class but panics on error.

func (*TMenuButton) Compound added in v1.0.14

func (w *TMenuButton) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TMenuButton) CompoundM added in v1.0.16

func (w *TMenuButton) CompoundM() string

CompoundM is like Compound but panics on error.

func (*TMenuButton) Cursor added in v1.0.14

func (w *TMenuButton) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TMenuButton) CursorM added in v1.0.16

func (w *TMenuButton) CursorM() string

CursorM is like Cursor but panics on error.

func (*TMenuButton) Direction added in v1.0.14

func (w *TMenuButton) Direction() (string, error)

Direction reports where the menu is to be popped up relative to the menubutton. One of: \fBabove\fR, \fBbelow\fR, \fBleft\fR, \fBright\fR, or \fBflush\fR. The default is \fBbelow\fR. \fBflush\fR pops the menu up directly over the menubutton.

func (*TMenuButton) DirectionM added in v1.0.16

func (w *TMenuButton) DirectionM() string

DirectionM is like Direction but panics on error.

func (*TMenuButton) Image added in v1.0.14

func (w *TMenuButton) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TMenuButton) ImageM added in v1.0.16

func (w *TMenuButton) ImageM() string

ImageM is like Image but panics on error.

func (*TMenuButton) Menu added in v1.0.14

func (w *TMenuButton) Menu() (string, error)

Menu reports the path name of the menu associated with the menubutton. To be on the safe side, the menu ought to be a direct child of the menubutton.

func (*TMenuButton) MenuM added in v1.0.16

func (w *TMenuButton) MenuM() string

MenuM is like Menu but panics on error.

func (*TMenuButton) SetCompound added in v1.0.14

func (w *TMenuButton) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TMenuButton) SetCompoundM added in v1.0.16

func (w *TMenuButton) SetCompoundM(value string) *TMenuButton

SetCompoundM is like Compound but panics on error

func (*TMenuButton) SetCursor added in v1.0.14

func (w *TMenuButton) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TMenuButton) SetCursorM added in v1.0.16

func (w *TMenuButton) SetCursorM(value string) *TMenuButton

SetCursorM is like Cursor but panics on error

func (*TMenuButton) SetDirection added in v1.0.14

func (w *TMenuButton) SetDirection(value string) error

Direction reports where the menu is to be popped up relative to the menubutton. One of: \fBabove\fR, \fBbelow\fR, \fBleft\fR, \fBright\fR, or \fBflush\fR. The default is \fBbelow\fR. \fBflush\fR pops the menu up directly over the menubutton.

func (*TMenuButton) SetDirectionM added in v1.0.16

func (w *TMenuButton) SetDirectionM(value string) *TMenuButton

SetDirectionM is like Direction but panics on error

func (*TMenuButton) SetImage added in v1.0.14

func (w *TMenuButton) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TMenuButton) SetImageM added in v1.0.16

func (w *TMenuButton) SetImageM(value string) *TMenuButton

SetImageM is like Image but panics on error

func (*TMenuButton) SetMenu added in v1.0.14

func (w *TMenuButton) SetMenu(value string) error

Menu reports the path name of the menu associated with the menubutton. To be on the safe side, the menu ought to be a direct child of the menubutton.

func (*TMenuButton) SetMenuM added in v1.0.16

func (w *TMenuButton) SetMenuM(value string) *TMenuButton

SetMenuM is like Menu but panics on error

func (*TMenuButton) SetState added in v1.0.14

func (w *TMenuButton) SetState(value string) error

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TMenuButton) SetStateM added in v1.0.16

func (w *TMenuButton) SetStateM(value string) *TMenuButton

SetStateM is like State but panics on error

func (*TMenuButton) SetStyle added in v1.0.14

func (w *TMenuButton) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TMenuButton) SetStyleM added in v1.0.16

func (w *TMenuButton) SetStyleM(value string) *TMenuButton

SetStyleM is like Style but panics on error

func (*TMenuButton) SetTakeFocus added in v1.0.14

func (w *TMenuButton) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TMenuButton) SetTakeFocusM added in v1.0.16

func (w *TMenuButton) SetTakeFocusM(value string) *TMenuButton

SetTakeFocusM is like TakeFocus but panics on error

func (*TMenuButton) SetText added in v1.0.14

func (w *TMenuButton) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TMenuButton) SetTextM added in v1.0.16

func (w *TMenuButton) SetTextM(value string) *TMenuButton

SetTextM is like Text but panics on error

func (*TMenuButton) SetTextVariable added in v1.0.15

func (w *TMenuButton) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TMenuButton) SetTextVariableM added in v1.0.16

func (w *TMenuButton) SetTextVariableM(value string) *TMenuButton

SetTextVariableM is like TextVariable but panics on error

func (*TMenuButton) SetUnderline added in v1.0.14

func (w *TMenuButton) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TMenuButton) SetUnderlineM added in v1.0.16

func (w *TMenuButton) SetUnderlineM(value string) *TMenuButton

SetUnderlineM is like Underline but panics on error

func (*TMenuButton) SetWidth added in v1.0.14

func (w *TMenuButton) SetWidth(value string) error

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TMenuButton) SetWidthM added in v1.0.16

func (w *TMenuButton) SetWidthM(value string) *TMenuButton

SetWidthM is like Width but panics on error

func (*TMenuButton) State added in v1.0.14

func (w *TMenuButton) State() (string, error)

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TMenuButton) StateM added in v1.0.16

func (w *TMenuButton) StateM() string

StateM is like State but panics on error.

func (*TMenuButton) Style added in v1.0.14

func (w *TMenuButton) Style() (string, error)

May be used to specify a custom widget style.

func (*TMenuButton) StyleM added in v1.0.16

func (w *TMenuButton) StyleM() string

StyleM is like Style but panics on error.

func (*TMenuButton) TakeFocus added in v1.0.14

func (w *TMenuButton) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TMenuButton) TakeFocusM added in v1.0.16

func (w *TMenuButton) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TMenuButton) Text added in v1.0.14

func (w *TMenuButton) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TMenuButton) TextM added in v1.0.16

func (w *TMenuButton) TextM() string

TextM is like Text but panics on error.

func (*TMenuButton) TextVariable added in v1.0.15

func (w *TMenuButton) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TMenuButton) TextVariableM added in v1.0.16

func (w *TMenuButton) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*TMenuButton) Underline added in v1.0.14

func (w *TMenuButton) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TMenuButton) UnderlineM added in v1.0.16

func (w *TMenuButton) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*TMenuButton) Width added in v1.0.14

func (w *TMenuButton) Width() (string, error)

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TMenuButton) WidthM added in v1.0.16

func (w *TMenuButton) WidthM() string

WidthM is like Width but panics on error.

type TNotebook added in v1.0.13

type TNotebook struct {
	Window
}

TNotebook represents the Tk ttk::notebook widget.

func (*TNotebook) Class added in v1.0.14

func (w *TNotebook) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TNotebook) ClassM added in v1.0.16

func (w *TNotebook) ClassM() string

ClassM is like Class but panics on error.

func (*TNotebook) Cursor added in v1.0.14

func (w *TNotebook) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TNotebook) CursorM added in v1.0.16

func (w *TNotebook) CursorM() string

CursorM is like Cursor but panics on error.

func (*TNotebook) Height added in v1.0.14

func (w *TNotebook) Height() (string, error)

If present and greater than zero, specifies the desired height of the pane area (not including internal padding or tabs). Otherwise, the maximum height of all panes is used.

func (*TNotebook) HeightM added in v1.0.16

func (w *TNotebook) HeightM() string

HeightM is like Height but panics on error.

func (*TNotebook) Padding added in v1.0.14

func (w *TNotebook) Padding() (string, error)

Padding reports the amount of extra space to add around the outside of the notebook. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TNotebook) PaddingM added in v1.0.16

func (w *TNotebook) PaddingM() string

PaddingM is like Padding but panics on error.

func (*TNotebook) SetCursor added in v1.0.14

func (w *TNotebook) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TNotebook) SetCursorM added in v1.0.16

func (w *TNotebook) SetCursorM(value string) *TNotebook

SetCursorM is like Cursor but panics on error

func (*TNotebook) SetHeight added in v1.0.14

func (w *TNotebook) SetHeight(value string) error

If present and greater than zero, specifies the desired height of the pane area (not including internal padding or tabs). Otherwise, the maximum height of all panes is used.

func (*TNotebook) SetHeightM added in v1.0.16

func (w *TNotebook) SetHeightM(value string) *TNotebook

SetHeightM is like Height but panics on error

func (*TNotebook) SetPadding added in v1.0.14

func (w *TNotebook) SetPadding(value string) error

Padding reports the amount of extra space to add around the outside of the notebook. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TNotebook) SetPaddingM added in v1.0.16

func (w *TNotebook) SetPaddingM(value string) *TNotebook

SetPaddingM is like Padding but panics on error

func (*TNotebook) SetStyle added in v1.0.14

func (w *TNotebook) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TNotebook) SetStyleM added in v1.0.16

func (w *TNotebook) SetStyleM(value string) *TNotebook

SetStyleM is like Style but panics on error

func (*TNotebook) SetTakeFocus added in v1.0.14

func (w *TNotebook) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TNotebook) SetTakeFocusM added in v1.0.16

func (w *TNotebook) SetTakeFocusM(value string) *TNotebook

SetTakeFocusM is like TakeFocus but panics on error

func (*TNotebook) SetWidth added in v1.0.14

func (w *TNotebook) SetWidth(value string) error

If present and greater than zero, specifies the desired width of the pane area (not including internal padding). Otherwise, the maximum width of all panes is used.

func (*TNotebook) SetWidthM added in v1.0.16

func (w *TNotebook) SetWidthM(value string) *TNotebook

SetWidthM is like Width but panics on error

func (*TNotebook) Style added in v1.0.14

func (w *TNotebook) Style() (string, error)

May be used to specify a custom widget style.

func (*TNotebook) StyleM added in v1.0.16

func (w *TNotebook) StyleM() string

StyleM is like Style but panics on error.

func (*TNotebook) TakeFocus added in v1.0.14

func (w *TNotebook) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TNotebook) TakeFocusM added in v1.0.16

func (w *TNotebook) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TNotebook) Width added in v1.0.14

func (w *TNotebook) Width() (string, error)

If present and greater than zero, specifies the desired width of the pane area (not including internal padding). Otherwise, the maximum width of all panes is used.

func (*TNotebook) WidthM added in v1.0.16

func (w *TNotebook) WidthM() string

WidthM is like Width but panics on error.

type TPanedWindow added in v1.0.14

type TPanedWindow struct {
	Window
}

TPanedWindow represents the Tk ttk::panedwindow widget.

func (*TPanedWindow) Class added in v1.0.14

func (w *TPanedWindow) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TPanedWindow) ClassM added in v1.0.16

func (w *TPanedWindow) ClassM() string

ClassM is like Class but panics on error.

func (*TPanedWindow) Cursor added in v1.0.14

func (w *TPanedWindow) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TPanedWindow) CursorM added in v1.0.16

func (w *TPanedWindow) CursorM() string

CursorM is like Cursor but panics on error.

func (*TPanedWindow) Height added in v1.0.14

func (w *TPanedWindow) Height() (string, error)

If present and greater than zero, specifies the desired height of the widget in pixels. Otherwise, the requested height is determined by the height of the managed windows.

func (*TPanedWindow) HeightM added in v1.0.16

func (w *TPanedWindow) HeightM() string

HeightM is like Height but panics on error.

func (*TPanedWindow) Orient added in v1.0.14

func (w *TPanedWindow) Orient() (string, error)

Orient reports the orientation of the window. If \fBvertical\fR, subpanes are stacked top-to-bottom; if \fBhorizontal\fR, subpanes are stacked left-to-right.

func (*TPanedWindow) OrientM added in v1.0.16

func (w *TPanedWindow) OrientM() string

OrientM is like Orient but panics on error.

func (*TPanedWindow) SetCursor added in v1.0.14

func (w *TPanedWindow) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TPanedWindow) SetCursorM added in v1.0.16

func (w *TPanedWindow) SetCursorM(value string) *TPanedWindow

SetCursorM is like Cursor but panics on error

func (*TPanedWindow) SetHeight added in v1.0.14

func (w *TPanedWindow) SetHeight(value string) error

If present and greater than zero, specifies the desired height of the widget in pixels. Otherwise, the requested height is determined by the height of the managed windows.

func (*TPanedWindow) SetHeightM added in v1.0.16

func (w *TPanedWindow) SetHeightM(value string) *TPanedWindow

SetHeightM is like Height but panics on error

func (*TPanedWindow) SetOrient added in v1.0.14

func (w *TPanedWindow) SetOrient(value string) error

Orient reports the orientation of the window. If \fBvertical\fR, subpanes are stacked top-to-bottom; if \fBhorizontal\fR, subpanes are stacked left-to-right.

func (*TPanedWindow) SetOrientM added in v1.0.16

func (w *TPanedWindow) SetOrientM(value string) *TPanedWindow

SetOrientM is like Orient but panics on error

func (*TPanedWindow) SetStyle added in v1.0.14

func (w *TPanedWindow) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TPanedWindow) SetStyleM added in v1.0.16

func (w *TPanedWindow) SetStyleM(value string) *TPanedWindow

SetStyleM is like Style but panics on error

func (*TPanedWindow) SetTakeFocus added in v1.0.14

func (w *TPanedWindow) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TPanedWindow) SetTakeFocusM added in v1.0.16

func (w *TPanedWindow) SetTakeFocusM(value string) *TPanedWindow

SetTakeFocusM is like TakeFocus but panics on error

func (*TPanedWindow) SetWidth added in v1.0.14

func (w *TPanedWindow) SetWidth(value string) error

If present and greater than zero, specifies the desired width of the widget in pixels. Otherwise, the requested width is determined by the width of the managed windows.

func (*TPanedWindow) SetWidthM added in v1.0.16

func (w *TPanedWindow) SetWidthM(value string) *TPanedWindow

SetWidthM is like Width but panics on error

func (*TPanedWindow) Style added in v1.0.14

func (w *TPanedWindow) Style() (string, error)

May be used to specify a custom widget style.

func (*TPanedWindow) StyleM added in v1.0.16

func (w *TPanedWindow) StyleM() string

StyleM is like Style but panics on error.

func (*TPanedWindow) TakeFocus added in v1.0.14

func (w *TPanedWindow) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TPanedWindow) TakeFocusM added in v1.0.16

func (w *TPanedWindow) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TPanedWindow) Width added in v1.0.14

func (w *TPanedWindow) Width() (string, error)

If present and greater than zero, specifies the desired width of the widget in pixels. Otherwise, the requested width is determined by the width of the managed windows.

func (*TPanedWindow) WidthM added in v1.0.16

func (w *TPanedWindow) WidthM() string

WidthM is like Width but panics on error.

type TProgressBar added in v1.0.14

type TProgressBar struct {
	Window
}

TProgressBar represents the Tk ttk::progressbar widget.

func (*TProgressBar) Class added in v1.0.14

func (w *TProgressBar) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TProgressBar) ClassM added in v1.0.16

func (w *TProgressBar) ClassM() string

ClassM is like Class but panics on error.

func (*TProgressBar) Cursor added in v1.0.14

func (w *TProgressBar) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TProgressBar) CursorM added in v1.0.16

func (w *TProgressBar) CursorM() string

CursorM is like Cursor but panics on error.

func (*TProgressBar) Length added in v1.0.14

func (w *TProgressBar) Length() (string, error)

Length reports the length of the long axis of the progress bar (width if horizontal, height if vertical).

func (*TProgressBar) LengthM added in v1.0.16

func (w *TProgressBar) LengthM() string

LengthM is like Length but panics on error.

func (*TProgressBar) Maximum added in v1.0.14

func (w *TProgressBar) Maximum() (string, error)

A floating point number specifying the maximum \fB-value\fR. Defaults to 100.

func (*TProgressBar) MaximumM added in v1.0.16

func (w *TProgressBar) MaximumM() string

MaximumM is like Maximum but panics on error.

func (*TProgressBar) Mode added in v1.0.14

func (w *TProgressBar) Mode() (string, error)

One of \fBdeterminate\fR or \fBindeterminate\fR.

func (*TProgressBar) ModeM added in v1.0.16

func (w *TProgressBar) ModeM() string

ModeM is like Mode but panics on error.

func (*TProgressBar) Orient added in v1.0.14

func (w *TProgressBar) Orient() (string, error)

One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the progress bar.

func (*TProgressBar) OrientM added in v1.0.16

func (w *TProgressBar) OrientM() string

OrientM is like Orient but panics on error.

func (*TProgressBar) Phase added in v1.0.14

func (w *TProgressBar) Phase() (string, error)

Read-only option. The widget periodically increments the value of this option whenever the \fB-value\fR is greater than 0 and, in \fIdeterminate\fR mode, less than \fB-maximum\fR. This option may be used by the current theme to provide additional animation effects.

func (*TProgressBar) PhaseM added in v1.0.16

func (w *TProgressBar) PhaseM() string

PhaseM is like Phase but panics on error.

func (*TProgressBar) SetCursor added in v1.0.14

func (w *TProgressBar) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TProgressBar) SetCursorM added in v1.0.16

func (w *TProgressBar) SetCursorM(value string) *TProgressBar

SetCursorM is like Cursor but panics on error

func (*TProgressBar) SetLength added in v1.0.14

func (w *TProgressBar) SetLength(value string) error

Length reports the length of the long axis of the progress bar (width if horizontal, height if vertical).

func (*TProgressBar) SetLengthM added in v1.0.16

func (w *TProgressBar) SetLengthM(value string) *TProgressBar

SetLengthM is like Length but panics on error

func (*TProgressBar) SetMaximum added in v1.0.14

func (w *TProgressBar) SetMaximum(value string) error

A floating point number specifying the maximum \fB-value\fR. Defaults to 100.

func (*TProgressBar) SetMaximumM added in v1.0.16

func (w *TProgressBar) SetMaximumM(value string) *TProgressBar

SetMaximumM is like Maximum but panics on error

func (*TProgressBar) SetMode added in v1.0.14

func (w *TProgressBar) SetMode(value string) error

One of \fBdeterminate\fR or \fBindeterminate\fR.

func (*TProgressBar) SetModeM added in v1.0.16

func (w *TProgressBar) SetModeM(value string) *TProgressBar

SetModeM is like Mode but panics on error

func (*TProgressBar) SetOrient added in v1.0.14

func (w *TProgressBar) SetOrient(value string) error

One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the progress bar.

func (*TProgressBar) SetOrientM added in v1.0.16

func (w *TProgressBar) SetOrientM(value string) *TProgressBar

SetOrientM is like Orient but panics on error

func (*TProgressBar) SetPhase added in v1.0.14

func (w *TProgressBar) SetPhase(value string) error

Read-only option. The widget periodically increments the value of this option whenever the \fB-value\fR is greater than 0 and, in \fIdeterminate\fR mode, less than \fB-maximum\fR. This option may be used by the current theme to provide additional animation effects.

func (*TProgressBar) SetPhaseM added in v1.0.16

func (w *TProgressBar) SetPhaseM(value string) *TProgressBar

SetPhaseM is like Phase but panics on error

func (*TProgressBar) SetStyle added in v1.0.14

func (w *TProgressBar) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TProgressBar) SetStyleM added in v1.0.16

func (w *TProgressBar) SetStyleM(value string) *TProgressBar

SetStyleM is like Style but panics on error

func (*TProgressBar) SetTakeFocus added in v1.0.14

func (w *TProgressBar) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TProgressBar) SetTakeFocusM added in v1.0.16

func (w *TProgressBar) SetTakeFocusM(value string) *TProgressBar

SetTakeFocusM is like TakeFocus but panics on error

func (*TProgressBar) SetValue added in v1.0.14

func (w *TProgressBar) SetValue(value string) error

The current value of the progress bar. In \fIdeterminate\fR mode, this represents the amount of work completed. In \fIindeterminate\fR mode, it is interpreted modulo \fB-maximum\fR; that is, the progress bar completes one TODO .QW(cycle) when the \fB-value\fR increases by \fB-maximum\fR. If \fB-variable\fR is set to an existing variable, specifying \fB-value\fR has no effect (the variable value takes precedence).

func (*TProgressBar) SetValueM added in v1.0.16

func (w *TProgressBar) SetValueM(value string) *TProgressBar

SetValueM is like Value but panics on error

func (*TProgressBar) SetVariable added in v1.0.15

func (w *TProgressBar) SetVariable(value string) error

The name of a global Tcl variable which is linked to the \fB-value\fR. If specified to an existing variable, the \fB-value\fR of the progress bar is automatically set to the value of the variable whenever the latter is modified.

func (*TProgressBar) SetVariableM added in v1.0.16

func (w *TProgressBar) SetVariableM(value string) *TProgressBar

SetVariableM is like Variable but panics on error

func (*TProgressBar) Style added in v1.0.14

func (w *TProgressBar) Style() (string, error)

May be used to specify a custom widget style.

func (*TProgressBar) StyleM added in v1.0.16

func (w *TProgressBar) StyleM() string

StyleM is like Style but panics on error.

func (*TProgressBar) TakeFocus added in v1.0.14

func (w *TProgressBar) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TProgressBar) TakeFocusM added in v1.0.16

func (w *TProgressBar) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TProgressBar) Value added in v1.0.14

func (w *TProgressBar) Value() (string, error)

The current value of the progress bar. In \fIdeterminate\fR mode, this represents the amount of work completed. In \fIindeterminate\fR mode, it is interpreted modulo \fB-maximum\fR; that is, the progress bar completes one TODO .QW(cycle) when the \fB-value\fR increases by \fB-maximum\fR. If \fB-variable\fR is set to an existing variable, specifying \fB-value\fR has no effect (the variable value takes precedence).

func (*TProgressBar) ValueM added in v1.0.16

func (w *TProgressBar) ValueM() string

ValueM is like Value but panics on error.

func (*TProgressBar) Variable added in v1.0.15

func (w *TProgressBar) Variable() (string, error)

The name of a global Tcl variable which is linked to the \fB-value\fR. If specified to an existing variable, the \fB-value\fR of the progress bar is automatically set to the value of the variable whenever the latter is modified.

func (*TProgressBar) VariableM added in v1.0.16

func (w *TProgressBar) VariableM() string

VariableM is like Variable but panics on error.

type TRadioButton added in v1.0.14

type TRadioButton struct {
	Window
}

TRadioButton represents the Tk ttk::radiobutton widget.

func (*TRadioButton) Class added in v1.0.14

func (w *TRadioButton) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TRadioButton) ClassM added in v1.0.16

func (w *TRadioButton) ClassM() string

ClassM is like Class but panics on error.

func (*TRadioButton) Compound added in v1.0.14

func (w *TRadioButton) Compound() (string, error)

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TRadioButton) CompoundM added in v1.0.16

func (w *TRadioButton) CompoundM() string

CompoundM is like Compound but panics on error.

func (*TRadioButton) Cursor added in v1.0.14

func (w *TRadioButton) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TRadioButton) CursorM added in v1.0.16

func (w *TRadioButton) CursorM() string

CursorM is like Cursor but panics on error.

func (*TRadioButton) Image added in v1.0.14

func (w *TRadioButton) Image() (string, error)

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TRadioButton) ImageM added in v1.0.16

func (w *TRadioButton) ImageM() string

ImageM is like Image but panics on error.

func (*TRadioButton) SetCommand added in v1.0.14

func (w *TRadioButton) SetCommand(value Command) error

A Tcl script to evaluate whenever the widget is invoked.

func (*TRadioButton) SetCommandM added in v1.0.16

func (w *TRadioButton) SetCommandM(value Command) *TRadioButton

SetCommandM is like Command but panics on error

func (*TRadioButton) SetCompound added in v1.0.14

func (w *TRadioButton) SetCompound(value string) error

Compound reports 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 \fBnone\fR, \fBbottom\fR, \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text.

func (*TRadioButton) SetCompoundM added in v1.0.16

func (w *TRadioButton) SetCompoundM(value string) *TRadioButton

SetCompoundM is like Compound but panics on error

func (*TRadioButton) SetCursor added in v1.0.14

func (w *TRadioButton) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TRadioButton) SetCursorM added in v1.0.16

func (w *TRadioButton) SetCursorM(value string) *TRadioButton

SetCursorM is like Cursor but panics on error

func (*TRadioButton) SetImage added in v1.0.14

func (w *TRadioButton) SetImage(value string) error

Image reports an image to display in the widget, which must have been created with the \fBimage create\fR command. Typically, if the \fB-image\fR 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 \fB-compound\fR option; the \fB-image\fR option may be reset to an empty string to re-enable a bitmap or text display.

func (*TRadioButton) SetImageM added in v1.0.16

func (w *TRadioButton) SetImageM(value string) *TRadioButton

SetImageM is like Image but panics on error

func (*TRadioButton) SetState added in v1.0.14

func (w *TRadioButton) SetState(value string) error

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TRadioButton) SetStateM added in v1.0.16

func (w *TRadioButton) SetStateM(value string) *TRadioButton

SetStateM is like State but panics on error

func (*TRadioButton) SetStyle added in v1.0.14

func (w *TRadioButton) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TRadioButton) SetStyleM added in v1.0.16

func (w *TRadioButton) SetStyleM(value string) *TRadioButton

SetStyleM is like Style but panics on error

func (*TRadioButton) SetTakeFocus added in v1.0.14

func (w *TRadioButton) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TRadioButton) SetTakeFocusM added in v1.0.16

func (w *TRadioButton) SetTakeFocusM(value string) *TRadioButton

SetTakeFocusM is like TakeFocus but panics on error

func (*TRadioButton) SetText added in v1.0.14

func (w *TRadioButton) SetText(value string) error

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TRadioButton) SetTextM added in v1.0.16

func (w *TRadioButton) SetTextM(value string) *TRadioButton

SetTextM is like Text but panics on error

func (*TRadioButton) SetTextVariable added in v1.0.15

func (w *TRadioButton) SetTextVariable(value string) error

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TRadioButton) SetTextVariableM added in v1.0.16

func (w *TRadioButton) SetTextVariableM(value string) *TRadioButton

SetTextVariableM is like TextVariable but panics on error

func (*TRadioButton) SetUnderline added in v1.0.14

func (w *TRadioButton) SetUnderline(value string) error

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TRadioButton) SetUnderlineM added in v1.0.16

func (w *TRadioButton) SetUnderlineM(value string) *TRadioButton

SetUnderlineM is like Underline but panics on error

func (*TRadioButton) SetValue added in v1.0.14

func (w *TRadioButton) SetValue(value string) error

The value to store in the associated \fB-variable\fR when the widget is selected.

func (*TRadioButton) SetValueM added in v1.0.16

func (w *TRadioButton) SetValueM(value string) *TRadioButton

SetValueM is like Value but panics on error

func (*TRadioButton) SetVariable added in v1.0.15

func (w *TRadioButton) SetVariable(value string) error

The name of a global variable whose value is linked to the widget. Default value is \fB::selectedButton\fR.

func (*TRadioButton) SetVariableM added in v1.0.16

func (w *TRadioButton) SetVariableM(value string) *TRadioButton

SetVariableM is like Variable but panics on error

func (*TRadioButton) SetWidth added in v1.0.14

func (w *TRadioButton) SetWidth(value string) error

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TRadioButton) SetWidthM added in v1.0.16

func (w *TRadioButton) SetWidthM(value string) *TRadioButton

SetWidthM is like Width but panics on error

func (*TRadioButton) State added in v1.0.14

func (w *TRadioButton) State() (string, error)

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TRadioButton) StateM added in v1.0.16

func (w *TRadioButton) StateM() string

StateM is like State but panics on error.

func (*TRadioButton) Style added in v1.0.14

func (w *TRadioButton) Style() (string, error)

May be used to specify a custom widget style.

func (*TRadioButton) StyleM added in v1.0.16

func (w *TRadioButton) StyleM() string

StyleM is like Style but panics on error.

func (*TRadioButton) TakeFocus added in v1.0.14

func (w *TRadioButton) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TRadioButton) TakeFocusM added in v1.0.16

func (w *TRadioButton) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TRadioButton) Text added in v1.0.14

func (w *TRadioButton) Text() (string, error)

Text reports a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TRadioButton) TextM added in v1.0.16

func (w *TRadioButton) TextM() string

TextM is like Text but panics on error.

func (*TRadioButton) TextVariable added in v1.0.15

func (w *TRadioButton) TextVariable() (string, error)

TextVariable reports the name of a global variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as \fB-anchor\fR or \fB-justify\fR.

func (*TRadioButton) TextVariableM added in v1.0.16

func (w *TRadioButton) TextVariableM() string

TextVariableM is like TextVariable but panics on error.

func (*TRadioButton) Underline added in v1.0.14

func (w *TRadioButton) Underline() (string, error)

Underline reports the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

func (*TRadioButton) UnderlineM added in v1.0.16

func (w *TRadioButton) UnderlineM() string

UnderlineM is like Underline but panics on error.

func (*TRadioButton) Value added in v1.0.14

func (w *TRadioButton) Value() (string, error)

The value to store in the associated \fB-variable\fR when the widget is selected.

func (*TRadioButton) ValueM added in v1.0.16

func (w *TRadioButton) ValueM() string

ValueM is like Value but panics on error.

func (*TRadioButton) Variable added in v1.0.15

func (w *TRadioButton) Variable() (string, error)

The name of a global variable whose value is linked to the widget. Default value is \fB::selectedButton\fR.

func (*TRadioButton) VariableM added in v1.0.16

func (w *TRadioButton) VariableM() string

VariableM is like Variable but panics on error.

func (*TRadioButton) Width added in v1.0.14

func (w *TRadioButton) Width() (string, error)

If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used.

func (*TRadioButton) WidthM added in v1.0.16

func (w *TRadioButton) WidthM() string

WidthM is like Width but panics on error.

type TScale added in v1.0.13

type TScale struct {
	Window
}

TScale represents the Tk ttk::scale widget.

func (*TScale) Class added in v1.0.14

func (w *TScale) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TScale) ClassM added in v1.0.16

func (w *TScale) ClassM() string

ClassM is like Class but panics on error.

func (*TScale) Cursor added in v1.0.14

func (w *TScale) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TScale) CursorM added in v1.0.16

func (w *TScale) CursorM() string

CursorM is like Cursor but panics on error.

func (*TScale) From added in v1.0.14

func (w *TScale) From() (string, error)

A real value corresponding to the left or top end of the scale.

func (*TScale) FromM added in v1.0.16

func (w *TScale) FromM() string

FromM is like From but panics on error.

func (*TScale) Length added in v1.0.14

func (w *TScale) Length() (string, error)

Length reports the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). For vertical scales this is the scale's height; for horizontal scales it is the scale's width.

func (*TScale) LengthM added in v1.0.16

func (w *TScale) LengthM() string

LengthM is like Length but panics on error.

func (*TScale) Orient added in v1.0.14

func (w *TScale) Orient() (string, error)

Orient reports which orientation whether the widget should be laid out horizontally or vertically. Must be either \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*TScale) OrientM added in v1.0.16

func (w *TScale) OrientM() string

OrientM is like Orient but panics on error.

func (*TScale) SetCommand added in v1.0.14

func (w *TScale) SetCommand(value Command) error

Command specifies the prefix of a Tcl command to invoke whenever the scale's value is changed via a widget command. The actual command consists of this option followed by a space and a real number indicating the new value of the scale.

func (*TScale) SetCommandM added in v1.0.16

func (w *TScale) SetCommandM(value Command) *TScale

SetCommandM is like Command but panics on error

func (*TScale) SetCursor added in v1.0.14

func (w *TScale) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TScale) SetCursorM added in v1.0.16

func (w *TScale) SetCursorM(value string) *TScale

SetCursorM is like Cursor but panics on error

func (*TScale) SetFrom added in v1.0.14

func (w *TScale) SetFrom(value string) error

A real value corresponding to the left or top end of the scale.

func (*TScale) SetFromM added in v1.0.16

func (w *TScale) SetFromM(value string) *TScale

SetFromM is like From but panics on error

func (*TScale) SetLength added in v1.0.14

func (w *TScale) SetLength(value string) error

Length reports the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). For vertical scales this is the scale's height; for horizontal scales it is the scale's width.

func (*TScale) SetLengthM added in v1.0.16

func (w *TScale) SetLengthM(value string) *TScale

SetLengthM is like Length but panics on error

func (*TScale) SetOrient added in v1.0.14

func (w *TScale) SetOrient(value string) error

Orient reports which orientation whether the widget should be laid out horizontally or vertically. Must be either \fBhorizontal\fR or \fBvertical\fR or an abbreviation of one of these.

func (*TScale) SetOrientM added in v1.0.16

func (w *TScale) SetOrientM(value string) *TScale

SetOrientM is like Orient but panics on error

func (*TScale) SetStyle added in v1.0.14

func (w *TScale) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TScale) SetStyleM added in v1.0.16

func (w *TScale) SetStyleM(value string) *TScale

SetStyleM is like Style but panics on error

func (*TScale) SetTakeFocus added in v1.0.14

func (w *TScale) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TScale) SetTakeFocusM added in v1.0.16

func (w *TScale) SetTakeFocusM(value string) *TScale

SetTakeFocusM is like TakeFocus but panics on error

func (*TScale) SetTo added in v1.0.14

func (w *TScale) SetTo(value string) error

To reports a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the \fB-from\fR option.

func (*TScale) SetToM added in v1.0.16

func (w *TScale) SetToM(value string) *TScale

SetToM is like To but panics on error

func (*TScale) SetValue added in v1.0.14

func (w *TScale) SetValue(value string) error

Value reports the current floating-point value of the variable. If \fB-variable\fR is set to an existing variable, specifying \fB-value\fR has no effect (the variable value takes precedence).

func (*TScale) SetValueM added in v1.0.16

func (w *TScale) SetValueM(value string) *TScale

SetValueM is like Value but panics on error

func (*TScale) SetVariable added in v1.0.15

func (w *TScale) SetVariable(value string) error

Variable reports the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale's new value.

func (*TScale) SetVariableM added in v1.0.16

func (w *TScale) SetVariableM(value string) *TScale

SetVariableM is like Variable but panics on error

func (*TScale) Style added in v1.0.14

func (w *TScale) Style() (string, error)

May be used to specify a custom widget style.

func (*TScale) StyleM added in v1.0.16

func (w *TScale) StyleM() string

StyleM is like Style but panics on error.

func (*TScale) TakeFocus added in v1.0.14

func (w *TScale) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TScale) TakeFocusM added in v1.0.16

func (w *TScale) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TScale) To added in v1.0.14

func (w *TScale) To() (string, error)

To reports a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the \fB-from\fR option.

func (*TScale) ToM added in v1.0.16

func (w *TScale) ToM() string

ToM is like To but panics on error.

func (*TScale) Value added in v1.0.14

func (w *TScale) Value() (string, error)

Value reports the current floating-point value of the variable. If \fB-variable\fR is set to an existing variable, specifying \fB-value\fR has no effect (the variable value takes precedence).

func (*TScale) ValueM added in v1.0.16

func (w *TScale) ValueM() string

ValueM is like Value but panics on error.

func (*TScale) Variable added in v1.0.15

func (w *TScale) Variable() (string, error)

Variable reports the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale's new value.

func (*TScale) VariableM added in v1.0.16

func (w *TScale) VariableM() string

VariableM is like Variable but panics on error.

type TScrollbar added in v1.0.13

type TScrollbar struct {
	Window
}

TScrollbar represents the Tk ttk::scrollbar widget.

func (*TScrollbar) Class added in v1.0.14

func (w *TScrollbar) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TScrollbar) ClassM added in v1.0.16

func (w *TScrollbar) ClassM() string

ClassM is like Class but panics on error.

func (*TScrollbar) Cursor added in v1.0.14

func (w *TScrollbar) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TScrollbar) CursorM added in v1.0.16

func (w *TScrollbar) CursorM() string

CursorM is like Cursor but panics on error.

func (*TScrollbar) Orient added in v1.0.14

func (w *TScrollbar) Orient() (string, error)

One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the scrollbar.

func (*TScrollbar) OrientM added in v1.0.16

func (w *TScrollbar) OrientM() string

OrientM is like Orient but panics on error.

func (*TScrollbar) SetCommand added in v1.0.14

func (w *TScrollbar) SetCommand(value Command) error

A Tcl script prefix to evaluate to change the view in the widget associated with the scrollbar. Additional arguments are appended to the value of this option, as described in \fBSCROLLING COMMANDS\fR below, whenever the user requests a view change by manipulating the scrollbar.

func (*TScrollbar) SetCommandM added in v1.0.16

func (w *TScrollbar) SetCommandM(value Command) *TScrollbar

SetCommandM is like Command but panics on error

func (*TScrollbar) SetCursor added in v1.0.14

func (w *TScrollbar) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TScrollbar) SetCursorM added in v1.0.16

func (w *TScrollbar) SetCursorM(value string) *TScrollbar

SetCursorM is like Cursor but panics on error

func (*TScrollbar) SetOrient added in v1.0.14

func (w *TScrollbar) SetOrient(value string) error

One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the scrollbar.

func (*TScrollbar) SetOrientM added in v1.0.16

func (w *TScrollbar) SetOrientM(value string) *TScrollbar

SetOrientM is like Orient but panics on error

func (*TScrollbar) SetStyle added in v1.0.14

func (w *TScrollbar) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TScrollbar) SetStyleM added in v1.0.16

func (w *TScrollbar) SetStyleM(value string) *TScrollbar

SetStyleM is like Style but panics on error

func (*TScrollbar) SetTakeFocus added in v1.0.14

func (w *TScrollbar) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TScrollbar) SetTakeFocusM added in v1.0.16

func (w *TScrollbar) SetTakeFocusM(value string) *TScrollbar

SetTakeFocusM is like TakeFocus but panics on error

func (*TScrollbar) Style added in v1.0.14

func (w *TScrollbar) Style() (string, error)

May be used to specify a custom widget style.

func (*TScrollbar) StyleM added in v1.0.16

func (w *TScrollbar) StyleM() string

StyleM is like Style but panics on error.

func (*TScrollbar) TakeFocus added in v1.0.14

func (w *TScrollbar) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TScrollbar) TakeFocusM added in v1.0.16

func (w *TScrollbar) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

type TSeparator added in v1.0.13

type TSeparator struct {
	Window
}

TSeparator represents the Tk ttk::separator widget.

func (*TSeparator) Class added in v1.0.14

func (w *TSeparator) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TSeparator) ClassM added in v1.0.16

func (w *TSeparator) ClassM() string

ClassM is like Class but panics on error.

func (*TSeparator) Cursor added in v1.0.14

func (w *TSeparator) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TSeparator) CursorM added in v1.0.16

func (w *TSeparator) CursorM() string

CursorM is like Cursor but panics on error.

func (*TSeparator) Orient added in v1.0.14

func (w *TSeparator) Orient() (string, error)

One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the separator.

func (*TSeparator) OrientM added in v1.0.16

func (w *TSeparator) OrientM() string

OrientM is like Orient but panics on error.

func (*TSeparator) SetCursor added in v1.0.14

func (w *TSeparator) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TSeparator) SetCursorM added in v1.0.16

func (w *TSeparator) SetCursorM(value string) *TSeparator

SetCursorM is like Cursor but panics on error

func (*TSeparator) SetOrient added in v1.0.14

func (w *TSeparator) SetOrient(value string) error

One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the separator.

func (*TSeparator) SetOrientM added in v1.0.16

func (w *TSeparator) SetOrientM(value string) *TSeparator

SetOrientM is like Orient but panics on error

func (*TSeparator) SetStyle added in v1.0.14

func (w *TSeparator) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TSeparator) SetStyleM added in v1.0.16

func (w *TSeparator) SetStyleM(value string) *TSeparator

SetStyleM is like Style but panics on error

func (*TSeparator) SetTakeFocus added in v1.0.14

func (w *TSeparator) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TSeparator) SetTakeFocusM added in v1.0.16

func (w *TSeparator) SetTakeFocusM(value string) *TSeparator

SetTakeFocusM is like TakeFocus but panics on error

func (*TSeparator) Style added in v1.0.14

func (w *TSeparator) Style() (string, error)

May be used to specify a custom widget style.

func (*TSeparator) StyleM added in v1.0.16

func (w *TSeparator) StyleM() string

StyleM is like Style but panics on error.

func (*TSeparator) TakeFocus added in v1.0.14

func (w *TSeparator) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TSeparator) TakeFocusM added in v1.0.16

func (w *TSeparator) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

type TSizeGrip added in v1.0.14

type TSizeGrip struct {
	Window
}

TSizeGrip represents the Tk ttk::sizegrip widget.

func (*TSizeGrip) Class added in v1.0.14

func (w *TSizeGrip) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TSizeGrip) ClassM added in v1.0.16

func (w *TSizeGrip) ClassM() string

ClassM is like Class but panics on error.

func (*TSizeGrip) Cursor added in v1.0.14

func (w *TSizeGrip) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TSizeGrip) CursorM added in v1.0.16

func (w *TSizeGrip) CursorM() string

CursorM is like Cursor but panics on error.

func (*TSizeGrip) SetCursor added in v1.0.14

func (w *TSizeGrip) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TSizeGrip) SetCursorM added in v1.0.16

func (w *TSizeGrip) SetCursorM(value string) *TSizeGrip

SetCursorM is like Cursor but panics on error

func (*TSizeGrip) SetStyle added in v1.0.14

func (w *TSizeGrip) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TSizeGrip) SetStyleM added in v1.0.16

func (w *TSizeGrip) SetStyleM(value string) *TSizeGrip

SetStyleM is like Style but panics on error

func (*TSizeGrip) SetTakeFocus added in v1.0.14

func (w *TSizeGrip) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TSizeGrip) SetTakeFocusM added in v1.0.16

func (w *TSizeGrip) SetTakeFocusM(value string) *TSizeGrip

SetTakeFocusM is like TakeFocus but panics on error

func (*TSizeGrip) Style added in v1.0.14

func (w *TSizeGrip) Style() (string, error)

May be used to specify a custom widget style.

func (*TSizeGrip) StyleM added in v1.0.16

func (w *TSizeGrip) StyleM() string

StyleM is like Style but panics on error.

func (*TSizeGrip) TakeFocus added in v1.0.14

func (w *TSizeGrip) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TSizeGrip) TakeFocusM added in v1.0.16

func (w *TSizeGrip) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

type TSpinBox added in v1.0.14

type TSpinBox struct {
	Window
}

TSpinBox represents the Tk ttk::spinbox widget.

func (*TSpinBox) Class added in v1.0.14

func (w *TSpinBox) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TSpinBox) ClassM added in v1.0.16

func (w *TSpinBox) ClassM() string

ClassM is like Class but panics on error.

func (*TSpinBox) Cursor added in v1.0.14

func (w *TSpinBox) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TSpinBox) CursorM added in v1.0.16

func (w *TSpinBox) CursorM() string

CursorM is like Cursor but panics on error.

func (*TSpinBox) Format added in v1.0.14

func (w *TSpinBox) Format() (string, error)

Format reports an alternate format to use when setting the string value when using the \fB-from\fR and \fB-to\fR range. This must be a format specifier of the form \fB%<pad>.<pad>f\fR, as it will format a floating-point number.

func (*TSpinBox) FormatM added in v1.0.16

func (w *TSpinBox) FormatM() string

FormatM is like Format but panics on error.

func (*TSpinBox) From added in v1.0.14

func (w *TSpinBox) From() (string, error)

A floating-point value specifying the lowest value for the spinbox. This is used in conjunction with \fB-to\fR and \fB-increment\fR to set a numerical range.

func (*TSpinBox) FromM added in v1.0.16

func (w *TSpinBox) FromM() string

FromM is like From but panics on error.

func (*TSpinBox) Increment added in v1.0.14

func (w *TSpinBox) Increment() (string, error)

A floating-point value specifying the change in value to be applied each time one of the widget spin buttons is pressed. The up button applies a positive increment, the down button applies a negative increment.

func (*TSpinBox) IncrementM added in v1.0.16

func (w *TSpinBox) IncrementM() string

IncrementM is like Increment but panics on error.

func (*TSpinBox) SetCommand added in v1.0.14

func (w *TSpinBox) SetCommand(value Command) error

Command specifies a Tcl command to be invoked whenever a spinbutton is invoked.

func (*TSpinBox) SetCommandM added in v1.0.16

func (w *TSpinBox) SetCommandM(value Command) *TSpinBox

SetCommandM is like Command but panics on error

func (*TSpinBox) SetCursor added in v1.0.14

func (w *TSpinBox) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TSpinBox) SetCursorM added in v1.0.16

func (w *TSpinBox) SetCursorM(value string) *TSpinBox

SetCursorM is like Cursor but panics on error

func (*TSpinBox) SetFormat added in v1.0.14

func (w *TSpinBox) SetFormat(value string) error

Format reports an alternate format to use when setting the string value when using the \fB-from\fR and \fB-to\fR range. This must be a format specifier of the form \fB%<pad>.<pad>f\fR, as it will format a floating-point number.

func (*TSpinBox) SetFormatM added in v1.0.16

func (w *TSpinBox) SetFormatM(value string) *TSpinBox

SetFormatM is like Format but panics on error

func (*TSpinBox) SetFrom added in v1.0.14

func (w *TSpinBox) SetFrom(value string) error

A floating-point value specifying the lowest value for the spinbox. This is used in conjunction with \fB-to\fR and \fB-increment\fR to set a numerical range.

func (*TSpinBox) SetFromM added in v1.0.16

func (w *TSpinBox) SetFromM(value string) *TSpinBox

SetFromM is like From but panics on error

func (*TSpinBox) SetIncrement added in v1.0.14

func (w *TSpinBox) SetIncrement(value string) error

A floating-point value specifying the change in value to be applied each time one of the widget spin buttons is pressed. The up button applies a positive increment, the down button applies a negative increment.

func (*TSpinBox) SetIncrementM added in v1.0.16

func (w *TSpinBox) SetIncrementM(value string) *TSpinBox

SetIncrementM is like Increment but panics on error

func (*TSpinBox) SetState added in v1.0.14

func (w *TSpinBox) SetState(value string) error

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TSpinBox) SetStateM added in v1.0.16

func (w *TSpinBox) SetStateM(value string) *TSpinBox

SetStateM is like State but panics on error

func (*TSpinBox) SetStyle added in v1.0.14

func (w *TSpinBox) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TSpinBox) SetStyleM added in v1.0.16

func (w *TSpinBox) SetStyleM(value string) *TSpinBox

SetStyleM is like Style but panics on error

func (*TSpinBox) SetTakeFocus added in v1.0.14

func (w *TSpinBox) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TSpinBox) SetTakeFocusM added in v1.0.16

func (w *TSpinBox) SetTakeFocusM(value string) *TSpinBox

SetTakeFocusM is like TakeFocus but panics on error

func (*TSpinBox) SetTo added in v1.0.14

func (w *TSpinBox) SetTo(value string) error

A floating-point value specifying the highest permissible value for the widget. See also \fB-from\fR and \fB-increment\fR. range.

func (*TSpinBox) SetToM added in v1.0.16

func (w *TSpinBox) SetToM(value string) *TSpinBox

SetToM is like To but panics on error

func (*TSpinBox) SetValidate added in v1.0.14

func (w *TSpinBox) SetValidate(value string) error

TODO(nodocs)

func (*TSpinBox) SetValidateCommand added in v1.0.14

func (w *TSpinBox) SetValidateCommand(value string) error

TODO(nodocs)

func (*TSpinBox) SetValidateCommandM added in v1.0.16

func (w *TSpinBox) SetValidateCommandM(value string) *TSpinBox

SetValidateCommandM is like ValidateCommand but panics on error

func (*TSpinBox) SetValidateM added in v1.0.16

func (w *TSpinBox) SetValidateM(value string) *TSpinBox

SetValidateM is like Validate but panics on error

func (*TSpinBox) SetValues added in v1.0.14

func (w *TSpinBox) SetValues(value string) error

This must be a Tcl list of values. If this option is set then this will override any range set using the \fB-from\fR, \fB-to\fR and \fB-increment\fR options. The widget will instead use the values specified beginning with the first value.

func (*TSpinBox) SetValuesM added in v1.0.16

func (w *TSpinBox) SetValuesM(value string) *TSpinBox

SetValuesM is like Values but panics on error

func (*TSpinBox) SetWrap added in v1.0.14

func (w *TSpinBox) SetWrap(value string) error

Must be a proper boolean value. If on, the spinbox will wrap around the values of data in the widget.

func (*TSpinBox) SetWrapM added in v1.0.16

func (w *TSpinBox) SetWrapM(value string) *TSpinBox

SetWrapM is like Wrap but panics on error

func (*TSpinBox) SetXScrollCommand added in v1.0.14

func (w *TSpinBox) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*TSpinBox) SetXScrollCommandM added in v1.0.16

func (w *TSpinBox) SetXScrollCommandM(value Command) *TSpinBox

SetXScrollCommandM is like XScrollCommand but panics on error

func (*TSpinBox) State added in v1.0.14

func (w *TSpinBox) State() (string, error)

May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. This is a write-only option: setting it changes the widget state, but the \fBstate\fR widget command does not affect the \fB-state\fR option.

func (*TSpinBox) StateM added in v1.0.16

func (w *TSpinBox) StateM() string

StateM is like State but panics on error.

func (*TSpinBox) Style added in v1.0.14

func (w *TSpinBox) Style() (string, error)

May be used to specify a custom widget style.

func (*TSpinBox) StyleM added in v1.0.16

func (w *TSpinBox) StyleM() string

StyleM is like Style but panics on error.

func (*TSpinBox) TakeFocus added in v1.0.14

func (w *TSpinBox) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TSpinBox) TakeFocusM added in v1.0.16

func (w *TSpinBox) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TSpinBox) To added in v1.0.14

func (w *TSpinBox) To() (string, error)

A floating-point value specifying the highest permissible value for the widget. See also \fB-from\fR and \fB-increment\fR. range.

func (*TSpinBox) ToM added in v1.0.16

func (w *TSpinBox) ToM() string

ToM is like To but panics on error.

func (*TSpinBox) Validate added in v1.0.14

func (w *TSpinBox) Validate() (string, error)

TODO(nodocs)

func (*TSpinBox) ValidateCommand added in v1.0.14

func (w *TSpinBox) ValidateCommand() (string, error)

TODO(nodocs)

func (*TSpinBox) ValidateCommandM added in v1.0.16

func (w *TSpinBox) ValidateCommandM() string

ValidateCommandM is like ValidateCommand but panics on error.

func (*TSpinBox) ValidateM added in v1.0.16

func (w *TSpinBox) ValidateM() string

ValidateM is like Validate but panics on error.

func (*TSpinBox) Values added in v1.0.14

func (w *TSpinBox) Values() (string, error)

This must be a Tcl list of values. If this option is set then this will override any range set using the \fB-from\fR, \fB-to\fR and \fB-increment\fR options. The widget will instead use the values specified beginning with the first value.

func (*TSpinBox) ValuesM added in v1.0.16

func (w *TSpinBox) ValuesM() string

ValuesM is like Values but panics on error.

func (*TSpinBox) Wrap added in v1.0.14

func (w *TSpinBox) Wrap() (string, error)

Must be a proper boolean value. If on, the spinbox will wrap around the values of data in the widget.

func (*TSpinBox) WrapM added in v1.0.16

func (w *TSpinBox) WrapM() string

WrapM is like Wrap but panics on error.

type TTreeView added in v1.0.14

type TTreeView struct {
	Window
}

TTreeView represents the Tk ttk::treeview widget.

func (*TTreeView) Class added in v1.0.14

func (w *TTreeView) Class() (string, error)

Class reports 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 \fBconfigure\fR widget command.

func (*TTreeView) ClassM added in v1.0.16

func (w *TTreeView) ClassM() string

ClassM is like Class but panics on error.

func (*TTreeView) Columns added in v1.0.14

func (w *TTreeView) Columns() (string, error)

A list of column identifiers, specifying the number of columns and their names.

func (*TTreeView) ColumnsM added in v1.0.16

func (w *TTreeView) ColumnsM() string

ColumnsM is like Columns but panics on error.

func (*TTreeView) Cursor added in v1.0.14

func (w *TTreeView) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TTreeView) CursorM added in v1.0.16

func (w *TTreeView) CursorM() string

CursorM is like Cursor but panics on error.

func (*TTreeView) DisplayColumns added in v1.0.14

func (w *TTreeView) DisplayColumns() (string, error)

A list of column identifiers (either symbolic names or integer indices) specifying which data columns are displayed and the order in which they appear, or the string \fB#all\fP. If set to \fB#all\fP (the default), all columns are shown in the order given.

func (*TTreeView) DisplayColumnsM added in v1.0.16

func (w *TTreeView) DisplayColumnsM() string

DisplayColumnsM is like DisplayColumns but panics on error.

func (*TTreeView) Height added in v1.0.14

func (w *TTreeView) Height() (string, error)

Height reports the number of rows which should be visible. Note: the requested width is determined from the sum of the column widths.

func (*TTreeView) HeightM added in v1.0.16

func (w *TTreeView) HeightM() string

HeightM is like Height but panics on error.

func (*TTreeView) Padding added in v1.0.14

func (w *TTreeView) Padding() (string, error)

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TTreeView) PaddingM added in v1.0.16

func (w *TTreeView) PaddingM() string

PaddingM is like Padding but panics on error.

func (*TTreeView) SelectMode added in v1.0.14

func (w *TTreeView) SelectMode() (string, error)

Controls how the built-in class bindings manage the selection. One of \fBextended\fR, \fBbrowse\fR, or \fBnone\fR.

func (*TTreeView) SelectModeM added in v1.0.16

func (w *TTreeView) SelectModeM() string

SelectModeM is like SelectMode but panics on error.

func (*TTreeView) SetColumns added in v1.0.14

func (w *TTreeView) SetColumns(value string) error

A list of column identifiers, specifying the number of columns and their names.

func (*TTreeView) SetColumnsM added in v1.0.16

func (w *TTreeView) SetColumnsM(value string) *TTreeView

SetColumnsM is like Columns but panics on error

func (*TTreeView) SetCursor added in v1.0.14

func (w *TTreeView) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TTreeView) SetCursorM added in v1.0.16

func (w *TTreeView) SetCursorM(value string) *TTreeView

SetCursorM is like Cursor but panics on error

func (*TTreeView) SetDisplayColumns added in v1.0.14

func (w *TTreeView) SetDisplayColumns(value string) error

A list of column identifiers (either symbolic names or integer indices) specifying which data columns are displayed and the order in which they appear, or the string \fB#all\fP. If set to \fB#all\fP (the default), all columns are shown in the order given.

func (*TTreeView) SetDisplayColumnsM added in v1.0.16

func (w *TTreeView) SetDisplayColumnsM(value string) *TTreeView

SetDisplayColumnsM is like DisplayColumns but panics on error

func (*TTreeView) SetHeight added in v1.0.14

func (w *TTreeView) SetHeight(value string) error

Height reports the number of rows which should be visible. Note: the requested width is determined from the sum of the column widths.

func (*TTreeView) SetHeightM added in v1.0.16

func (w *TTreeView) SetHeightM(value string) *TTreeView

SetHeightM is like Height but panics on error

func (*TTreeView) SetPadding added in v1.0.14

func (w *TTreeView) SetPadding(value string) error

Padding reports the internal padding for the widget. The padding is a list of up to four length specifications \fIleft top right bottom\fR. If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and \fItop\fR defaults to \fIleft\fR. 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.

func (*TTreeView) SetPaddingM added in v1.0.16

func (w *TTreeView) SetPaddingM(value string) *TTreeView

SetPaddingM is like Padding but panics on error

func (*TTreeView) SetSelectMode added in v1.0.14

func (w *TTreeView) SetSelectMode(value string) error

Controls how the built-in class bindings manage the selection. One of \fBextended\fR, \fBbrowse\fR, or \fBnone\fR.

func (*TTreeView) SetSelectModeM added in v1.0.16

func (w *TTreeView) SetSelectModeM(value string) *TTreeView

SetSelectModeM is like SelectMode but panics on error

func (*TTreeView) SetShow added in v1.0.14

func (w *TTreeView) SetShow(value string) error

A list containing zero or more of the following values, specifying which elements of the tree to display. TODO .IP(\fBtree\fR) TODO .IP(\fBheadings\fR)

func (*TTreeView) SetShowM added in v1.0.16

func (w *TTreeView) SetShowM(value string) *TTreeView

SetShowM is like Show but panics on error

func (*TTreeView) SetStyle added in v1.0.14

func (w *TTreeView) SetStyle(value string) error

May be used to specify a custom widget style.

func (*TTreeView) SetStyleM added in v1.0.16

func (w *TTreeView) SetStyleM(value string) *TTreeView

SetStyleM is like Style but panics on error

func (*TTreeView) SetTakeFocus added in v1.0.14

func (w *TTreeView) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TTreeView) SetTakeFocusM added in v1.0.16

func (w *TTreeView) SetTakeFocusM(value string) *TTreeView

SetTakeFocusM is like TakeFocus but panics on error

func (*TTreeView) SetXScrollCommand added in v1.0.14

func (w *TTreeView) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*TTreeView) SetXScrollCommandM added in v1.0.16

func (w *TTreeView) SetXScrollCommandM(value Command) *TTreeView

SetXScrollCommandM is like XScrollCommand but panics on error

func (*TTreeView) SetYScrollCommand added in v1.0.17

func (w *TTreeView) SetYScrollCommand(value Command) error

YScrollCommand specifies the prefix for a command used to communicate with vertical scrollbars. This option is treated in the same way as the \fB-xscrollcommand\fR option, except that it is used for vertical scrollbars and is provided by widgets that support vertical scrolling. See the description of \fB-xscrollcommand\fR for details on how this option is used.

func (*TTreeView) SetYScrollCommandM added in v1.0.17

func (w *TTreeView) SetYScrollCommandM(value Command) *TTreeView

SetYScrollCommandM is like YScrollCommand but panics on error

func (*TTreeView) Show added in v1.0.14

func (w *TTreeView) Show() (string, error)

A list containing zero or more of the following values, specifying which elements of the tree to display. TODO .IP(\fBtree\fR) TODO .IP(\fBheadings\fR)

func (*TTreeView) ShowM added in v1.0.16

func (w *TTreeView) ShowM() string

ShowM is like Show but panics on error.

func (*TTreeView) Style added in v1.0.14

func (w *TTreeView) Style() (string, error)

May be used to specify a custom widget style.

func (*TTreeView) StyleM added in v1.0.16

func (w *TTreeView) StyleM() string

StyleM is like Style but panics on error.

func (*TTreeView) TakeFocus added in v1.0.14

func (w *TTreeView) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TTreeView) TakeFocusM added in v1.0.16

func (w *TTreeView) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

type Text added in v1.0.13

type Text struct {
	Window
}

Text represents the Tk text widget.

func (*Text) AutoSeparators added in v1.0.14

func (w *Text) AutoSeparators() (string, error)

AutoSeparators reports a boolean that says whether separators are automatically inserted in the undo stack. Only meaningful when the \fB-undo\fR option is true.

func (*Text) AutoSeparatorsM added in v1.0.16

func (w *Text) AutoSeparatorsM() string

AutoSeparatorsM is like AutoSeparators but panics on error.

func (*Text) Background added in v1.0.14

func (w *Text) Background() (string, error)

Background reports the normal background color to use when displaying the widget.

func (*Text) BackgroundM added in v1.0.16

func (w *Text) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*Text) BlockCursor added in v1.0.14

func (w *Text) BlockCursor() (string, error)

BlockCursor reports a boolean that says whether the blinking insertion cursor should be drawn as a character-sized rectangular block. If false (the default) a thin vertical line is used for the insertion cursor.

func (*Text) BlockCursorM added in v1.0.16

func (w *Text) BlockCursorM() string

BlockCursorM is like BlockCursor but panics on error.

func (*Text) BorderWidth added in v1.0.14

func (w *Text) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Text) BorderWidthM added in v1.0.16

func (w *Text) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*Text) Cursor added in v1.0.14

func (w *Text) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Text) CursorM added in v1.0.16

func (w *Text) CursorM() string

CursorM is like Cursor but panics on error.

func (*Text) EndLine added in v1.0.14

func (w *Text) EndLine() (string, error)

EndLine reports an integer line index representing the line of the underlying textual data store that should be just after the last line contained in the widget. This allows a text widget to reflect only a portion of a larger piece of text. Instead of an integer, the empty string can be provided to this configuration option, which will configure the widget to end at the very last line in the textual data store.

func (*Text) EndLineM added in v1.0.16

func (w *Text) EndLineM() string

EndLineM is like EndLine but panics on error.

func (*Text) ExportSelection added in v1.0.14

func (w *Text) ExportSelection() (bool, error)

ExportSelection reports whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*Text) ExportSelectionM added in v1.0.16

func (w *Text) ExportSelectionM() bool

ExportSelectionM is like ExportSelection but panics on error.

func (*Text) Font added in v1.0.14

func (w *Text) Font() (string, error)

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Text) FontM added in v1.0.16

func (w *Text) FontM() string

FontM is like Font but panics on error.

func (*Text) Foreground added in v1.0.14

func (w *Text) Foreground() (string, error)

Foreground reports the normal foreground color to use when displaying the widget.

func (*Text) ForegroundM added in v1.0.16

func (w *Text) ForegroundM() string

ForegroundM is like Foreground but panics on error.

func (*Text) Height added in v1.0.14

func (w *Text) Height() (string, error)

Height reports the desired height for the window, in units of characters in the font given by the \fB-font\fR option. Must be at least one.

func (*Text) HeightM added in v1.0.16

func (w *Text) HeightM() string

HeightM is like Height but panics on error.

func (*Text) HighlightBackground added in v1.0.14

func (w *Text) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Text) HighlightBackgroundM added in v1.0.16

func (w *Text) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*Text) HighlightColor added in v1.0.14

func (w *Text) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Text) HighlightColorM added in v1.0.16

func (w *Text) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*Text) HighlightThickness added in v1.0.14

func (w *Text) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Text) HighlightThicknessM added in v1.0.16

func (w *Text) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*Text) InactiveSelectBackground added in v1.0.14

func (w *Text) InactiveSelectBackground() (string, error)

InactiveSelectBackground reports the colour to use for the selection (the \fBsel\fR tag) when the window does not have the input focus. If empty, \fB{}\fR, then no selection is shown when the window does not have the focus.

func (*Text) InactiveSelectBackgroundM added in v1.0.16

func (w *Text) InactiveSelectBackgroundM() string

InactiveSelectBackgroundM is like InactiveSelectBackground but panics on error.

func (*Text) InsertBackground added in v1.0.14

func (w *Text) InsertBackground() (string, error)

InsertBackground reports 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).

func (*Text) InsertBackgroundM added in v1.0.16

func (w *Text) InsertBackgroundM() string

InsertBackgroundM is like InsertBackground but panics on error.

func (*Text) InsertBorderWidth added in v1.0.14

func (w *Text) InsertBorderWidth() (string, error)

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*Text) InsertBorderWidthM added in v1.0.16

func (w *Text) InsertBorderWidthM() string

InsertBorderWidthM is like InsertBorderWidth but panics on error.

func (*Text) InsertOffTime added in v1.0.14

func (w *Text) InsertOffTime() (int, error)

InsertOffTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*Text) InsertOffTimeM added in v1.0.16

func (w *Text) InsertOffTimeM() int

InsertOffTimeM is like InsertOffTime but panics on error.

func (*Text) InsertOnTime added in v1.0.14

func (w *Text) InsertOnTime() (int, error)

InsertOnTime reports a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*Text) InsertOnTimeM added in v1.0.16

func (w *Text) InsertOnTimeM() int

InsertOnTimeM is like InsertOnTime but panics on error.

func (*Text) InsertUnfocussed added in v1.0.14

func (w *Text) InsertUnfocussed() (string, error)

InsertUnfocussed reports how to display the insertion cursor when the widget does not have the focus. Must be \fBnone\fR (the default) which means to not display the cursor, \fBhollow\fR which means to display a hollow box, or \fBsolid\fR which means to display a solid box. Note that \fBhollow\fR and \fBsolid\fR will appear very similar when the \fB-blockcursor\fR option is false.

func (*Text) InsertUnfocussedM added in v1.0.16

func (w *Text) InsertUnfocussedM() string

InsertUnfocussedM is like InsertUnfocussed but panics on error.

func (*Text) InsertWidth added in v1.0.14

func (w *Text) InsertWidth() (string, error)

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*Text) InsertWidthM added in v1.0.16

func (w *Text) InsertWidthM() string

InsertWidthM is like InsertWidth but panics on error.

func (*Text) MaxUndo added in v1.0.14

func (w *Text) MaxUndo() (string, error)

MaxUndo reports the maximum number of compound undo actions on the undo stack. A zero or a negative value imply an unlimited undo stack.

func (*Text) MaxUndoM added in v1.0.16

func (w *Text) MaxUndoM() string

MaxUndoM is like MaxUndo but panics on error.

func (*Text) PadX added in v1.0.14

func (w *Text) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Text) PadXM added in v1.0.16

func (w *Text) PadXM() string

PadXM is like PadX but panics on error.

func (*Text) PadY added in v1.0.14

func (w *Text) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Text) PadYM added in v1.0.16

func (w *Text) PadYM() string

PadYM is like PadY but panics on error.

func (*Text) Relief added in v1.0.14

func (w *Text) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Text) ReliefM added in v1.0.16

func (w *Text) ReliefM() string

ReliefM is like Relief but panics on error.

func (*Text) SelectBackground added in v1.0.14

func (w *Text) SelectBackground() (string, error)

SelectBackground reports the background color to use when displaying selected items.

func (*Text) SelectBackgroundM added in v1.0.16

func (w *Text) SelectBackgroundM() string

SelectBackgroundM is like SelectBackground but panics on error.

func (*Text) SelectBorderWidth added in v1.0.17

func (w *Text) SelectBorderWidth() (string, error)

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Text) SelectBorderWidthM added in v1.0.17

func (w *Text) SelectBorderWidthM() string

SelectBorderWidthM is like SelectBorderWidth but panics on error.

func (*Text) SelectForeground added in v1.0.14

func (w *Text) SelectForeground() (string, error)

SelectForeground reports the foreground color to use when displaying selected items.

func (*Text) SelectForegroundM added in v1.0.16

func (w *Text) SelectForegroundM() string

SelectForegroundM is like SelectForeground but panics on error.

func (*Text) SetAutoSeparators added in v1.0.14

func (w *Text) SetAutoSeparators(value string) error

AutoSeparators reports a boolean that says whether separators are automatically inserted in the undo stack. Only meaningful when the \fB-undo\fR option is true.

func (*Text) SetAutoSeparatorsM added in v1.0.16

func (w *Text) SetAutoSeparatorsM(value string) *Text

SetAutoSeparatorsM is like AutoSeparators but panics on error

func (*Text) SetBackground added in v1.0.14

func (w *Text) SetBackground(value string) error

Background reports the normal background color to use when displaying the widget.

func (*Text) SetBackgroundM added in v1.0.16

func (w *Text) SetBackgroundM(value string) *Text

SetBackgroundM is like Background but panics on error

func (*Text) SetBlockCursor added in v1.0.14

func (w *Text) SetBlockCursor(value string) error

BlockCursor reports a boolean that says whether the blinking insertion cursor should be drawn as a character-sized rectangular block. If false (the default) a thin vertical line is used for the insertion cursor.

func (*Text) SetBlockCursorM added in v1.0.16

func (w *Text) SetBlockCursorM(value string) *Text

SetBlockCursorM is like BlockCursor but panics on error

func (*Text) SetBorderWidth added in v1.0.14

func (w *Text) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*Text) SetBorderWidthM added in v1.0.16

func (w *Text) SetBorderWidthM(value string) *Text

SetBorderWidthM is like BorderWidth but panics on error

func (*Text) SetCursor added in v1.0.14

func (w *Text) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*Text) SetCursorM added in v1.0.16

func (w *Text) SetCursorM(value string) *Text

SetCursorM is like Cursor but panics on error

func (*Text) SetEndLine added in v1.0.14

func (w *Text) SetEndLine(value string) error

EndLine reports an integer line index representing the line of the underlying textual data store that should be just after the last line contained in the widget. This allows a text widget to reflect only a portion of a larger piece of text. Instead of an integer, the empty string can be provided to this configuration option, which will configure the widget to end at the very last line in the textual data store.

func (*Text) SetEndLineM added in v1.0.16

func (w *Text) SetEndLineM(value string) *Text

SetEndLineM is like EndLine but panics on error

func (*Text) SetExportSelection added in v1.0.14

func (w *Text) SetExportSelection(value bool) error

ExportSelection 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 \fBTcl_GetBoolean\fR, such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. 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.

func (*Text) SetExportSelectionM added in v1.0.16

func (w *Text) SetExportSelectionM(value bool) *Text

ExportSelectionM is like ExportSelection but panics on error.

func (*Text) SetFont added in v1.0.14

func (w *Text) SetFont(value string) error

Font reports the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR.

func (*Text) SetFontM added in v1.0.16

func (w *Text) SetFontM(value string) *Text

SetFontM is like Font but panics on error

func (*Text) SetForeground added in v1.0.14

func (w *Text) SetForeground(value string) error

Foreground reports the normal foreground color to use when displaying the widget.

func (*Text) SetForegroundM added in v1.0.16

func (w *Text) SetForegroundM(value string) *Text

SetForegroundM is like Foreground but panics on error

func (*Text) SetGrid added in v1.0.14

func (w *Text) SetGrid() (string, error)

SetGrid reports a boolean value that determines whether this widget controls the resizing grid for its top-level window. This option is typically used in text widgets, where the information in the widget has a natural size (the size of a character) and it makes sense for the window's dimensions to be integral numbers of these units. These natural window sizes form a grid. If the \fB-setgrid\fR option is set to true then the widget will communicate with the window manager so that when the user interactively resizes the top-level window that contains the widget, the dimensions of the window will be displayed to the user in grid units and the window size will be constrained to integral numbers of grid units. See the section \fBGRIDDED GEOMETRY MANAGEMENT\fR in the \fBwm\fR manual entry for more details.

func (*Text) SetGridM added in v1.0.16

func (w *Text) SetGridM() string

SetGridM is like SetGrid but panics on error.

func (*Text) SetHeight added in v1.0.14

func (w *Text) SetHeight(value string) error

Height reports the desired height for the window, in units of characters in the font given by the \fB-font\fR option. Must be at least one.

func (*Text) SetHeightM added in v1.0.16

func (w *Text) SetHeightM(value string) *Text

SetHeightM is like Height but panics on error

func (*Text) SetHighlightBackground added in v1.0.14

func (w *Text) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*Text) SetHighlightBackgroundM added in v1.0.16

func (w *Text) SetHighlightBackgroundM(value string) *Text

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*Text) SetHighlightColor added in v1.0.14

func (w *Text) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*Text) SetHighlightColorM added in v1.0.16

func (w *Text) SetHighlightColorM(value string) *Text

SetHighlightColorM is like HighlightColor but panics on error

func (*Text) SetHighlightThickness added in v1.0.14

func (w *Text) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*Text) SetHighlightThicknessM added in v1.0.16

func (w *Text) SetHighlightThicknessM(value string) *Text

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*Text) SetInactiveSelectBackground added in v1.0.14

func (w *Text) SetInactiveSelectBackground(value string) error

InactiveSelectBackground reports the colour to use for the selection (the \fBsel\fR tag) when the window does not have the input focus. If empty, \fB{}\fR, then no selection is shown when the window does not have the focus.

func (*Text) SetInactiveSelectBackgroundM added in v1.0.16

func (w *Text) SetInactiveSelectBackgroundM(value string) *Text

SetInactiveSelectBackgroundM is like InactiveSelectBackground but panics on error

func (*Text) SetInsertBackground added in v1.0.14

func (w *Text) SetInsertBackground(value string) error

InsertBackground reports 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).

func (*Text) SetInsertBackgroundM added in v1.0.16

func (w *Text) SetInsertBackgroundM(value string) *Text

SetInsertBackgroundM is like InsertBackground but panics on error

func (*Text) SetInsertBorderWidth added in v1.0.14

func (w *Text) SetInsertBorderWidth(value string) error

InsertBorderWidth reports 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 \fBTk_GetPixels\fR.

func (*Text) SetInsertBorderWidthM added in v1.0.16

func (w *Text) SetInsertBorderWidthM(value string) *Text

SetInsertBorderWidthM is like InsertBorderWidth but panics on error

func (*Text) SetInsertOffTime added in v1.0.14

func (w *Text) SetInsertOffTime(value int) error

InsertOffTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(off) in each blink cycle. If this option is zero then the cursor does not blink: it is on all the time.

func (*Text) SetInsertOffTimeM added in v1.0.16

func (w *Text) SetInsertOffTimeM(value int) *Text

InsertOffTimeM is like InsertOffTime but panics on error.

func (*Text) SetInsertOnTime added in v1.0.14

func (w *Text) SetInsertOnTime(value int) error

InsertOnTime specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain TODO .QW(on) in each blink cycle.

func (*Text) SetInsertOnTimeM added in v1.0.16

func (w *Text) SetInsertOnTimeM(value int) *Text

InsertOnTimeM is like InsertOnTime but panics on error.

func (*Text) SetInsertUnfocussed added in v1.0.14

func (w *Text) SetInsertUnfocussed(value string) error

InsertUnfocussed reports how to display the insertion cursor when the widget does not have the focus. Must be \fBnone\fR (the default) which means to not display the cursor, \fBhollow\fR which means to display a hollow box, or \fBsolid\fR which means to display a solid box. Note that \fBhollow\fR and \fBsolid\fR will appear very similar when the \fB-blockcursor\fR option is false.

func (*Text) SetInsertUnfocussedM added in v1.0.16

func (w *Text) SetInsertUnfocussedM(value string) *Text

SetInsertUnfocussedM is like InsertUnfocussed but panics on error

func (*Text) SetInsertWidth added in v1.0.14

func (w *Text) SetInsertWidth(value string) error

InsertWidth reports a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB-insertborderwidth\fR option), the border will be drawn inside the width specified by the \fB-insertwidth\fR option.

func (*Text) SetInsertWidthM added in v1.0.16

func (w *Text) SetInsertWidthM(value string) *Text

SetInsertWidthM is like InsertWidth but panics on error

func (*Text) SetMaxUndo added in v1.0.14

func (w *Text) SetMaxUndo(value string) error

MaxUndo reports the maximum number of compound undo actions on the undo stack. A zero or a negative value imply an unlimited undo stack.

func (*Text) SetMaxUndoM added in v1.0.16

func (w *Text) SetMaxUndoM(value string) *Text

SetMaxUndoM is like MaxUndo but panics on error

func (*Text) SetPadX added in v1.0.14

func (w *Text) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*Text) SetPadXM added in v1.0.16

func (w *Text) SetPadXM(value string) *Text

SetPadXM is like PadX but panics on error

func (*Text) SetPadY added in v1.0.14

func (w *Text) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*Text) SetPadYM added in v1.0.16

func (w *Text) SetPadYM(value string) *Text

SetPadYM is like PadY but panics on error

func (*Text) SetRelief added in v1.0.14

func (w *Text) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*Text) SetReliefM added in v1.0.16

func (w *Text) SetReliefM(value string) *Text

SetReliefM is like Relief but panics on error

func (*Text) SetSelectBackground added in v1.0.14

func (w *Text) SetSelectBackground(value string) error

SelectBackground reports the background color to use when displaying selected items.

func (*Text) SetSelectBackgroundM added in v1.0.16

func (w *Text) SetSelectBackgroundM(value string) *Text

SetSelectBackgroundM is like SelectBackground but panics on error

func (*Text) SetSelectBorderWidth added in v1.0.17

func (w *Text) SetSelectBorderWidth(value string) error

SelectBorderWidth reports a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.

func (*Text) SetSelectBorderWidthM added in v1.0.17

func (w *Text) SetSelectBorderWidthM(value string) *Text

SetSelectBorderWidthM is like SelectBorderWidth but panics on error

func (*Text) SetSelectForeground added in v1.0.14

func (w *Text) SetSelectForeground(value string) error

SelectForeground reports the foreground color to use when displaying selected items.

func (*Text) SetSelectForegroundM added in v1.0.16

func (w *Text) SetSelectForegroundM(value string) *Text

SetSelectForegroundM is like SelectForeground but panics on error

func (*Text) SetSetGrid added in v1.0.14

func (w *Text) SetSetGrid(value string) error

SetGrid reports a boolean value that determines whether this widget controls the resizing grid for its top-level window. This option is typically used in text widgets, where the information in the widget has a natural size (the size of a character) and it makes sense for the window's dimensions to be integral numbers of these units. These natural window sizes form a grid. If the \fB-setgrid\fR option is set to true then the widget will communicate with the window manager so that when the user interactively resizes the top-level window that contains the widget, the dimensions of the window will be displayed to the user in grid units and the window size will be constrained to integral numbers of grid units. See the section \fBGRIDDED GEOMETRY MANAGEMENT\fR in the \fBwm\fR manual entry for more details.

func (*Text) SetSetGridM added in v1.0.16

func (w *Text) SetSetGridM(value string) *Text

SetSetGridM is like SetGrid but panics on error

func (*Text) SetSpacing1 added in v1.0.14

func (w *Text) SetSpacing1(value string) error

Requests additional space above each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the first line on the display. This option may be overridden with \fB-spacing1\fR options in tags.

func (*Text) SetSpacing1M added in v1.0.16

func (w *Text) SetSpacing1M(value string) *Text

SetSpacing1M is like Spacing1 but panics on error

func (*Text) SetSpacing2 added in v1.0.14

func (w *Text) SetSpacing2(value string) error

For lines that wrap (so that they cover more than one line on the display) this option specifies additional space to provide between the display lines that represent a single line of text. The value may have any of the standard forms for screen distances. This option may be overridden with \fB-spacing2\fR options in tags.

func (*Text) SetSpacing2M added in v1.0.16

func (w *Text) SetSpacing2M(value string) *Text

SetSpacing2M is like Spacing2 but panics on error

func (*Text) SetSpacing3 added in v1.0.14

func (w *Text) SetSpacing3(value string) error

Requests additional space below each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the last line on the display. This option may be overridden with \fB-spacing3\fR options in tags.

func (*Text) SetSpacing3M added in v1.0.16

func (w *Text) SetSpacing3M(value string) *Text

SetSpacing3M is like Spacing3 but panics on error

func (*Text) SetStartLine added in v1.0.14

func (w *Text) SetStartLine(value string) error

StartLine reports an integer line index representing the first line of the underlying textual data store that should be contained in the widget. This allows a text widget to reflect only a portion of a larger piece of text. Instead of an integer, the empty string can be provided to this configuration option, which will configure the widget to start at the very first line in the textual data store.

func (*Text) SetStartLineM added in v1.0.16

func (w *Text) SetStartLineM(value string) *Text

SetStartLineM is like StartLine but panics on error

func (*Text) SetState added in v1.0.14

func (w *Text) SetState(value string) error

State reports one of two states for the text: \fBnormal\fR or \fBdisabled\fR. If the text is disabled then characters may not be inserted or deleted and no insertion cursor will be displayed, even if the input focus is in the widget.

func (*Text) SetStateM added in v1.0.16

func (w *Text) SetStateM(value string) *Text

SetStateM is like State but panics on error

func (*Text) SetTabStyle added in v1.0.14

func (w *Text) SetTabStyle(value string) error

TabStyle reports how to interpret the relationship between tab stops on a line and tabs in the text of that line. The value must be \fBtabular\fR (the default) or \fBwordprocessor\fR. Note that tabs are interpreted as they are encountered in the text. If the tab style is \fBtabular\fR then the \fIn\fR'th tab character in the line's text will be associated with the \fIn\fR'th tab stop defined for that line. If the tab character's x coordinate falls to the right of the \fIn\fR'th tab stop, then a gap of a single space will be inserted as a fallback. If the tab style is \fBwordprocessor\fR then any tab character being laid out will use (and be defined by) the first tab stop to the right of the preceding characters already laid out on that line. The value of the \fB-tabstyle\fR option may be overridden by \fB-tabstyle\fR options in tags.

func (*Text) SetTabStyleM added in v1.0.16

func (w *Text) SetTabStyleM(value string) *Text

SetTabStyleM is like TabStyle but panics on error

func (*Text) SetTabs added in v1.0.14

func (w *Text) SetTabs(value string) error

Tabs reports a set of tab stops for the window. The option's value consists of a list of screen distances giving the positions of the tab stops, each of which is a distance relative to the left edge of the widget (excluding borders, padding, etc). Each position may optionally be followed in the next list element by one of the keywords \fBleft\fR, \fBright\fR, \fBcenter\fR, or \fBnumeric\fR, which specifies how to justify text relative to the tab stop. \fBLeft\fR is the default; it causes the text following the tab character to be positioned with its left edge at the tab position. \fBRight\fR means that the right edge of the text following the tab character is positioned at the tab position, and \fBcenter\fR means that the text is centered at the tab position. \fBNumeric\fR means that the decimal point in the text is positioned at the tab position; if there is no decimal point then the least significant digit of the number is positioned just to the left of the tab position; if there is no number in the text then the text is right-justified at the tab position. For example, TODO .QW("\fB-tabs {2c left 4c 6c center}\fR") creates three tab stops at two-centimeter intervals; the first two use left justification and the third uses center justification.

func (*Text) SetTabsM added in v1.0.16

func (w *Text) SetTabsM(value string) *Text

SetTabsM is like Tabs but panics on error

func (*Text) SetTakeFocus added in v1.0.14

func (w *Text) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Text) SetTakeFocusM added in v1.0.16

func (w *Text) SetTakeFocusM(value string) *Text

SetTakeFocusM is like TakeFocus but panics on error

func (*Text) SetUndo added in v1.0.14

func (w *Text) SetUndo(value string) error

Undo reports a boolean that says whether the undo mechanism is active or not.

func (*Text) SetUndoM added in v1.0.16

func (w *Text) SetUndoM(value string) *Text

SetUndoM is like Undo but panics on error

func (*Text) SetWidth added in v1.0.14

func (w *Text) SetWidth(value string) error

Width reports the desired width for the window in units of characters in the font given by the \fB-font\fR option. If the font does not have a uniform width then the width of the character TODO .QW(0) is used in translating from character units to screen units.

func (*Text) SetWidthM added in v1.0.16

func (w *Text) SetWidthM(value string) *Text

SetWidthM is like Width but panics on error

func (*Text) SetWrap added in v1.0.14

func (w *Text) SetWrap(value string) error

Wrap reports how to handle lines in the text that are too long to be displayed in a single line of the text's window. The value must be \fBnone\fR or \fBchar\fR or \fBword\fR. A wrap mode of \fBnone\fR means that each line of text appears as exactly one line on the screen; extra characters that do not fit on the screen are not displayed. In the other modes each line of text will be broken up into several screen lines if necessary to keep all the characters visible. In \fBchar\fR mode a screen line break may occur after any character; in \fBword\fR mode a line break will only be made at word boundaries.

func (*Text) SetWrapM added in v1.0.16

func (w *Text) SetWrapM(value string) *Text

SetWrapM is like Wrap but panics on error

func (*Text) SetXScrollCommand added in v1.0.14

func (w *Text) SetXScrollCommand(value Command) error

XScrollCommand specifies the prefix for a command used to communicate with horizontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fB-xscrollcommand\fR option consists of the path name of a scrollbar widget followed by TODO .QW(set ,) e.g. TODO .QW(".x.scrollbar set" :) this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

func (*Text) SetXScrollCommandM added in v1.0.16

func (w *Text) SetXScrollCommandM(value Command) *Text

SetXScrollCommandM is like XScrollCommand but panics on error

func (*Text) SetYScrollCommand added in v1.0.17

func (w *Text) SetYScrollCommand(value Command) error

YScrollCommand specifies the prefix for a command used to communicate with vertical scrollbars. This option is treated in the same way as the \fB-xscrollcommand\fR option, except that it is used for vertical scrollbars and is provided by widgets that support vertical scrolling. See the description of \fB-xscrollcommand\fR for details on how this option is used.

func (*Text) SetYScrollCommandM added in v1.0.17

func (w *Text) SetYScrollCommandM(value Command) *Text

SetYScrollCommandM is like YScrollCommand but panics on error

func (*Text) Spacing1 added in v1.0.14

func (w *Text) Spacing1() (string, error)

Requests additional space above each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the first line on the display. This option may be overridden with \fB-spacing1\fR options in tags.

func (*Text) Spacing1M added in v1.0.16

func (w *Text) Spacing1M() string

Spacing1M is like Spacing1 but panics on error.

func (*Text) Spacing2 added in v1.0.14

func (w *Text) Spacing2() (string, error)

For lines that wrap (so that they cover more than one line on the display) this option specifies additional space to provide between the display lines that represent a single line of text. The value may have any of the standard forms for screen distances. This option may be overridden with \fB-spacing2\fR options in tags.

func (*Text) Spacing2M added in v1.0.16

func (w *Text) Spacing2M() string

Spacing2M is like Spacing2 but panics on error.

func (*Text) Spacing3 added in v1.0.14

func (w *Text) Spacing3() (string, error)

Requests additional space below each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the last line on the display. This option may be overridden with \fB-spacing3\fR options in tags.

func (*Text) Spacing3M added in v1.0.16

func (w *Text) Spacing3M() string

Spacing3M is like Spacing3 but panics on error.

func (*Text) StartLine added in v1.0.14

func (w *Text) StartLine() (string, error)

StartLine reports an integer line index representing the first line of the underlying textual data store that should be contained in the widget. This allows a text widget to reflect only a portion of a larger piece of text. Instead of an integer, the empty string can be provided to this configuration option, which will configure the widget to start at the very first line in the textual data store.

func (*Text) StartLineM added in v1.0.16

func (w *Text) StartLineM() string

StartLineM is like StartLine but panics on error.

func (*Text) State added in v1.0.14

func (w *Text) State() (string, error)

State reports one of two states for the text: \fBnormal\fR or \fBdisabled\fR. If the text is disabled then characters may not be inserted or deleted and no insertion cursor will be displayed, even if the input focus is in the widget.

func (*Text) StateM added in v1.0.16

func (w *Text) StateM() string

StateM is like State but panics on error.

func (*Text) TabStyle added in v1.0.14

func (w *Text) TabStyle() (string, error)

TabStyle reports how to interpret the relationship between tab stops on a line and tabs in the text of that line. The value must be \fBtabular\fR (the default) or \fBwordprocessor\fR. Note that tabs are interpreted as they are encountered in the text. If the tab style is \fBtabular\fR then the \fIn\fR'th tab character in the line's text will be associated with the \fIn\fR'th tab stop defined for that line. If the tab character's x coordinate falls to the right of the \fIn\fR'th tab stop, then a gap of a single space will be inserted as a fallback. If the tab style is \fBwordprocessor\fR then any tab character being laid out will use (and be defined by) the first tab stop to the right of the preceding characters already laid out on that line. The value of the \fB-tabstyle\fR option may be overridden by \fB-tabstyle\fR options in tags.

func (*Text) TabStyleM added in v1.0.16

func (w *Text) TabStyleM() string

TabStyleM is like TabStyle but panics on error.

func (*Text) Tabs added in v1.0.14

func (w *Text) Tabs() (string, error)

Tabs reports a set of tab stops for the window. The option's value consists of a list of screen distances giving the positions of the tab stops, each of which is a distance relative to the left edge of the widget (excluding borders, padding, etc). Each position may optionally be followed in the next list element by one of the keywords \fBleft\fR, \fBright\fR, \fBcenter\fR, or \fBnumeric\fR, which specifies how to justify text relative to the tab stop. \fBLeft\fR is the default; it causes the text following the tab character to be positioned with its left edge at the tab position. \fBRight\fR means that the right edge of the text following the tab character is positioned at the tab position, and \fBcenter\fR means that the text is centered at the tab position. \fBNumeric\fR means that the decimal point in the text is positioned at the tab position; if there is no decimal point then the least significant digit of the number is positioned just to the left of the tab position; if there is no number in the text then the text is right-justified at the tab position. For example, TODO .QW("\fB-tabs {2c left 4c 6c center}\fR") creates three tab stops at two-centimeter intervals; the first two use left justification and the third uses center justification.

func (*Text) TabsM added in v1.0.16

func (w *Text) TabsM() string

TabsM is like Tabs but panics on error.

func (*Text) TakeFocus added in v1.0.14

func (w *Text) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*Text) TakeFocusM added in v1.0.16

func (w *Text) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*Text) Undo added in v1.0.14

func (w *Text) Undo() (string, error)

Undo reports a boolean that says whether the undo mechanism is active or not.

func (*Text) UndoM added in v1.0.16

func (w *Text) UndoM() string

UndoM is like Undo but panics on error.

func (*Text) Width added in v1.0.14

func (w *Text) Width() (string, error)

Width reports the desired width for the window in units of characters in the font given by the \fB-font\fR option. If the font does not have a uniform width then the width of the character TODO .QW(0) is used in translating from character units to screen units.

func (*Text) WidthM added in v1.0.16

func (w *Text) WidthM() string

WidthM is like Width but panics on error.

func (*Text) Wrap added in v1.0.14

func (w *Text) Wrap() (string, error)

Wrap reports how to handle lines in the text that are too long to be displayed in a single line of the text's window. The value must be \fBnone\fR or \fBchar\fR or \fBword\fR. A wrap mode of \fBnone\fR means that each line of text appears as exactly one line on the screen; extra characters that do not fit on the screen are not displayed. In the other modes each line of text will be broken up into several screen lines if necessary to keep all the characters visible. In \fBchar\fR mode a screen line break may occur after any character; in \fBword\fR mode a line break will only be made at word boundaries.

func (*Text) WrapM added in v1.0.16

func (w *Text) WrapM() string

WrapM is like Wrap but panics on error.

type TopLevel added in v1.0.14

type TopLevel struct {
	Window
}

TopLevel represents the Tk toplevel widget.

func (*TopLevel) Background added in v1.0.14

func (w *TopLevel) Background() (string, error)

This option is the same as the standard \fB-background\fR 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.

func (*TopLevel) BackgroundM added in v1.0.16

func (w *TopLevel) BackgroundM() string

BackgroundM is like Background but panics on error.

func (*TopLevel) BorderWidth added in v1.0.14

func (w *TopLevel) BorderWidth() (string, error)

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*TopLevel) BorderWidthM added in v1.0.16

func (w *TopLevel) BorderWidthM() string

BorderWidthM is like BorderWidth but panics on error.

func (*TopLevel) Class added in v1.0.14

func (w *TopLevel) Class() (string, error)

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

func (*TopLevel) ClassM added in v1.0.16

func (w *TopLevel) ClassM() string

ClassM is like Class but panics on error.

func (*TopLevel) Colormap added in v1.0.14

func (w *TopLevel) Colormap() (string, error)

Colormap reports a colormap to use for the window. The value may be either \fBnew\fR, 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 \fIpathName\fR), in which case the new window will use the colormap from the specified window. If the \fB-colormap\fR option is not specified, the new window uses the default colormap of its screen. This option may not be changed with the \fBconfigure\fR widget command.

func (*TopLevel) ColormapM added in v1.0.16

func (w *TopLevel) ColormapM() string

ColormapM is like Colormap but panics on error.

func (*TopLevel) Container added in v1.0.14

func (w *TopLevel) Container() (string, error)

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 \fB-use\fR 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 \fBconfigure\fR widget command.

func (*TopLevel) ContainerM added in v1.0.16

func (w *TopLevel) ContainerM() string

ContainerM is like Container but panics on error.

func (*TopLevel) Cursor added in v1.0.14

func (w *TopLevel) Cursor() (string, error)

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TopLevel) CursorM added in v1.0.16

func (w *TopLevel) CursorM() string

CursorM is like Cursor but panics on error.

func (*TopLevel) Height added in v1.0.14

func (w *TopLevel) Height() (string, error)

Height reports the desired height for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*TopLevel) HeightM added in v1.0.16

func (w *TopLevel) HeightM() string

HeightM is like Height but panics on error.

func (*TopLevel) HighlightBackground added in v1.0.14

func (w *TopLevel) HighlightBackground() (string, error)

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*TopLevel) HighlightBackgroundM added in v1.0.16

func (w *TopLevel) HighlightBackgroundM() string

HighlightBackgroundM is like HighlightBackground but panics on error.

func (*TopLevel) HighlightColor added in v1.0.14

func (w *TopLevel) HighlightColor() (string, error)

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*TopLevel) HighlightColorM added in v1.0.16

func (w *TopLevel) HighlightColorM() string

HighlightColorM is like HighlightColor but panics on error.

func (*TopLevel) HighlightThickness added in v1.0.14

func (w *TopLevel) HighlightThickness() (string, error)

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*TopLevel) HighlightThicknessM added in v1.0.16

func (w *TopLevel) HighlightThicknessM() string

HighlightThicknessM is like HighlightThickness but panics on error.

func (*TopLevel) Menu added in v1.0.14

func (w *TopLevel) Menu() (string, error)

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

func (*TopLevel) MenuM added in v1.0.16

func (w *TopLevel) MenuM() string

MenuM is like Menu but panics on error.

func (*TopLevel) PadX added in v1.0.14

func (w *TopLevel) PadX() (string, error)

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*TopLevel) PadXM added in v1.0.16

func (w *TopLevel) PadXM() string

PadXM is like PadX but panics on error.

func (*TopLevel) PadY added in v1.0.14

func (w *TopLevel) PadY() (string, error)

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*TopLevel) PadYM added in v1.0.16

func (w *TopLevel) PadYM() string

PadYM is like PadY but panics on error.

func (*TopLevel) Relief added in v1.0.14

func (w *TopLevel) Relief() (string, error)

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*TopLevel) ReliefM added in v1.0.16

func (w *TopLevel) ReliefM() string

ReliefM is like Relief but panics on error.

func (*TopLevel) Screen added in v1.0.14

func (w *TopLevel) Screen() (string, error)

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

func (*TopLevel) ScreenM added in v1.0.16

func (w *TopLevel) ScreenM() string

ScreenM is like Screen but panics on error.

func (*TopLevel) SetBackground added in v1.0.14

func (w *TopLevel) SetBackground(value string) error

This option is the same as the standard \fB-background\fR 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.

func (*TopLevel) SetBackgroundM added in v1.0.16

func (w *TopLevel) SetBackgroundM(value string) *TopLevel

SetBackgroundM is like Background but panics on error

func (*TopLevel) SetBorderWidth added in v1.0.14

func (w *TopLevel) SetBorderWidth(value string) error

BorderWidth reports 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 \fB-relief\fR 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 \fBTk_GetPixels\fR.

func (*TopLevel) SetBorderWidthM added in v1.0.16

func (w *TopLevel) SetBorderWidthM(value string) *TopLevel

SetBorderWidthM is like BorderWidth but panics on error

func (*TopLevel) SetColormap added in v1.0.14

func (w *TopLevel) SetColormap(value string) error

Colormap reports a colormap to use for the window. The value may be either \fBnew\fR, 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 \fIpathName\fR), in which case the new window will use the colormap from the specified window. If the \fB-colormap\fR option is not specified, the new window uses the default colormap of its screen. This option may not be changed with the \fBconfigure\fR widget command.

func (*TopLevel) SetColormapM added in v1.0.16

func (w *TopLevel) SetColormapM(value string) *TopLevel

SetColormapM is like Colormap but panics on error

func (*TopLevel) SetContainer added in v1.0.14

func (w *TopLevel) SetContainer(value string) error

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 \fB-use\fR 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 \fBconfigure\fR widget command.

func (*TopLevel) SetContainerM added in v1.0.16

func (w *TopLevel) SetContainerM(value string) *TopLevel

SetContainerM is like Container but panics on error

func (*TopLevel) SetCursor added in v1.0.14

func (w *TopLevel) SetCursor(value string) error

Cursor reports the mouse cursor to be used for the widget. The value may have any of the forms acceptable to \fBTk_GetCursor\fR. In addition, if an empty string is specified, it indicates that the widget should defer to its parent for cursor specification.

func (*TopLevel) SetCursorM added in v1.0.16

func (w *TopLevel) SetCursorM(value string) *TopLevel

SetCursorM is like Cursor but panics on error

func (*TopLevel) SetHeight added in v1.0.14

func (w *TopLevel) SetHeight(value string) error

Height reports the desired height for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*TopLevel) SetHeightM added in v1.0.16

func (w *TopLevel) SetHeightM(value string) *TopLevel

SetHeightM is like Height but panics on error

func (*TopLevel) SetHighlightBackground added in v1.0.14

func (w *TopLevel) SetHighlightBackground(value string) error

HighlightBackground reports the color to display in the traversal highlight region when the widget does not have the input focus.

func (*TopLevel) SetHighlightBackgroundM added in v1.0.16

func (w *TopLevel) SetHighlightBackgroundM(value string) *TopLevel

SetHighlightBackgroundM is like HighlightBackground but panics on error

func (*TopLevel) SetHighlightColor added in v1.0.14

func (w *TopLevel) SetHighlightColor(value string) error

HighlightColor reports the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

func (*TopLevel) SetHighlightColorM added in v1.0.16

func (w *TopLevel) SetHighlightColorM(value string) *TopLevel

SetHighlightColorM is like HighlightColor but panics on error

func (*TopLevel) SetHighlightThickness added in v1.0.14

func (w *TopLevel) SetHighlightThickness(value string) error

HighlightThickness reports 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 \fBTk_GetPixels\fR. If the value is zero, no focus highlight is drawn around the widget.

func (*TopLevel) SetHighlightThicknessM added in v1.0.16

func (w *TopLevel) SetHighlightThicknessM(value string) *TopLevel

SetHighlightThicknessM is like HighlightThickness but panics on error

func (*TopLevel) SetMenu added in v1.0.14

func (w *TopLevel) SetMenu(value string) error

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

func (*TopLevel) SetMenuM added in v1.0.16

func (w *TopLevel) SetMenuM(value string) *TopLevel

SetMenuM is like Menu but panics on error

func (*TopLevel) SetPadX added in v1.0.14

func (w *TopLevel) SetPadX(value string) error

PadX reports 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 \fBTk_GetPixels\fR. 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.

func (*TopLevel) SetPadXM added in v1.0.16

func (w *TopLevel) SetPadXM(value string) *TopLevel

SetPadXM is like PadX but panics on error

func (*TopLevel) SetPadY added in v1.0.14

func (w *TopLevel) SetPadY(value string) error

PadY reports 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 \fBTk_GetPixels\fR. 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.

func (*TopLevel) SetPadYM added in v1.0.16

func (w *TopLevel) SetPadYM(value string) *TopLevel

SetPadYM is like PadY but panics on error

func (*TopLevel) SetRelief added in v1.0.14

func (w *TopLevel) SetRelief(value string) error

Relief reports the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. The value indicates how the interior of the widget should appear relative to its exterior; for example, \fBraised\fR means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

func (*TopLevel) SetReliefM added in v1.0.16

func (w *TopLevel) SetReliefM(value string) *TopLevel

SetReliefM is like Relief but panics on error

func (*TopLevel) SetScreen added in v1.0.14

func (w *TopLevel) SetScreen(value string) error

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

func (*TopLevel) SetScreenM added in v1.0.16

func (w *TopLevel) SetScreenM(value string) *TopLevel

SetScreenM is like Screen but panics on error

func (*TopLevel) SetTakeFocus added in v1.0.14

func (w *TopLevel) SetTakeFocus(value string) error

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TopLevel) SetTakeFocusM added in v1.0.16

func (w *TopLevel) SetTakeFocusM(value string) *TopLevel

SetTakeFocusM is like TakeFocus but panics on error

func (*TopLevel) SetUse added in v1.0.14

func (w *TopLevel) SetUse(value string) error

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

func (*TopLevel) SetUseM added in v1.0.16

func (w *TopLevel) SetUseM(value string) *TopLevel

SetUseM is like Use but panics on error

func (*TopLevel) SetVisual added in v1.0.14

func (w *TopLevel) SetVisual(value string) error

Visual reports visual information for the new window in any of the forms accepted by \fBTk_GetVisual\fR. If this option is not specified, the new window will use the default visual for its screen. The \fB-visual\fR option may not be modified with the \fBconfigure\fR widget command.

func (*TopLevel) SetVisualM added in v1.0.16

func (w *TopLevel) SetVisualM(value string) *TopLevel

SetVisualM is like Visual but panics on error

func (*TopLevel) SetWidth added in v1.0.14

func (w *TopLevel) SetWidth(value string) error

Width reports the desired width for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*TopLevel) SetWidthM added in v1.0.16

func (w *TopLevel) SetWidthM(value string) *TopLevel

SetWidthM is like Width but panics on error

func (*TopLevel) TakeFocus added in v1.0.14

func (w *TopLevel) TakeFocus() (string, error)

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the \fB-takefocus\fR option. A value of \fB0\fR means that the window should be skipped entirely during keyboard traversal. \fB1\fR means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return \fB0\fR, \fB1\fR, or an empty string: a \fB0\fR or \fB1\fR value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

func (*TopLevel) TakeFocusM added in v1.0.16

func (w *TopLevel) TakeFocusM() string

TakeFocusM is like TakeFocus but panics on error.

func (*TopLevel) Use added in v1.0.14

func (w *TopLevel) Use() (string, error)

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

func (*TopLevel) UseM added in v1.0.16

func (w *TopLevel) UseM() string

UseM is like Use but panics on error.

func (*TopLevel) Visual added in v1.0.14

func (w *TopLevel) Visual() (string, error)

Visual reports visual information for the new window in any of the forms accepted by \fBTk_GetVisual\fR. If this option is not specified, the new window will use the default visual for its screen. The \fB-visual\fR option may not be modified with the \fBconfigure\fR widget command.

func (*TopLevel) VisualM added in v1.0.16

func (w *TopLevel) VisualM() string

VisualM is like Visual but panics on error.

func (*TopLevel) Width added in v1.0.14

func (w *TopLevel) Width() (string, error)

Width reports the desired width for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all.

func (*TopLevel) WidthM added in v1.0.16

func (w *TopLevel) WidthM() string

WidthM is like Width but panics on error.

type Widget added in v1.0.13

type Widget interface {
	Win() *Window
}

Widget represents any GUI element.

type Window added in v1.0.15

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

Window is the base of all GUI elements.

func (*Window) NewButton added in v1.0.15

func (w *Window) NewButton() (r *Button, err error)

NewButton returns a new Button as a child of w or an error, if any.

func (*Window) NewButtonM added in v1.0.16

func (w *Window) NewButtonM() *Button

NewButtonM is like NewButton but panics on error.

func (*Window) NewCanvas added in v1.0.15

func (w *Window) NewCanvas() (r *Canvas, err error)

NewCanvas returns a new Canvas as a child of w or an error, if any.

func (*Window) NewCanvasM added in v1.0.16

func (w *Window) NewCanvasM() *Canvas

NewCanvasM is like NewCanvas but panics on error.

func (*Window) NewCheckButton added in v1.0.15

func (w *Window) NewCheckButton() (r *CheckButton, err error)

NewCheckButton returns a new CheckButton as a child of w or an error, if any.

func (*Window) NewCheckButtonM added in v1.0.16

func (w *Window) NewCheckButtonM() *CheckButton

NewCheckButtonM is like NewCheckButton but panics on error.

func (*Window) NewEntry added in v1.0.15

func (w *Window) NewEntry() (r *Entry, err error)

NewEntry returns a new Entry as a child of w or an error, if any.

func (*Window) NewEntryM added in v1.0.16

func (w *Window) NewEntryM() *Entry

NewEntryM is like NewEntry but panics on error.

func (*Window) NewFrame added in v1.0.15

func (w *Window) NewFrame() (r *Frame, err error)

NewFrame returns a new Frame as a child of w or an error, if any.

func (*Window) NewFrameM added in v1.0.16

func (w *Window) NewFrameM() *Frame

NewFrameM is like NewFrame but panics on error.

func (*Window) NewLabel added in v1.0.15

func (w *Window) NewLabel() (r *Label, err error)

NewLabel returns a new Label as a child of w or an error, if any.

func (*Window) NewLabelFrame added in v1.0.15

func (w *Window) NewLabelFrame() (r *LabelFrame, err error)

NewLabelFrame returns a new LabelFrame as a child of w or an error, if any.

func (*Window) NewLabelFrameM added in v1.0.16

func (w *Window) NewLabelFrameM() *LabelFrame

NewLabelFrameM is like NewLabelFrame but panics on error.

func (*Window) NewLabelM added in v1.0.16

func (w *Window) NewLabelM() *Label

NewLabelM is like NewLabel but panics on error.

func (*Window) NewListBox added in v1.0.15

func (w *Window) NewListBox() (r *ListBox, err error)

NewListBox returns a new ListBox as a child of w or an error, if any.

func (*Window) NewListBoxM added in v1.0.16

func (w *Window) NewListBoxM() *ListBox

NewListBoxM is like NewListBox but panics on error.

func (*Window) NewMenu added in v1.0.15

func (w *Window) NewMenu() (r *Menu, err error)

NewMenu returns a new Menu as a child of w or an error, if any.

func (*Window) NewMenuButton added in v1.0.15

func (w *Window) NewMenuButton() (r *MenuButton, err error)

NewMenuButton returns a new MenuButton as a child of w or an error, if any.

func (*Window) NewMenuButtonM added in v1.0.16

func (w *Window) NewMenuButtonM() *MenuButton

NewMenuButtonM is like NewMenuButton but panics on error.

func (*Window) NewMenuM added in v1.0.16

func (w *Window) NewMenuM() *Menu

NewMenuM is like NewMenu but panics on error.

func (*Window) NewMessage added in v1.0.15

func (w *Window) NewMessage() (r *Message, err error)

NewMessage returns a new Message as a child of w or an error, if any.

func (*Window) NewMessageM added in v1.0.16

func (w *Window) NewMessageM() *Message

NewMessageM is like NewMessage but panics on error.

func (*Window) NewPanedWindow added in v1.0.15

func (w *Window) NewPanedWindow() (r *PanedWindow, err error)

NewPanedWindow returns a new PanedWindow as a child of w or an error, if any.

func (*Window) NewPanedWindowM added in v1.0.16

func (w *Window) NewPanedWindowM() *PanedWindow

NewPanedWindowM is like NewPanedWindow but panics on error.

func (*Window) NewRadioButton added in v1.0.15

func (w *Window) NewRadioButton() (r *RadioButton, err error)

NewRadioButton returns a new RadioButton as a child of w or an error, if any.

func (*Window) NewRadioButtonM added in v1.0.16

func (w *Window) NewRadioButtonM() *RadioButton

NewRadioButtonM is like NewRadioButton but panics on error.

func (*Window) NewScale added in v1.0.15

func (w *Window) NewScale() (r *Scale, err error)

NewScale returns a new Scale as a child of w or an error, if any.

func (*Window) NewScaleM added in v1.0.16

func (w *Window) NewScaleM() *Scale

NewScaleM is like NewScale but panics on error.

func (*Window) NewScrollbar added in v1.0.15

func (w *Window) NewScrollbar() (r *Scrollbar, err error)

NewScrollbar returns a new Scrollbar as a child of w or an error, if any.

func (*Window) NewScrollbarM added in v1.0.16

func (w *Window) NewScrollbarM() *Scrollbar

NewScrollbarM is like NewScrollbar but panics on error.

func (*Window) NewSpinBox added in v1.0.15

func (w *Window) NewSpinBox() (r *SpinBox, err error)

NewSpinBox returns a new SpinBox as a child of w or an error, if any.

func (*Window) NewSpinBoxM added in v1.0.16

func (w *Window) NewSpinBoxM() *SpinBox

NewSpinBoxM is like NewSpinBox but panics on error.

func (*Window) NewTButton added in v1.0.15

func (w *Window) NewTButton() (r *TButton, err error)

NewTButton returns a new TButton as a child of w or an error, if any.

func (*Window) NewTButtonM added in v1.0.16

func (w *Window) NewTButtonM() *TButton

NewTButtonM is like NewTButton but panics on error.

func (*Window) NewTCheckButton added in v1.0.15

func (w *Window) NewTCheckButton() (r *TCheckButton, err error)

NewTCheckButton returns a new TCheckButton as a child of w or an error, if any.

func (*Window) NewTCheckButtonM added in v1.0.16

func (w *Window) NewTCheckButtonM() *TCheckButton

NewTCheckButtonM is like NewTCheckButton but panics on error.

func (*Window) NewTComboBox added in v1.0.15

func (w *Window) NewTComboBox() (r *TComboBox, err error)

NewTComboBox returns a new TComboBox as a child of w or an error, if any.

func (*Window) NewTComboBoxM added in v1.0.16

func (w *Window) NewTComboBoxM() *TComboBox

NewTComboBoxM is like NewTComboBox but panics on error.

func (*Window) NewTEntry added in v1.0.15

func (w *Window) NewTEntry() (r *TEntry, err error)

NewTEntry returns a new TEntry as a child of w or an error, if any.

func (*Window) NewTEntryM added in v1.0.16

func (w *Window) NewTEntryM() *TEntry

NewTEntryM is like NewTEntry but panics on error.

func (*Window) NewTFrame added in v1.0.15

func (w *Window) NewTFrame() (r *TFrame, err error)

NewTFrame returns a new TFrame as a child of w or an error, if any.

func (*Window) NewTFrameM added in v1.0.16

func (w *Window) NewTFrameM() *TFrame

NewTFrameM is like NewTFrame but panics on error.

func (*Window) NewTLabel added in v1.0.15

func (w *Window) NewTLabel() (r *TLabel, err error)

NewTLabel returns a new TLabel as a child of w or an error, if any.

func (*Window) NewTLabelFrame added in v1.0.15

func (w *Window) NewTLabelFrame() (r *TLabelFrame, err error)

NewTLabelFrame returns a new TLabelFrame as a child of w or an error, if any.

func (*Window) NewTLabelFrameM added in v1.0.16

func (w *Window) NewTLabelFrameM() *TLabelFrame

NewTLabelFrameM is like NewTLabelFrame but panics on error.

func (*Window) NewTLabelM added in v1.0.16

func (w *Window) NewTLabelM() *TLabel

NewTLabelM is like NewTLabel but panics on error.

func (*Window) NewTMenuButton added in v1.0.15

func (w *Window) NewTMenuButton() (r *TMenuButton, err error)

NewTMenuButton returns a new TMenuButton as a child of w or an error, if any.

func (*Window) NewTMenuButtonM added in v1.0.16

func (w *Window) NewTMenuButtonM() *TMenuButton

NewTMenuButtonM is like NewTMenuButton but panics on error.

func (*Window) NewTNotebook added in v1.0.15

func (w *Window) NewTNotebook() (r *TNotebook, err error)

NewTNotebook returns a new TNotebook as a child of w or an error, if any.

func (*Window) NewTNotebookM added in v1.0.16

func (w *Window) NewTNotebookM() *TNotebook

NewTNotebookM is like NewTNotebook but panics on error.

func (*Window) NewTPanedWindow added in v1.0.15

func (w *Window) NewTPanedWindow() (r *TPanedWindow, err error)

NewTPanedWindow returns a new TPanedWindow as a child of w or an error, if any.

func (*Window) NewTPanedWindowM added in v1.0.16

func (w *Window) NewTPanedWindowM() *TPanedWindow

NewTPanedWindowM is like NewTPanedWindow but panics on error.

func (*Window) NewTProgressBar added in v1.0.15

func (w *Window) NewTProgressBar() (r *TProgressBar, err error)

NewTProgressBar returns a new TProgressBar as a child of w or an error, if any.

func (*Window) NewTProgressBarM added in v1.0.16

func (w *Window) NewTProgressBarM() *TProgressBar

NewTProgressBarM is like NewTProgressBar but panics on error.

func (*Window) NewTRadioButton added in v1.0.15

func (w *Window) NewTRadioButton() (r *TRadioButton, err error)

NewTRadioButton returns a new TRadioButton as a child of w or an error, if any.

func (*Window) NewTRadioButtonM added in v1.0.16

func (w *Window) NewTRadioButtonM() *TRadioButton

NewTRadioButtonM is like NewTRadioButton but panics on error.

func (*Window) NewTScale added in v1.0.15

func (w *Window) NewTScale() (r *TScale, err error)

NewTScale returns a new TScale as a child of w or an error, if any.

func (*Window) NewTScaleM added in v1.0.16

func (w *Window) NewTScaleM() *TScale

NewTScaleM is like NewTScale but panics on error.

func (*Window) NewTScrollbar added in v1.0.15

func (w *Window) NewTScrollbar() (r *TScrollbar, err error)

NewTScrollbar returns a new TScrollbar as a child of w or an error, if any.

func (*Window) NewTScrollbarM added in v1.0.16

func (w *Window) NewTScrollbarM() *TScrollbar

NewTScrollbarM is like NewTScrollbar but panics on error.

func (*Window) NewTSeparator added in v1.0.15

func (w *Window) NewTSeparator() (r *TSeparator, err error)

NewTSeparator returns a new TSeparator as a child of w or an error, if any.

func (*Window) NewTSeparatorM added in v1.0.16

func (w *Window) NewTSeparatorM() *TSeparator

NewTSeparatorM is like NewTSeparator but panics on error.

func (*Window) NewTSizeGrip added in v1.0.15

func (w *Window) NewTSizeGrip() (r *TSizeGrip, err error)

NewTSizeGrip returns a new TSizeGrip as a child of w or an error, if any.

func (*Window) NewTSizeGripM added in v1.0.16

func (w *Window) NewTSizeGripM() *TSizeGrip

NewTSizeGripM is like NewTSizeGrip but panics on error.

func (*Window) NewTSpinBox added in v1.0.15

func (w *Window) NewTSpinBox() (r *TSpinBox, err error)

NewTSpinBox returns a new TSpinBox as a child of w or an error, if any.

func (*Window) NewTSpinBoxM added in v1.0.16

func (w *Window) NewTSpinBoxM() *TSpinBox

NewTSpinBoxM is like NewTSpinBox but panics on error.

func (*Window) NewTTreeView added in v1.0.15

func (w *Window) NewTTreeView() (r *TTreeView, err error)

NewTTreeView returns a new TTreeView as a child of w or an error, if any.

func (*Window) NewTTreeViewM added in v1.0.16

func (w *Window) NewTTreeViewM() *TTreeView

NewTTreeViewM is like NewTTreeView but panics on error.

func (*Window) NewText added in v1.0.15

func (w *Window) NewText() (r *Text, err error)

NewText returns a new Text as a child of w or an error, if any.

func (*Window) NewTextM added in v1.0.16

func (w *Window) NewTextM() *Text

NewTextM is like NewText but panics on error.

func (*Window) NewTopLevel added in v1.0.15

func (w *Window) NewTopLevel() (r *TopLevel, err error)

NewTopLevel returns a new TopLevel as a child of w or an error, if any.

func (*Window) NewTopLevelM added in v1.0.16

func (w *Window) NewTopLevelM() *TopLevel

NewTopLevelM is like NewTopLevel but panics on error.

func (*Window) Win added in v1.0.16

func (w *Window) Win() *Window

Win implements Widget.

Directories

Path Synopsis
example
internal
lib

Jump to

Keyboard shortcuts

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