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

📄 button.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: @(#) button.n 1.40 97/10/31 12:58:48'\" .so man.macros.TH button n 4.4 Tk "Tk Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEbutton \- Create and manipulate button widgets.SH SYNOPSIS\fBbutton\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..OP \-default default Default.VSSpecifies one of three states for the default ring: \fBnormal\fR,\fBactive\fR, or \fBdisabled\fR.  In active state, the button is drawnwith the platform specific appearance for a default button.  In normalstate, the button is drawn with the platform specific appearance for anon-default button, leaving enough space to draw the default buttonappearance.  The normal and active states will result in buttons ofthe same size.  In disabled state, the button is drawn with thenon-default button appearance without leaving space for the defaultappearance.  The disabled state may result in a smaller button thanthe active state.ring..VE.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 \-state state StateSpecifies one of three states for the button:  \fBnormal\fR, \fBactive\fR,or \fBdisabled\fR.  In normal state the button is displayed using the\fBforeground\fR and \fBbackground\fR options.  The active state istypically used when the pointer is over the button.  In active statethe button is displayed using the \fBactiveForeground\fR and\fBactiveBackground\fR options.  Disabled state means that the buttonshould 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 button is displayed..OP \-width width WidthSpecifies a desired width 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 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 \fBbutton\fR command creates a new window (given by the\fIpathName\fR argument) and makes it into a button widget.Additionaloptions, described above, may be specified on the command lineor in the option databaseto configure aspects of the button such as its colors, font,text, and initial relief.  The \fBbutton\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..PPA button is a widget that displays a textual string, bitmap or image.If text is displayed, it must all be in a single font, but 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.It can display itself in either of three different ways, accordingtothe \fBstate\fR option; it can be made to appear raised, sunken, or flat;and it can be made to flash.  When a user invokes thebutton (by pressing mouse button 1 with the cursor over thebutton), then the Tcl command specified in the \fB\-command\fRoption is invoked..SH "WIDGET COMMAND".PPThe \fBbutton\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 button 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 \fBbutton\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, then 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, then 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 \fBbutton\fRcommand..TP\fIpathName \fBflash\fRFlash the button.  This is accomplished by redisplaying the buttonseveral times, alternating between active and normal colors.  Atthe end of the flash the button is left in the same normal/activestate as when the command was invoked.This command is ignored if the button's state is \fBdisabled\fR..TP\fIpathName \fBinvoke\fRInvoke the Tcl command associated with the button, 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 button.This command is ignored if the button's state is \fBdisabled\fR..SH "DEFAULT BINDINGS".PPTk automatically creates class bindings for buttons that give themdefault behavior:.IP [1]A button activates whenever the mouse passes over it and deactivateswhenever the mouse leaves the button..VSUnder Windows, this binding is only active when mouse button 1 hasbeen pressed over the button..VE.IP [2]A button's relief is changed to sunken whenever mouse button 1 ispressed over the button, and the relief is restored to its originalvalue when button 1 is later released..IP [3]If mouse button 1 is pressed over a button and later released overthe button, the button is invoked.  However, if the mouse is notover the button when button 1 is released, then no invocation occurs..IP [4]When a button has the input focus, the space key causes the buttonto be invoked..PPIf the button's state is \fBdisabled\fR then none of the aboveactions occur:  the button is completely non-responsive..PPThe behavior of buttons can be changed by defining new bindings forindividual widgets or by redefining the class bindings..SH KEYWORDSbutton, widget

⌨️ 快捷键说明

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