Debian Codegraph @

pod/Label.pod

raw
1 # Copyright (c) 1990-1994 The Regents of the University of California.
2 # Copyright (c) 1994-1996 Sun Microsystems, Inc.
3 # See the file "license.terms" for information on usage and redistribution
4 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5 #
6 #
7
8 =head1 NAME
9
10 Tk::Label - Create and manipulate Label widgets
11
12 =for category Tk Widget Classes
13
14 =head1 SYNOPSIS
15
16 I<$label> = I<$parent>-E<gt>B<Label>(?I<options>?);
17
18 =head1 STANDARD OPTIONS
19
20 B<-activebackground>
21 B<-activeforeground>
22 B<-anchor>
23 B<-background>
24 B<-bitmap>
25 B<-borderwidth>
26 B<-compound>
27 B<-cursor>
28 B<-disabledforeground>
29 B<-font>
30 B<-foreground>
31 B<-highlightbackground>
32 B<-highlightcolor>
33 B<-highlightthickness>
34 B<-image>
35 B<-justify>
36 B<-padx>
37 B<-pady>
38 B<-relief>
39 B<-takefocus>
40 B<-text>
41 B<-textvariable>
42 B<-underline>
43 B<-wraplength>
44
45 See L<Tk::options> for details of the standard options.
46
47 =head1 WIDGET-SPECIFIC OPTIONS
48
49 =over 4
50
51 =item Name: B<height>
52
53 =item Class: B<Height>
54
55 =item Switch: B<-height>
56
57 Specifies a desired height for the label.
58 If an image or bitmap is being displayed in the label then the value is in
59 screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
60 for text it is in lines of text.
61 If this option isn't specified, the label's desired height is computed
62 from the size of the image or bitmap or text being displayed in it.
63
64 =item Name: B<state>
65
66 =item Class: B<State>
67
68 =item Switch: B<-state>
69
70 Specifies one of three states for the label: B<normal>, B<active>, or
71 B<disabled>. In normal state the label is displayed using the
72 B<foreground> and B<background> options. In active state the label is
73 displayed using the B<activeForeground> and B<activeBackground>
74 options. In the disabled state the B<disabledForeground> and
75 B<background> options determine how the button is displayed.
76
77 =item Name: B<width>
78
79 =item Class: B<Width>
80
81 =item Switch: B<-width>
82
83 Specifies a desired width for the label.
84 If an image or bitmap is being displayed in the label then the value is in
85 screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
86 for text it is in characters.
87 If this option isn't specified, the label's desired width is computed
88 from the size of the image or bitmap or text being displayed in it.
89
90 =back
91
92 =head1 DESCRIPTION
93
94 The B<Label> method creates a new window (given by the
95 $widget argument) and makes it into a label widget.
96 Additional
97 options, described above, may be specified on the command line
98 or in the option database
99 to configure aspects of the label such as its colors, font,
100 text, and initial relief. The B<label> command returns its
101 $widget argument. At the time this command is invoked,
102 there must not exist a window named $widget, but
103 $widget's parent must exist.
104
105 A label is a widget that displays a textual string, bitmap or image.
106 If text is displayed, it must all be in a single font, but it
107 can occupy multiple lines on the screen (if it contains newlines
108 or if wrapping occurs because of the B<wrapLength> option) and
109 one of the characters may optionally be underlined using the
110 B<underline> option.
111 The label can be manipulated in a few simple ways, such as
112 changing its relief or text, using the commands described below.
113
114 =head1 WIDGET METHODS
115
116 The B<Label> method creates a widget object.
117 This object supports the B<configure> and B<cget> methods
118 described in L<Tk::options> which can be used to enquire and
119 modify the options described above.
120 The widget also inherits all the methods provided by the generic
121 L<Tk::Widget|Tk::Widget> class.
122
123 =head1 BINDINGS
124
125 When a new label is created, it has no default event bindings:
126 labels are not intended to be interactive.
127
128 =head1 KEYWORDS
129
130 label, widget
131
132 =cut
133