⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 radiobutton.n

📁 linux系统下的音频通信
💻 N
字号:
'\"'\" Copyright (c) 1990-1994 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) radiobutton.n 1.41 97/10/31 12:58:51'\" .so man.macros.TH radiobutton n 4.4 Tk "Tk Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEradiobutton \- Create and manipulate radiobutton widgets.SH SYNOPSIS\fBradiobutton\fR \fIpathName \fR?\fIoptions\fR?.SO\-activebackground	\-cursor	\-highlightthickness	\-takefocus\-activeforeground	\-disabledforeground	\-image	\-text\-anchor	\-font	\-justify	\-textvariable\-background	\-foreground	\-padx	\-underline\-bitmap	\-highlightbackground	\-pady	\-wraplength\-borderwidth	\-highlightcolor	\-relief.SE.SH "WIDGET-SPECIFIC OPTIONS".OP \-command command CommandSpecifies a Tcl command to associate with the button.  This commandis typically invoked when mouse button 1 is released over the buttonwindow.  The button's global variable (\fB\-variable\fR option) willbe updated before the command is invoked..OP \-height height HeightSpecifies a desired height for the button.If an image or bitmap is being displayed in the button then the value is inscreen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);for text it is in lines of text.If this option isn't specified, the button's desired height is computedfrom the size of the image or bitmap or text being displayed in it..OP \-indicatoron indicatorOn IndicatorOnSpecifies whether or not the indicator should be drawn.  Must be aproper boolean value.  If false, the \fBrelief\fR option isignored and the widget's relief is always sunken if the widget isselected and raised otherwise..OP \-selectcolor selectColor BackgroundSpecifies a background color to use when the button is selected.If \fBindicatorOn\fR is true then the color applies to the indicator.Under Windows, this color is used as the background for the indicatorregardless of the select state.If \fBindicatorOn\fR is false, this color is used as the backgroundfor 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 fordisplaying when the widget is selected..OP \-selectimage selectImage SelectImageSpecifies an image to display (in place of the \fBimage\fR option)when the radiobutton is selected.This option is ignored unless the \fBimage\fR option has beenspecified..OP \-state state StateSpecifies one of three states for the radiobutton:  \fBnormal\fR, \fBactive\fR,or \fBdisabled\fR.  In normal state the radiobutton is displayed using the\fBforeground\fR and \fBbackground\fR options.  The active state istypically used when the pointer is over the radiobutton.  In active statethe radiobutton is displayed using the \fBactiveForeground\fR and\fBactiveBackground\fR options.  Disabled state means that the radiobuttonshould be insensitive:  the default bindings will refuse to activatethe widget and will ignore mouse button presses.In this state the \fBdisabledForeground\fR and\fBbackground\fR options determine how the radiobutton is displayed..OP \-value value ValueSpecifies value to store in the button's associated variable wheneverthis button is selected..OP \-variable variable VariableSpecifies name of global variable to set whenever this button isselected.  Changes in this variable also cause the button to selector deselect itself.Defaults to the value \fBselectedButton\fR..OP \-width width WidthSpecifies a desired width for the button.If an image or bitmap is being displayed in the button, the value is inscreen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);for text it is in characters.If this option isn't specified, the button's desired width is computedfrom the size of the image or bitmap or text being displayed in it..BE.SH DESCRIPTION.PPThe \fBradiobutton\fR command creates a new window (given by the\fIpathName\fR argument) and makes it into a radiobutton widget.Additionaloptions, described above, may be specified on the command lineor in the option databaseto configure aspects of the radiobutton such as its colors, font,text, and initial relief.  The \fBradiobutton\fR command returns its\fIpathName\fR argument.  At the time this command is invoked,there must not exist a window named \fIpathName\fR, but\fIpathName\fR's parent must exist..PP.VSA radiobutton is a widget that displays a textual string, bitmap or imageand a diamond or circle called an \fIindicator\fR..VEIf text is displayed, it must all be in a single font, but itcan occupy multiple lines on the screen (if it contains newlinesor if wrapping occurs because of the \fBwrapLength\fR option) andone of the characters may optionally be underlined using the\fBunderline\fR option.  A radiobutton hasall of the behavior of a simple button: it can display itself in eitherof three different ways, according to the \fBstate\fR option;it can be made to appearraised, sunken, or flat; it can be made to flash; and it invokesa Tcl command whenever mouse button 1 is clicked over thecheck button..PPIn addition, radiobuttons can be \fIselected\fR.If a radiobutton is selected, the indicator is normally.VSdrawn with a selected appearance, anda Tcl variable associated with the radiobutton is set to a particularvalue (normally 1).Under Unix, the indicator is drawn with a sunken relief and a specialcolor.  Under Windows, the indicator is drawn with a round mark inside.If the radiobutton is not selected, then the indicator is drawn with adeselected appearance, and the associated variable isset to a different value (typically 0).Under Unix, the indicator is drawn with a raised relief and no specialcolor.  Under Windows, the indicator is drawn without a round mark inside..VETypically, several radiobuttons share a single variable and thevalue of the variable indicates which radiobutton is to be selected.When a radiobutton is selected it sets the value of the variable toindicate that fact;  each radiobutton also monitors the value ofthe variable and automatically selects and deselects itself when thevariable's value changes.By default the variable \fBselectedButton\fRis used;  its contents give the name of the button that isselected, or the empty string if no button associated with thatvariable is selected.The name of the variable for a radiobutton,plus the variable to be stored into it, may be modified with optionson the command line or in the option database.Configuration options may also be used to modify the way theindicator is displayed (or whether it is displayed at all).By default a radiobutton is configured to select itself on button clicks..SH "WIDGET COMMAND".PPThe \fBradiobutton\fR command creates a new Tcl command whosename is \fIpathName\fR.  Thiscommand may be used to invoke variousoperations on the widget.  It has the following general form:.CS\fIpathName option \fR?\fIarg arg ...\fR?.CE\fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command.  The followingcommands are possible for radiobutton widgets:.TP\fIpathName \fBcget\fR \fIoption\fRReturns the current value of the configuration option givenby \fIoption\fR.\fIOption\fR may have any of the values accepted by the \fBradiobutton\fRcommand..TP\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?Query or modify the configuration options of the widget.If no \fIoption\fR is specified, returns a list describing all ofthe available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list).  If \fIoption\fR is specifiedwith no \fIvalue\fR, the command returns a list describing theone named option (this list will be identical to the correspondingsublist of the value returned if no \fIoption\fR is specified).  Ifone or more \fIoption\-value\fR pairs are specified, the commandmodifies the given widget option(s) to have the given value(s);  inthis case the command returns an empty string.\fIOption\fR may have any of the values accepted by the \fBradiobutton\fRcommand..TP\fIpathName \fBdeselect\fRDeselects the radiobutton and sets the associated variable to anempty string.If this radiobutton was not currently selected, the command hasno effect..TP\fIpathName \fBflash\fRFlashes the radiobutton.  This is accomplished by redisplaying the radiobuttonseveral times, alternating between active and normal colors.  Atthe end of the flash the radiobutton is left in the same normal/activestate as when the command was invoked.This command is ignored if the radiobutton's state is \fBdisabled\fR..TP\fIpathName \fBinvoke\fRDoes just what would have happened if the user invoked the radiobuttonwith the mouse: selects the button and invokesits associated Tcl command, if there is one.The return value is the return value from the Tcl command, or anempty string if there is no command associated with the radiobutton.This command is ignored if the radiobutton's state is \fBdisabled\fR..TP\fIpathName \fBselect\fRSelects the radiobutton and sets the associated variable to thevalue corresponding to this widget..SH BINDINGS.PPTk automatically creates class bindings for radiobuttons that give themthe following default behavior:.VS.IP [1]On Unix systems, a radiobutton activates whenever the mouse passesover it and deactivates whenever the mouse leaves the radiobutton.  OnMac and Windows systems, when mouse button 1 is pressed over aradiobutton, the button activates whenever the mouse pointer is insidethe button, and deactivates whenever the mouse pointer leaves thebutton..VE.IP [2]When mouse button 1 is pressed over a radiobutton it is invoked (itbecomes selected and the command associated with the button isinvoked, if there is one)..IP [3]When a radiobutton has the input focus, the space key causes the radiobuttonto be invoked..PPIf the radiobutton's state is \fBdisabled\fR then none of the aboveactions occur:  the radiobutton is completely non-responsive..PPThe behavior of radiobuttons can be changed by defining new bindings forindividual widgets or by redefining the class bindings..SH KEYWORDSradiobutton, widget

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -