📄 options.n
字号:
is made (the value ``jumps'' rather than changing smoothly)..OP \-justify justify JustifyWhen there are multiple lines of text displayed in a widget, thisoption 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\fRmeans that the lines' centers are aligned, and \fBright\fR meansthat the lines' right edges line up..OP \-orient orient OrientFor widgets that can lay themselves out with either a horizontalor vertical orientation, such as scrollbars, this option specifieswhich orientation should be used. Must be either \fBhorizontal\fRor \fBvertical\fR or an abbreviation of one of these..OP \-padx padX PadSpecifies a non-negative value indicating how much extra spaceto 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 willadd this amount to the width it would normally need (as determinedby the width of the things displayed in the widget); if the geometrymanager can satisfy this request, the widget will end up with extrainternal space to the left and/or right of what it displays inside.Most widgets only use this option for padding text: if they aredisplaying a bitmap or image, then they usually ignore paddingoptions..OP \-pady padY PadSpecifies a non-negative value indicating how much extra spaceto 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 addthis amount to the height it would normally need (as determined bythe height of the things displayed in the widget); if the geometrymanager can satisfy this request, the widget will end up with extrainternal space above and/or below what it displays inside.Most widgets only use this option for padding text: if they aredisplaying a bitmap or image, then they usually ignore paddingoptions..OP \-relief relief ReliefSpecifies the 3-D effect desired for the widget. Acceptablevalues are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR,\fBsolid\fR, and \fBgroove\fR.The valueindicates how the interior of the widget should appear relativeto its exterior; for example, \fBraised\fR means the interior ofthe widget should appear to protrude from the screen, relative tothe exterior of the widget..OP \-repeatdelay repeatDelay RepeatDelaySpecifies the number of milliseconds a button or key must be helddown before it begins to auto-repeat. Used, for example, on theup- and down-arrows in scrollbars..OP \-repeatinterval repeatInterval RepeatIntervalUsed in conjunction with \fBrepeatDelay\fR: once auto-repeatbegins, this option determines the number of milliseconds betweenauto-repeats..OP \-selectbackground selectBackground ForegroundSpecifies the background color to use when displaying selecteditems..OP \-selectborderwidth selectBorderWidth BorderWidthSpecifies a non-negative value indicating the widthof the 3-D border to draw around selected items.The value may have any of the forms acceptable to \fBTk_GetPixels\fR..OP \-selectforeground selectForeground BackgroundSpecifies the foreground color to use when displaying selecteditems..OP \-setgrid setGrid SetGridSpecifies a boolean value that determines whether this widget controls theresizing grid for its top-level window.This option is typically used in text widgets, where the informationin the widget has a natural size (the size of a character) and it makessense for the window's dimensions to be integral numbers of these units.These natural window sizes form a grid.If the \fBsetGrid\fR option is set to true then the widget willcommunicate with the window manager so that when the user interactivelyresizes the top-level window that contains the widget, the dimensions ofthe window will be displayed to the user in grid units and the windowsize will be constrained to integral numbers of grid units.See the section GRIDDED GEOMETRY MANAGEMENT in the \fBwm\fR manualentry for more details..OP \-takefocus takeFocus TakeFocusDetermines whether the window accepts the focus during keyboardtraversal (e.g., Tab and Shift-Tab).Before setting the focus to a window, the traversal scriptsconsult the value of the \fBtakeFocus\fR option.A value of \fB0\fR means that the window should be skipped entirelyduring keyboard traversal. \fB1\fR means that the window should receive the inputfocus 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 makethe decision about whether or not to focus on the window: the currentalgorithm is to skip the window if it isdisabled, if it has no key bindings, or if it is not viewable.If the value has any other form, then the traversal scripts takethe 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 receivethe input focus, and an empty string results in the default decisiondescribed above.Note: this interpretation of the option is defined entirely bythe Tcl scripts that implement traversal: the widget implementationsignore the option entirely, so you can change its meaning if youredefine the keyboard traversal scripts..OP \-text text TextSpecifies a string to be displayed inside the widget. The way in whichthe string is displayed depends on the particular widget and may bedetermined by other options, such as \fBanchor\fR or \fBjustify\fR..OP \-textvariable textVariable VariableSpecifies the name of a variable. The value of the variable is a textstring to be displayed inside the widget; if the variable value changesthen the widget will automatically update itself to reflect the new value.The way in which the string is displayed in the widget depends on theparticular widget and may be determined by other options, such as\fBanchor\fR or \fBjustify\fR..OP \-troughcolor troughColor BackgroundSpecifies the color to use for the rectangular trough areasin widgets such as scrollbars and scales..OP \-underline underline UnderlineSpecifies the integer index of a character to underline in the widget.This option is used by the default bindings to implement keyboardtraversal for menu buttons and menu entries.0 corresponds to the first character of the text displayed in thewidget, 1 to the next character, and so on..OP \-wraplength wrapLength WrapLengthFor widgets that can perform word-wrapping, this option specifiesthe 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 forscreen distances.If this value is less than or equal to 0 then no wrapping is done: lineswill break only at newline characters in the text..OP \-xscrollcommand xScrollCommand ScrollCommandSpecifies the prefix for a command used to communicate with horizontalscrollbars.When the view in the widget's window changes (orwhenever anything else occurs that could change the display in ascrollbar, such as a change in the total size of the widget'scontents), the widget willgenerate a Tcl command by concatenating the scroll command andtwo numbers.Each of the numbers is a fraction between 0 and 1, which indicatesa position in the document. 0 indicates the beginning of the document,1 indicates the end, .333 indicates a position one third the way throughthe document, and so on.The first fraction indicates the first information in the documentthat is visible in the window, and the second fraction indicatesthe information just after the last portion that is visible.The command isthen passed to the Tcl interpreter for execution. Typically the\fBxScrollCommand\fR option consists of the path name of a scrollbarwidget followed by ``set'', e.g. ``.x.scrollbar set'': this will causethe scrollbar to be updated whenever the view in the window changes.If this option is not specified, then no command will be executed..OP \-yscrollcommand yScrollCommand ScrollCommandSpecifies the prefix for a command used to communicate with verticalscrollbars. This option is treated in the same way as the\fBxScrollCommand\fR option, except that it is used for verticalscrollbars and is provided by widgets that support vertical scrolling.See the description of \fBxScrollCommand\fR for detailson how this option is used..SH KEYWORDSclass, name, standard option, switch
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -