text window
Puts widgets into the content, and gives or sets their options.
PATHNAME window cget INDEX OPTION
PATHNAME window configure INDEX ?OPTION? ?VALUE? ?OPTION VALUE ...?
PATHNAME window create INDEX ?OPTION VALUE ...?
PATHNAME window names
Description
create puts a widget at INDEX, as one place in the line. The widget must be a child of the text. The options of an embedded widget are:
-window WIDGET: the widget.-create SCRIPT: a script that makes the widget and gives its path name, when the text shows the place with no-window.-align WHERE:top,center,bottom, orbaselinein the line.-padx DISTANCEand-pady DISTANCE: the space around the widget.-stretch BOOLEAN: a true value makes the widget as tall as the line.
cget and configure work on the widget at INDEX, and the path name of the widget is also an index. names gives the path names of the widgets in the text.
Returns
A list for names, else as cget and configure.
Examples
% text .wi
> button .wi.ok -text OK
> .wi window create end -window .wi.ok -padx 2
> list [.wi window names] [.wi window cget .wi.ok -padx]
.wi.ok 2
Errors
% text .wi2; .wi2 window bogus
bad window option "bogus": must be cget, configure, create, or names
-errorcode NONE
% text .wi3; .wi3 window create
wrong # args: should be ".wi3 window create index ?-option value ...?"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1