OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [doc/] [label.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1990-1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: label.n,v 1.1.1.1 2002-01-16 10:25:49 markom Exp $
9
'\"
10
.so man.macros
11
.TH label n 4.0 Tk "Tk Built-In Commands"
12
.BS
13
'\" Note:  do not modify the .SH NAME line immediately below!
14
.SH NAME
15
label \- Create and manipulate label widgets
16
.SH SYNOPSIS
17
\fBlabel\fR \fIpathName \fR?\fIoptions\fR?
18
.SO
19
\-anchor        \-font  \-image \-takefocus
20
\-background    \-foreground    \-justify       \-text
21
\-bitmap        \-highlightbackground   \-padx  \-textvariable
22
\-borderwidth   \-highlightcolor        \-pady  \-underline
23
\-cursor        \-highlightthickness    \-relief        \-wraplength
24
.SE
25
.SH "WIDGET-SPECIFIC OPTIONS"
26
.OP \-height height Height
27
Specifies a desired height for the label.
28
If an image or bitmap is being displayed in the label then the value is in
29
screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);
30
for text it is in lines of text.
31
If this option isn't specified, the label's desired height is computed
32
from the size of the image or bitmap or text being displayed in it.
33
.OP \-width width Width
34
Specifies a desired width for the label.
35
If an image or bitmap is being displayed in the label then the value is in
36
screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);
37
for text it is in characters.
38
If this option isn't specified, the label's desired width is computed
39
from the size of the image or bitmap or text being displayed in it.
40
.BE
41
 
42
.SH DESCRIPTION
43
.PP
44
The \fBlabel\fR command creates a new window (given by the
45
\fIpathName\fR argument) and makes it into a label widget.
46
Additional
47
options, described above, may be specified on the command line
48
or in the option database
49
to configure aspects of the label such as its colors, font,
50
text, and initial relief.  The \fBlabel\fR command returns its
51
\fIpathName\fR argument.  At the time this command is invoked,
52
there must not exist a window named \fIpathName\fR, but
53
\fIpathName\fR's parent must exist.
54
.PP
55
A label is a widget that displays a textual string, bitmap or image.
56
If text is displayed, it must all be in a single font, but it
57
can occupy multiple lines on the screen (if it contains newlines
58
or if wrapping occurs because of the \fBwrapLength\fR option) and
59
one of the characters may optionally be underlined using the
60
\fBunderline\fR option.
61
The label can be manipulated in a few simple ways, such as
62
changing its relief or text, using the commands described below.
63
 
64
.SH "WIDGET COMMAND"
65
.PP
66
The \fBlabel\fR command creates a new Tcl command whose
67
name is \fIpathName\fR.  This
68
command may be used to invoke various
69
operations on the widget.  It has the following general form:
70
.CS
71
\fIpathName option \fR?\fIarg arg ...\fR?
72
.CE
73
\fIOption\fR and the \fIarg\fRs
74
determine the exact behavior of the command.  The following
75
commands are possible for label widgets:
76
.TP
77
\fIpathName \fBcget\fR \fIoption\fR
78
Returns the current value of the configuration option given
79
by \fIoption\fR.
80
\fIOption\fR may have any of the values accepted by the \fBlabel\fR
81
command.
82
.TP
83
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
84
Query or modify the configuration options of the widget.
85
If no \fIoption\fR is specified, returns a list describing all of
86
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
87
information on the format of this list).  If \fIoption\fR is specified
88
with no \fIvalue\fR, then the command returns a list describing the
89
one named option (this list will be identical to the corresponding
90
sublist of the value returned if no \fIoption\fR is specified).  If
91
one or more \fIoption\-value\fR pairs are specified, then the command
92
modifies the given widget option(s) to have the given value(s);  in
93
this case the command returns an empty string.
94
\fIOption\fR may have any of the values accepted by the \fBlabel\fR
95
command.
96
 
97
.SH BINDINGS
98
.PP
99
When a new label is created, it has no default event bindings:
100
labels are not intended to be interactive.
101
 
102
.SH KEYWORDS
103
label, widget

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.