3 <TITLE>iwidgets2.2.0 User Commands - scrolledcanvas</TITLE>
5 <BODY BGCOLOR="#FFFFFF">
6 <H1>iwidgets2.2.0 User Commands - scrolledcanvas</H1>
11 <H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
16 scrolledcanvas - Create and manipulate scrolled canvas widg-
21 <H2>SYNOPSIS</H2><PRE>
22 <STRONG>scrolledcanvas</STRONG> <EM>pathName</EM> ?<EM>options</EM>?
26 <H2>INHERITANCE</H2><PRE>
27 itk::Widget <- Labeledwidget <- scrolledcanvas
31 <H2>STANDARD OPTIONS</H2><PRE>
32 <STRONG>activeBackground</STRONG> <STRONG>background</STRONG> <STRONG>borderWidthcursor</STRONG>
33 <STRONG>exportSelection</STRONG> <STRONG>font</STRONG> <STRONG>foreground</STRONG> <STRONG>highlightColor</STRONG>
34 <STRONG>highlightThickness</STRONG> <STRONG>insertBorderWidthinsertOffTimeinsertOnTime</STRONG>
35 <STRONG>insertWidth</STRONG> <STRONG>relief</STRONG> <STRONG>repeatDelay</STRONG> <STRONG>repeatInterval</STRONG>
36 <STRONG>selectBackground</STRONG> <STRONG>selectBorderWidthselectForeground</STRONG>
38 See the "options" manual entry for details on the standard
43 <H2>ASSOCIATED OPTIONS</H2><PRE>
44 <STRONG>closeEnough</STRONG> <STRONG>confine</STRONG> <STRONG>scrollRegion</STRONG> <STRONG>xScrollIncrement</STRONG>
45 <STRONG>yScrollIncrement</STRONG>
47 See the "canvas" widget manual entry for details on the
48 above associated options.
50 <STRONG>activeRelief</STRONG> <STRONG>elementBorderWidth</STRONG> <STRONG>jumptroughColor</STRONG>
52 See the "scrollbar" widget manual entry for details on the
53 above associated options.
57 <H2>INHERITED OPTIONS</H2><PRE>
58 <STRONG>labelBitmap</STRONG> <STRONG>labelFont</STRONG> <STRONG>labelImage</STRONG> <STRONG>labelMargin</STRONG>
59 <STRONG>labelPos</STRONG> <STRONG>labelText</STRONG> <STRONG>labelVariable</STRONG>
61 See the "labeledwidget" class manual entry for details on
62 the inherited options.
66 <H2>WIDGET-SPECIFIC OPTIONS</H2><PRE>
67 Name: <STRONG>autoMargin</STRONG>
68 Class: <STRONG>AutoMargin</STRONG>
69 Command-Line Switch: <STRONG>-automargin</STRONG>
71 Specifies the autoresize extra margin to reserve. This
72 option is only effective with autoresize turned on.
75 Name: <STRONG>autoResize</STRONG>
76 Class: <STRONG>AutoResize</STRONG>
77 Command-Line Switch: <STRONG>-autoresize</STRONG>
79 Automatically adjusts the scrolled region to be the
80 bounding box covering all the items in the canvas fol-
81 lowing the execution of any method which creates or
82 destroys items. Thus, as new items are added, the
83 scrollbars adjust accordingly.
85 Name: <STRONG>height</STRONG>
86 Class: <STRONG>Height</STRONG>
87 Command-Line Switch: <STRONG>-height</STRONG>
89 Specifies the height of the scrolled canvas widget in
90 any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>. The
91 default height is 30 pixels.
93 Name: <STRONG>hscrollMode</STRONG>
94 Class: <STRONG>ScrollMode</STRONG>
95 Command-Line Switch: <STRONG>-hscrollmode</STRONG>
97 Specifies the the display mode to be used for the hor-
98 izontal scrollbar: <STRONG>static,</STRONG> <STRONG>dynamic,</STRONG> or <STRONG>none</STRONG>. In static
99 mode, the scroll bar is displayed at all times.
100 Dynamic mode displays the scroll bar as required, and
101 none disables the scroll bar display. The default is
104 Name: <STRONG>sbWidth</STRONG>
105 Class: <STRONG>Width</STRONG>
106 Command-Line Switch: <STRONG>-sbwidth</STRONG>
108 Specifies the width of the scrollbar in any of the
109 forms acceptable to <STRONG>Tk_GetPixels</STRONG>. The default width is
112 Name: <STRONG>scrollMargin</STRONG>
113 Class: <STRONG>ScrollMargin</STRONG>
114 Command-Line Switch: <STRONG>-scrollmargin</STRONG>
116 Specifies the distance between the canvas and scrollbar
117 in any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>. The
120 Name: <STRONG>textBackground</STRONG>
121 Class: <STRONG>Background</STRONG>
122 Command-Line Switch <STRONG>-textbackground</STRONG>
124 Specifies the background color for the canvas. This
125 allows the background within the canvas to be different
126 from the normal background color.
129 Name: <STRONG>vscrollMode</STRONG>
130 Class: <STRONG>ScrollMode</STRONG>
131 Command-Line Switch: <STRONG>-vscrollmode</STRONG>
133 Specifies the the display mode to be used for the vert-
134 ical scrollbar: <STRONG>static,</STRONG> <STRONG>dynamic,</STRONG> or <STRONG>none</STRONG>. In static
135 mode, the scroll bar is displayed at all times.
136 Dynamic mode displays the scroll bar as required, and
137 none disables the scroll bar display. The default is
140 Name: <STRONG>width</STRONG>
141 Class: <STRONG>Width</STRONG>
142 Command-Line Switch: <STRONG>-width</STRONG>
144 Specifies the width of the scrolled canvas widget in
145 any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>. The
146 default height is 30 pixels.
149 <H2><HR ALIGN=LEFT WIDTH=70% SIZE=3></H2><PRE>
154 <H2>DESCRIPTION</H2><PRE>
155 The <STRONG>scrolledcanvas</STRONG> command creates a scrolled canvas with
156 additional options to manage horizontal and vertical
157 scrollbars. This includes options to control which
158 scrollbars are displayed and the method, i.e. statically or
164 <H2>METHODS</H2><PRE>
165 The <STRONG>scrolledcanvas</STRONG> command creates a new Tcl command whose
166 name is <EM>pathName</EM>. This command may be used to invoke vari-
167 ous operations on the widget. It has the following general
170 <EM>pathName</EM> <EM>option</EM> ?<EM>arg</EM> <EM>arg</EM> ...?
172 <EM>Option</EM> and the <EM>arg</EM>s determine the exact behavior of the com-
173 mand. The following commands are possible for scrolledcan-
178 <H2>ASSOCIATED METHODS</H2><PRE>
179 <STRONG>addtag</STRONG> <STRONG>bbox</STRONG> <STRONG>bind</STRONG> <STRONG>canvasx</STRONG>
180 <STRONG>canvasy</STRONG> <STRONG>coords</STRONG> <STRONG>create</STRONG> <STRONG>dchars</STRONG>
181 <STRONG>delete</STRONG> <STRONG>dtag</STRONG> <STRONG>find</STRONG> <STRONG>focus</STRONG>
182 <STRONG>gettags</STRONG> <STRONG>icursor</STRONG> <STRONG>index</STRONG> <STRONG>insert</STRONG>
183 <STRONG>itemconfigure</STRONG> <STRONG>lower</STRONG> <STRONG>move</STRONG> <STRONG>postscript</STRONG>
184 <STRONG>raise</STRONG> <STRONG>scale</STRONG> <STRONG>scan</STRONG> <STRONG>select</STRONG>
185 <STRONG>type</STRONG> <STRONG>xview</STRONG> <STRONG>yview</STRONG>
187 See the "canvas" manual entry for details on the associated
192 <H2>WIDGET-SPECIFIC METHODS</H2><PRE>
193 <EM>pathName</EM> <STRONG>cget</STRONG> <EM>option</EM>
194 Returns the current value of the configuration option
195 given by <EM>option</EM>. <EM>Option</EM> may have any of the values
196 accepted by the <STRONG>scrolledcanvas</STRONG> command.
198 <EM>pathName</EM> <STRONG>childsite</STRONG>
199 Returns the child site widget path name.
201 <EM>pathName</EM> <STRONG>configure</STRONG> ?<EM>option</EM>? ?<EM>value</EM> <EM>option</EM> <EM>value</EM> ...?
202 Query or modify the configuration options of the
203 widget. If no <EM>option</EM> is specified, returns a list
204 describing all of the available options for <EM>pathName</EM>
205 (see <STRONG>Tk_ConfigureInfo</STRONG> for information on the format of
206 this list). If <EM>option</EM> is specified with no <EM>value</EM>, then
207 the command returns a list describing the one named
208 option (this list will be identical to the correspond-
209 ing sublist of the value returned if no <EM>option</EM> is
210 specified). If one or more <EM>option</EM> - <EM>value</EM> pairs are
211 specified, then the command modifies the given widget
212 option(s) to have the given value(s); in this case the
213 command returns an empty string. <EM>Option</EM> may have any
214 of the values accepted by the <STRONG>scrolledcanvas</STRONG> command.
216 <EM>pathName</EM> <STRONG>justify</STRONG> <EM>direction</EM>
217 Justifies the canvas contents via the scroll bars in
218 one of four directions: <STRONG>left</STRONG>, <STRONG>right</STRONG>, <STRONG>top</STRONG>, or <STRONG>bottom</STRONG>.
223 <H2>COMPONENTS</H2><PRE>
224 Name: <STRONG>scrCanvas</STRONG>
225 Class: <STRONG>Canvas</STRONG>
227 The scrCanvas component is the canvas widget. See the
228 "canvas" widget manual entry for details on the scrCan-
231 Name: <STRONG>hSB</STRONG>
232 Class: <STRONG>Scrollbar</STRONG>
234 The hSB component is the horizontal scroll bar. See
235 the "ScrollBar" widget manual entry for details on the
238 Name: <STRONG>vSB</STRONG>
239 Class: <STRONG>Scrollbar</STRONG>
241 The vSB component is the vertical scroll bar. See the
242 "ScrollBar" widget manual entry for details on the vSB
248 <H2>EXAMPLE</H2><PRE>
251 .sc create rectangle 100 100 400 400 -fill red
252 .sc create rectangle 300 300 600 600 -fill green
253 .sc create rectangle 200 200 500 500 -fill blue
255 pack .sc -padx 10 -pady 10 -fill both -expand yes
265 <H2>KEYWORDS</H2><PRE>
266 scrolledcanvas, canvas, widget