1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1995 DSC Technologies Corporation
|
3 |
|
|
'\"
|
4 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
5 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
6 |
|
|
'\"
|
7 |
|
|
'\" @(#) ScrolledListBox.n 1.21 94/12/17 16:04:44
|
8 |
|
|
'/"
|
9 |
|
|
.so man.macros
|
10 |
|
|
.HS scrolledcanvas iwid
|
11 |
|
|
.BS
|
12 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
13 |
|
|
.SH NAME
|
14 |
|
|
scrolledcanvas \- Create and manipulate scrolled canvas widgets
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
\fBscrolledcanvas\fI \fIpathName \fR?\fIoptions\fR?
|
17 |
|
|
.SH "INHERITANCE"
|
18 |
|
|
itk::Widget <- Labeledwidget <- Scrolledwidget <- Scrolledcanvas
|
19 |
|
|
.SH "STANDARD OPTIONS"
|
20 |
|
|
.LP
|
21 |
|
|
.nf
|
22 |
|
|
.ta 4c 8c 12c
|
23 |
|
|
\fBactiveBackground\fR \fBbackground\fR \fBborderWidth\fR \fBcursor\fR
|
24 |
|
|
\fBexportSelection\fR \fBfont\fR \fBforeground\fR \fBhighlightColor\fR
|
25 |
|
|
\fBhighlightThickness\fR \fBinsertBorderWidth\fR \fBinsertOffTime\fR \fBinsertOnTime\fR
|
26 |
|
|
\fBinsertWidth\fR \fBrelief\fR \fBselectBackground\fR \fBselectBorderWidth\fR
|
27 |
|
|
\fBselectForeground\fR
|
28 |
|
|
.fi
|
29 |
|
|
.LP
|
30 |
|
|
See the "options" manual entry for details on the standard options.
|
31 |
|
|
.SH "ASSOCIATED OPTIONS"
|
32 |
|
|
.LP
|
33 |
|
|
.nf
|
34 |
|
|
.ta 4c 8c 12c
|
35 |
|
|
\fBcloseEnough\fR \fBconfine\fR \fBscrollRegion\fR \fBxScrollIncrement\fR
|
36 |
|
|
\fByScrollIncrement\fR
|
37 |
|
|
.fi
|
38 |
|
|
.LP
|
39 |
|
|
See the "canvas" widget manual entry for details on the above
|
40 |
|
|
associated options.
|
41 |
|
|
.LP
|
42 |
|
|
.nf
|
43 |
|
|
.ta 4c 8c 12c
|
44 |
|
|
\fBactiveRelief\fR \fBelementBorderWidth\fR \fBjump\fR \fBtroughColor\fR
|
45 |
|
|
.fi
|
46 |
|
|
.LP
|
47 |
|
|
See the "scrollbar" widget manual entry for details on the above
|
48 |
|
|
associated options.
|
49 |
|
|
.SH "INHERITED OPTIONS"
|
50 |
|
|
.LP
|
51 |
|
|
.nf
|
52 |
|
|
.ta 4c 8c 12c
|
53 |
|
|
\fBdisabledForeground\fR \fBlabelBitmap\fR \fBlabelFont\fR \fBlabelImage\fR
|
54 |
|
|
\fBlabelMargin\fR \fBlabelPos\fR \fBlabelText\fR \fBlabelVariable\fR
|
55 |
|
|
\fBstate\fR
|
56 |
|
|
.fi
|
57 |
|
|
.LP
|
58 |
|
|
See the "labeledwidget" class manual entry for details on the inherited options.
|
59 |
|
|
.SH "WIDGET-SPECIFIC OPTIONS"
|
60 |
|
|
.LP
|
61 |
|
|
.nf
|
62 |
|
|
Name: \fBautoMargin\fR
|
63 |
|
|
Class: \fBAutoMargin\fR
|
64 |
|
|
Command-Line Switch: \fB-automargin\fR
|
65 |
|
|
.fi
|
66 |
|
|
.IP
|
67 |
|
|
Specifies the autoresize extra margin to reserve. This option is only
|
68 |
|
|
effective with autoresize turned on. The default is 10.
|
69 |
|
|
.LP
|
70 |
|
|
.nf
|
71 |
|
|
Name: \fBautoResize\fR
|
72 |
|
|
Class: \fBAutoResize\fR
|
73 |
|
|
Command-Line Switch: \fB-autoresize\fR
|
74 |
|
|
.fi
|
75 |
|
|
.IP
|
76 |
|
|
Automatically adjusts the scrolled region to be the bounding
|
77 |
|
|
box covering all the items in the canvas following the execution
|
78 |
|
|
of any method which creates or destroys items. Thus, as new
|
79 |
|
|
items are added, the scrollbars adjust accordingly.
|
80 |
|
|
.LP
|
81 |
|
|
.nf
|
82 |
|
|
Name: \fBheight\fR
|
83 |
|
|
Class: \fBHeight\fR
|
84 |
|
|
Command-Line Switch: \fB-height\fR
|
85 |
|
|
.fi
|
86 |
|
|
.IP
|
87 |
|
|
Specifies the height of the scrolled canvas widget in any of the forms
|
88 |
|
|
acceptable to \fBTk_GetPixels\fR. The default height is 30 pixels.
|
89 |
|
|
.LP
|
90 |
|
|
.nf
|
91 |
|
|
Name: \fBhscrollMode\fR
|
92 |
|
|
Class: \fBScrollMode\fR
|
93 |
|
|
Command-Line Switch: \fB-hscrollmode\fR
|
94 |
|
|
.fi
|
95 |
|
|
.IP
|
96 |
|
|
Specifies the the display mode to be used for the horizontal
|
97 |
|
|
scrollbar: \fBstatic, dynamic,\fR or \fBnone\fR. In static mode, the
|
98 |
|
|
scroll bar is displayed at all times. Dynamic mode displays the
|
99 |
|
|
scroll bar as required, and none disables the scroll bar display. The
|
100 |
|
|
default is static.
|
101 |
|
|
.LP
|
102 |
|
|
.nf
|
103 |
|
|
Name: \fBsbWidth\fR
|
104 |
|
|
Class: \fBWidth\fR
|
105 |
|
|
Command-Line Switch: \fB-sbwidth\fR
|
106 |
|
|
.fi
|
107 |
|
|
.IP
|
108 |
|
|
Specifies the width of the scrollbar in any of the forms acceptable
|
109 |
|
|
to \fBTk_GetPixels\fR. The default width is 15 pixels..
|
110 |
|
|
.LP
|
111 |
|
|
.nf
|
112 |
|
|
Name: \fBscrollMargin\fR
|
113 |
|
|
Class: \fBScrollMargin\fR
|
114 |
|
|
Command-Line Switch: \fB-scrollmargin\fR
|
115 |
|
|
.fi
|
116 |
|
|
.IP
|
117 |
|
|
Specifies the distance between the canvas and scrollbar in any of the
|
118 |
|
|
forms acceptable to \fBTk_GetPixels\fR. The default is 3 pixels.
|
119 |
|
|
.LP
|
120 |
|
|
.nf
|
121 |
|
|
Name: \fBtextBackground\fR
|
122 |
|
|
Class: \fBBackground\fR
|
123 |
|
|
Command-Line Switch \fB-textbackground\fR
|
124 |
|
|
.fi
|
125 |
|
|
.IP
|
126 |
|
|
Specifies the background color for the canvas. This allows the background
|
127 |
|
|
within the canvas to be different from the normal background color.
|
128 |
|
|
.LP
|
129 |
|
|
.nf
|
130 |
|
|
Name: \fBvscrollMode\fR
|
131 |
|
|
Class: \fBScrollMode\fR
|
132 |
|
|
Command-Line Switch: \fB-vscrollmode\fR
|
133 |
|
|
.fi
|
134 |
|
|
.IP
|
135 |
|
|
Specifies the the display mode to be used for the vertical
|
136 |
|
|
scrollbar: \fBstatic, dynamic,\fR or \fBnone\fR. In static mode, the
|
137 |
|
|
scroll bar is displayed at all times. Dynamic mode displays the
|
138 |
|
|
scroll bar as required, and none disables the scroll bar display. The
|
139 |
|
|
default is static.
|
140 |
|
|
.LP
|
141 |
|
|
.nf
|
142 |
|
|
Name: \fBwidth\fR
|
143 |
|
|
Class: \fBWidth\fR
|
144 |
|
|
Command-Line Switch: \fB-width\fR
|
145 |
|
|
.fi
|
146 |
|
|
.IP
|
147 |
|
|
Specifies the width of the scrolled canvas widget in any of the forms
|
148 |
|
|
acceptable to \fBTk_GetPixels\fR. The default height is 30 pixels.
|
149 |
|
|
.BE
|
150 |
|
|
|
151 |
|
|
.SH DESCRIPTION
|
152 |
|
|
.PP
|
153 |
|
|
The \fBscrolledcanvas\fR command creates
|
154 |
|
|
a scrolled canvas with additional options to manage
|
155 |
|
|
horizontal and vertical scrollbars. This includes options to control
|
156 |
|
|
which scrollbars are displayed and the method, i.e. statically or
|
157 |
|
|
dynamically.
|
158 |
|
|
|
159 |
|
|
.SH "METHODS"
|
160 |
|
|
.PP
|
161 |
|
|
The \fBscrolledcanvas\fR command creates a new Tcl command whose
|
162 |
|
|
name is \fIpathName\fR. This
|
163 |
|
|
command may be used to invoke various
|
164 |
|
|
operations on the widget. It has the following general form:
|
165 |
|
|
.DS C
|
166 |
|
|
\fIpathName option \fR?\fIarg arg ...\fR?
|
167 |
|
|
.DE
|
168 |
|
|
\fIOption\fR and the \fIarg\fRs
|
169 |
|
|
determine the exact behavior of the command. The following
|
170 |
|
|
commands are possible for scrolledcanvas widgets:
|
171 |
|
|
.SH "ASSOCIATED METHODS"
|
172 |
|
|
.LP
|
173 |
|
|
.nf
|
174 |
|
|
.ta 4c 8c 12c
|
175 |
|
|
\fBaddtag\fR \fBbbox\fR \fBbind\fR \fBcanvasx\fR
|
176 |
|
|
\fBcanvasy\fB \fBcoords\fR \fBcreate\fR \fBdchars\fR
|
177 |
|
|
\fBdelete\fR \fBdtag\fR \fBfind\fR \fBfocus\fR
|
178 |
|
|
\fBgettags\fR \fBicursor\fR \fBindex\fR \fBinsert\fR
|
179 |
|
|
\fBitemconfigure\fR \fBlower\fR \fBmove\fR \fBpostscript\fR
|
180 |
|
|
\fBraise\fR \fBscale\fR \fBscan\fR \fBselect\fR
|
181 |
|
|
\fBtype\fR \fBxview\fR \fByview\fR
|
182 |
|
|
.fi
|
183 |
|
|
.LP
|
184 |
|
|
See the "canvas" manual entry for details on the associated methods.
|
185 |
|
|
|
186 |
|
|
.SH "WIDGET-SPECIFIC METHODS"
|
187 |
|
|
.TP
|
188 |
|
|
\fIpathName \fBcget\fR \fIoption\fR
|
189 |
|
|
Returns the current value of the configuration option given
|
190 |
|
|
by \fIoption\fR.
|
191 |
|
|
\fIOption\fR may have any of the values accepted by the \fBscrolledcanvas\fR
|
192 |
|
|
command.
|
193 |
|
|
.TP
|
194 |
|
|
\fIpathName \fBchildsite\fR
|
195 |
|
|
Returns the child site widget path name.
|
196 |
|
|
.TP
|
197 |
|
|
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
198 |
|
|
Query or modify the configuration options of the widget.
|
199 |
|
|
If no \fIoption\fR is specified, returns a list describing all of
|
200 |
|
|
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
|
201 |
|
|
information on the format of this list). If \fIoption\fR is specified
|
202 |
|
|
with no \fIvalue\fR, then the command returns a list describing the
|
203 |
|
|
one named option (this list will be identical to the corresponding
|
204 |
|
|
sublist of the value returned if no \fIoption\fR is specified). If
|
205 |
|
|
one or more \fIoption\-value\fR pairs are specified, then the command
|
206 |
|
|
modifies the given widget option(s) to have the given value(s); in
|
207 |
|
|
this case the command returns an empty string.
|
208 |
|
|
\fIOption\fR may have any of the values accepted by the \fBscrolledcanvas\fR
|
209 |
|
|
command.
|
210 |
|
|
.TP
|
211 |
|
|
\fIpathName \fBjustify \fIdirection\fR
|
212 |
|
|
Justifies the canvas contents via the scroll bars in one of four directions:
|
213 |
|
|
\fBleft\fR, \fBright\fR, \fBtop\fR, or \fBbottom\fR.
|
214 |
|
|
|
215 |
|
|
.SH "COMPONENTS"
|
216 |
|
|
.LP
|
217 |
|
|
.nf
|
218 |
|
|
Name: \fBcanvas\fR
|
219 |
|
|
Class: \fBCanvas\fR
|
220 |
|
|
.fi
|
221 |
|
|
.IP
|
222 |
|
|
The canvas component is the canvas widget. See the "canvas" widget
|
223 |
|
|
manual entry for details on the canvas component item.
|
224 |
|
|
.LP
|
225 |
|
|
.nf
|
226 |
|
|
Name: \fBhorizsb\fR
|
227 |
|
|
Class: \fBScrollbar\fR
|
228 |
|
|
.fi
|
229 |
|
|
.IP
|
230 |
|
|
The horizsb component is the horizontal scroll bar. See the "ScrollBar"
|
231 |
|
|
widget manual entry for details on the horizsb component item.
|
232 |
|
|
.LP
|
233 |
|
|
.nf
|
234 |
|
|
Name: \fBvertsb\fR
|
235 |
|
|
Class: \fBScrollbar\fR
|
236 |
|
|
.fi
|
237 |
|
|
.IP
|
238 |
|
|
The vertsb component is the vertical scroll bar. See the "ScrollBar" widget
|
239 |
|
|
manual entry for details on the vertsb component item.
|
240 |
|
|
.fi
|
241 |
|
|
|
242 |
|
|
.SH EXAMPLE
|
243 |
|
|
.DS
|
244 |
|
|
scrolledcanvas .sc
|
245 |
|
|
|
246 |
|
|
.sc create rectangle 100 100 400 400 -fill red
|
247 |
|
|
.sc create rectangle 300 300 600 600 -fill green
|
248 |
|
|
.sc create rectangle 200 200 500 500 -fill blue
|
249 |
|
|
|
250 |
|
|
pack .sc -padx 10 -pady 10 -fill both -expand yes
|
251 |
|
|
.DE
|
252 |
|
|
.SH AUTHOR
|
253 |
|
|
Mark L. Ulferts
|
254 |
|
|
.SH KEYWORDS
|
255 |
|
|
scrolledcanvas, canvas, widget
|