]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/label.n
Ck console graphics toolkit
[oss/ck.git] / doc / label.n
1 '\"
2 '\" Copyright (c) 1990-1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
4 '\" Copyright (c) 1996-1999 Christian Werner
5 '\"
6 '\" See the file "license.terms" for information on usage and redistribution
7 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 '\" 
9 .so man.macros
10 .TH label n 8.0 Ck "Ck Built-In Commands"
11 .BS
12 '\" Note:  do not modify the .SH NAME line immediately below!
13 .SH NAME
14 label \- Create and manipulate label widgets
15 .SH SYNOPSIS
16 \fBlabel\fI \fIpathName \fR?\fIoptions\fR?
17 .SH "STANDARD OPTIONS"
18 .LP
19 .nf
20 .ta 3.8c 7.6c 11.4c
21 \fBanchor\fR    \fBforeground\fR        \fBtextVariable\fR      \fBunderlineForeground\fR
22 \fBattributes\fR        \fBtakeFocus\fR \fBunderline\fR
23 \fBbackground\fR        \fBtext\fR      \fBunderlineAttributes\fR
24 .fi
25 .LP
26 See the ``options'' manual entry for details on the standard options.
27 .SH "WIDGET-SPECIFIC OPTIONS"
28 .ta 4c
29 .LP
30 .nf
31 Name:   \fBheight\fR
32 Class:  \fBHeight\fR
33 Command-Line Switch:    \fB\-height\fR
34 .fi
35 .IP
36 Specifies a desired height for the label in screen lines.
37 If this option isn't specified, the label's desired height is 1 line.
38 .LP
39 .nf
40 Name:   \fBwidth\fR
41 Class:  \fBWidth\fR
42 Command-Line Switch:    \fB\-width\fR
43 .fi
44 .IP
45 Specifies a desired width for the label in screen columns.
46 If this option isn't specified, the label's desired width is computed
47 from the size of the text being displayed in it.
48 .BE
49
50 .SH DESCRIPTION
51 .PP
52 The \fBlabel\fR command creates a new window (given by the
53 \fIpathName\fR argument) and makes it into a label widget.
54 Additional
55 options, described above, may be specified on the command line
56 or in the option database
57 to configure aspects of the label such as its colors, font,
58 text, and initial relief.  The \fBlabel\fR command returns its
59 \fIpathName\fR argument.  At the time this command is invoked,
60 there must not exist a window named \fIpathName\fR, but
61 \fIpathName\fR's parent must exist.
62 .PP
63 A label is a widget that displays a textual string.
64 The label can be manipulated in a few simple ways, such as
65 changing its attributes or text, using the commands described below.
66
67 .SH "WIDGET COMMAND"
68 .PP
69 The \fBlabel\fR command creates a new Tcl command whose
70 name is \fIpathName\fR.  This
71 command may be used to invoke various
72 operations on the widget.  It has the following general form:
73 .DS C
74 \fIpathName option \fR?\fIarg arg ...\fR?
75 .DE
76 \fIOption\fR and the \fIarg\fRs
77 determine the exact behavior of the command.  The following
78 commands are possible for label widgets:
79 .TP
80 \fIpathName \fBcget\fR \fIoption\fR
81 Returns the current value of the configuration option given
82 by \fIoption\fR.
83 \fIOption\fR may have any of the values accepted by the \fBlabel\fR
84 command.
85 .TP
86 \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
87 Query or modify the configuration options of the widget.
88 If no \fIoption\fR is specified, returns a list describing all of
89 the available options for \fIpathName\fR. If \fIoption\fR is specified
90 with no \fIvalue\fR, then the command returns a list describing the
91 one named option (this list will be identical to the corresponding
92 sublist of the value returned if no \fIoption\fR is specified).  If
93 one or more \fIoption\-value\fR pairs are specified, then the command
94 modifies the given widget option(s) to have the given value(s);  in
95 this case the command returns an empty string.
96 \fIOption\fR may have any of the values accepted by the \fBlabel\fR
97 command.
98
99 .SH BINDINGS
100 .PP
101 When a new label is created, it has no default event bindings:
102 labels are not intended to be interactive.
103
104 .SH KEYWORDS
105 label, widget