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 scrolledframe iwid
|
11 |
|
|
.BS
|
12 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
13 |
|
|
.SH NAME
|
14 |
|
|
scrolledframe \- Create and manipulate scrolled frame widgets
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
\fBscrolledframe\fI \fIpathName \fR?\fIoptions\fR?
|
17 |
|
|
.SH "INHERITANCE"
|
18 |
|
|
itk::Widget <- Labeledwidget <-Scrolledwidget <- Scrolledframe
|
19 |
|
|
.SH "STANDARD OPTIONS"
|
20 |
|
|
.LP
|
21 |
|
|
.nf
|
22 |
|
|
.ta 4c 8c 12c
|
23 |
|
|
\fBactiveBackground\fR \fBbackground\fR \fBborderWidth\fR \fBcursor\fR
|
24 |
|
|
\fBfont\fR \fBforeground\fR \fBhighlightColor\fR \fBhighlightThickness\fR
|
25 |
|
|
\fBrelief\fR \fBselectBackground\fR \fBselectBorderWidth\fR \fBselectForeground\fR
|
26 |
|
|
.fi
|
27 |
|
|
.LP
|
28 |
|
|
See the "options" manual entry for details on the standard options.
|
29 |
|
|
.SH "ASSOCIATED OPTIONS"
|
30 |
|
|
.LP
|
31 |
|
|
.nf
|
32 |
|
|
.ta 4c 8c 12c
|
33 |
|
|
\fBactiveRelief\fR \fBelementBorderWidth\fR \fBjump\fR \fBtroughColor\fR
|
34 |
|
|
.fi
|
35 |
|
|
.LP
|
36 |
|
|
See the "scrollbar" manual entry for details on the associated options.
|
37 |
|
|
.SH "INHERITED OPTIONS"
|
38 |
|
|
.LP
|
39 |
|
|
.nf
|
40 |
|
|
.ta 4c 8c 12c
|
41 |
|
|
\fBLabelBitmap\fR \fBlabelFont\fR \fBlabelImage\fR \fBlabelMargin\fR
|
42 |
|
|
\fBlabelPos\fR \fBlabelText\fR \fBlabelVariable\fR
|
43 |
|
|
.fi
|
44 |
|
|
.LP
|
45 |
|
|
See the "labeledwidget" class manual entry for details on the inherited options.
|
46 |
|
|
.SH "WIDGET-SPECIFIC OPTIONS"
|
47 |
|
|
.LP
|
48 |
|
|
.nf
|
49 |
|
|
Name: \fBheight\fR
|
50 |
|
|
Class: \fBHeight\fR
|
51 |
|
|
Command-Line Switch: \fB-height\fR
|
52 |
|
|
.fi
|
53 |
|
|
.IP
|
54 |
|
|
Specifies the height of the scrolled frame widget in any of the forms acceptable to \fBTk_GetPixels\fR. The default height is 100 pixels.
|
55 |
|
|
.LP
|
56 |
|
|
.nf
|
57 |
|
|
Name: \fBhscrollMode\fR
|
58 |
|
|
Class: \fBScrollMode\fR
|
59 |
|
|
Command-Line Switch: \fB-hscrollmode\fR
|
60 |
|
|
.fi
|
61 |
|
|
.IP
|
62 |
|
|
Specifies the the display mode to be used for the horizontal
|
63 |
|
|
scrollbar: \fBstatic\fR, \fBdynamic\fR, or \fBnone\fR. In static mode, the
|
64 |
|
|
scroll bar is displayed at all times. Dynamic mode displays the
|
65 |
|
|
scroll bar as required, and none disables the scroll bar display. The
|
66 |
|
|
default is static.
|
67 |
|
|
.LP
|
68 |
|
|
.nf
|
69 |
|
|
Name: \fBsbWidth\fR
|
70 |
|
|
Class: \fBWidth\fR
|
71 |
|
|
Command-Line Switch: \fB-sbwidth\fR
|
72 |
|
|
.fi
|
73 |
|
|
.IP
|
74 |
|
|
Specifies the width of the scrollbar in any of the forms acceptable
|
75 |
|
|
to \fBTk_GetPixels\fR. The default width is 15 pixels.
|
76 |
|
|
.LP
|
77 |
|
|
.nf
|
78 |
|
|
Name: \fBscrollMargin\fR
|
79 |
|
|
Class: \fBMargin\fR
|
80 |
|
|
Command-Line Switch: \fB-scrollmargin\fR
|
81 |
|
|
.fi
|
82 |
|
|
.IP
|
83 |
|
|
Specifies the distance between the frame and scrollbar in any of the
|
84 |
|
|
forms acceptable to \fBTk_GetPixels\fR. The default is 3 pixels.
|
85 |
|
|
.LP
|
86 |
|
|
.nf
|
87 |
|
|
Name: \fBvscrollMode\fR
|
88 |
|
|
Class: \fBScrollMode\fR
|
89 |
|
|
Command-Line Switch: \fB-vscrollmode\fR
|
90 |
|
|
.fi
|
91 |
|
|
.IP
|
92 |
|
|
Specifies the the display mode to be used for the vertical
|
93 |
|
|
scrollbar: \fBstatic\fR, \fBdynamic\fR, or \fBnone\fR. In static mode, the
|
94 |
|
|
scroll bar is displayed at all times. Dynamic mode displays the
|
95 |
|
|
scroll bar as required, and none disables the scroll bar display. The
|
96 |
|
|
default is static.
|
97 |
|
|
.LP
|
98 |
|
|
.nf
|
99 |
|
|
Name: \fBwidth\fR
|
100 |
|
|
Class: \fBWidth\fR
|
101 |
|
|
Command-Line Switch: \fB-width\fR
|
102 |
|
|
.fi
|
103 |
|
|
.IP
|
104 |
|
|
Specifies the width of the scrolled frame widget in any of the forms
|
105 |
|
|
acceptable to \fBTk_GetPixels\fR. The default height is 100 pixels.
|
106 |
|
|
.BE
|
107 |
|
|
|
108 |
|
|
.SH DESCRIPTION
|
109 |
|
|
.PP
|
110 |
|
|
The \fBscrolledframe\fR combines the functionallity of scrolling with that
|
111 |
|
|
of a typical frame widget to implement a clipable viewing area whose visible
|
112 |
|
|
region may be modified with the scroll bars. This enables the contruction
|
113 |
|
|
of visually larger areas than which could normally be displayed, containing
|
114 |
|
|
a heterogenous mix of other widgets. Options exist which allow full control
|
115 |
|
|
over which scrollbars are displayed and the method, i.e. statically or
|
116 |
|
|
dynamically. The frame itself may be accessed by the \fBchildsite\fR
|
117 |
|
|
method and then filled with other widget combinations.
|
118 |
|
|
|
119 |
|
|
.SH "METHODS"
|
120 |
|
|
.PP
|
121 |
|
|
The \fBscrolledframe\fR command creates a new Tcl command whose
|
122 |
|
|
name is \fIpathName\fR. This
|
123 |
|
|
command may be used to invoke various
|
124 |
|
|
operations on the widget. It has the following general form:
|
125 |
|
|
.DS C
|
126 |
|
|
\fIpathName option \fR?\fIarg arg ...\fR?
|
127 |
|
|
.DE
|
128 |
|
|
\fIOption\fR and the \fIarg\fRs
|
129 |
|
|
determine the exact behavior of the command. The following
|
130 |
|
|
commands are possible for scrolledframe widgets:
|
131 |
|
|
.SH "ASSOCIATED METHODS"
|
132 |
|
|
.LP
|
133 |
|
|
.nf
|
134 |
|
|
.ta 4c 8c 12c
|
135 |
|
|
\fBxview\fR \fByview\fR
|
136 |
|
|
.fi
|
137 |
|
|
.LP
|
138 |
|
|
See the "canvas" manual entry for details on the associated methods.
|
139 |
|
|
|
140 |
|
|
.SH "WIDGET-SPECIFIC METHODS"
|
141 |
|
|
.TP
|
142 |
|
|
\fIpathName \fBcget\fR \fIoption\fR
|
143 |
|
|
Returns the current value of the configuration option given
|
144 |
|
|
by \fIoption\fR.
|
145 |
|
|
\fIOption\fR may have any of the values accepted by the \fBscrolledframe\fR
|
146 |
|
|
command.
|
147 |
|
|
.TP
|
148 |
|
|
\fIpathName \fBchildsite\fR
|
149 |
|
|
Return the path name of the child site.
|
150 |
|
|
.TP
|
151 |
|
|
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
152 |
|
|
Query or modify the configuration options of the widget.
|
153 |
|
|
If no \fIoption\fR is specified, returns a list describing all of
|
154 |
|
|
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
|
155 |
|
|
information on the format of this list). If \fIoption\fR is specified
|
156 |
|
|
with no \fIvalue\fR, then the command returns a list describing the
|
157 |
|
|
one named option (this list will be identical to the corresponding
|
158 |
|
|
sublist of the value returned if no \fIoption\fR is specified). If
|
159 |
|
|
one or more \fIoption\-value\fR pairs are specified, then the command
|
160 |
|
|
modifies the given widget option(s) to have the given value(s); in
|
161 |
|
|
this case the command returns an empty string.
|
162 |
|
|
\fIOption\fR may have any of the values accepted by the \fBscrolledframe\fR
|
163 |
|
|
command.
|
164 |
|
|
.TP
|
165 |
|
|
\fIpathName \fBjustify \fIdirection\fR
|
166 |
|
|
Justifies the frame contents via the scroll bars in one of four directions:
|
167 |
|
|
\fBleft\fR, \fBright\fR, \fBtop\fR, or \fBbottom\fR.
|
168 |
|
|
|
169 |
|
|
.SH "COMPONENTS"
|
170 |
|
|
.LP
|
171 |
|
|
.nf
|
172 |
|
|
Name: \fBhorizsb\fR
|
173 |
|
|
Class: \fBScrollbar\fR
|
174 |
|
|
.fi
|
175 |
|
|
.IP
|
176 |
|
|
The horizsb component is the horizontal scroll bar. See the "ScrollBar"
|
177 |
|
|
widget manual entry for details on the horizsb component item.
|
178 |
|
|
.LP
|
179 |
|
|
.nf
|
180 |
|
|
Name: \fBvertsb\fR
|
181 |
|
|
Class: \fBScrollbar\fR
|
182 |
|
|
.fi
|
183 |
|
|
.IP
|
184 |
|
|
The vertsb component is the vertical scroll bar. See the "ScrollBar" widget
|
185 |
|
|
manual entry for details on the vertsb component item.
|
186 |
|
|
.fi
|
187 |
|
|
|
188 |
|
|
.SH EXAMPLE
|
189 |
|
|
.DS
|
190 |
|
|
scrolledframe .sf -width 150 -height 180 -labelon yes -labeltext scrolledframe
|
191 |
|
|
|
192 |
|
|
set cs [.sf childsite]
|
193 |
|
|
pack [button $cs.b1 -text Hello] -pady 10
|
194 |
|
|
pack [button $cs.b2 -text World] -pady 10
|
195 |
|
|
pack [button $cs.b3 -text "This is a test"] -pady 10
|
196 |
|
|
pack [button $cs.b4 -text "This is a really big button"] -pady 10
|
197 |
|
|
pack [button $cs.b5 -text "This is another really big button"] -pady 10
|
198 |
|
|
pack [button $cs.b6 -text "This is the last really big button"] -pady 10
|
199 |
|
|
|
200 |
|
|
pack .sf -expand yes -fill both -padx 10 -pady 10
|
201 |
|
|
.DE
|
202 |
|
|
.SH AUTHOR
|
203 |
|
|
.TP
|
204 |
|
|
Mark L. Ulferts
|
205 |
|
|
.TP
|
206 |
|
|
Sue Yockey
|
207 |
|
|
.SH KEYWORDS
|
208 |
|
|
scrolledframe, frame, widget
|