1iwidgets::scrolledcanvas  − Create and manipulate scrolled canvas
2widgets iwidgets::scrolledcanvas pathName ?options?   itk::Widget
3<‐  iwidgets::Labeledwidget  <‐ iwidgets::Scrolledwidget <‐ iwid‐
4gets::Scrolledcanvas

activeBackground background borderWidth cursor

exportSelection font foreground highlightColor

highlightThickness insertBorderWidth insertOffTime insertOnTime

insertWidth relief selectBackground selectBorderWidth

selectForeground

10See the "options" manual entry for details on  the  standard  op‐
11tions.

closeEnough confine scrollRegion xScrollIncrement

yScrollIncrement

14See the "canvas" widget manual entry for details on the above as‐
15sociated options.

activeRelief elementBorderWidth jumptroughColor

17See the "scrollbar" widget manual entry for details on the  above
18associated options.

disabledForeground labelBitmap labelFontlabelImage

labelMargin labelPos labelText labelVariable

state sticky

22See the "labeledwidget" class manual entry for details on the in‐
23herited options.
24Name:           autoMargin
25Class:          AutoMargin
26Command‐Line Switch:           ‐automargin
27Specifies the autoresize extra margin to reserve.  This option is
28only effective with autoresize turned on.  The default is 10.
29Name:           autoResize
30Class:          AutoResize
31Command‐Line Switch:           ‐autoresize
32Automatically  adjusts the scrolled region to be the bounding box
33covering all the items in the canvas following the  execution  of
34any  method  which creates or destroys items.  Thus, as new items
35are added, the scrollbars adjust accordingly.
36Name:           height
37Class:          Height
38Command‐Line Switch:           ‐height
39Specifies the height of the scrolled canvas widget in any of  the
40forms  acceptable to Tk_GetPixels.  The default height is 30 pix‐
41els.
42Name:           hscrollMode
43Class:          ScrollMode
44Command‐Line Switch:           ‐hscrollmode
45Specifies the the display mode to  be  used  for  the  horizontal
46scrollbar:  static, dynamic, or none.  In static mode, the scroll
47bar is displayed at all times.  Dynamic mode displays the  scroll
48bar  as  required, and none disables the scroll bar display.  The
49default is static.
50Name:           sbWidth
51Class:          Width
52Command‐Line Switch:           ‐sbwidth
53Specifies the width of the scrollbar in any of the forms  accept‐
54able to Tk_GetPixels.  The default width is 15 pixels..
55Name:           scrollMargin
56Class:          ScrollMargin
57Command‐Line Switch:           ‐scrollmargin
58Specifies the distance between the canvas and scrollbar in any of
59the forms acceptable to Tk_GetPixels.  The default is 3 pixels.
60Name:           textBackground
61Class:          Background
62Command‐Line Switch ‐textbackground
63Specifies the background color for the canvas.  This  allows  the
64background  within  the  canvas  to  be different from the normal
65background color.
66Name:           vscrollMode
67Class:          ScrollMode
68Command‐Line Switch:           ‐vscrollmode
69Specifies the the display  mode  to  be  used  for  the  vertical
70scrollbar:  static, dynamic, or none.  In static mode, the scroll
71bar is displayed at all times.  Dynamic mode displays the  scroll
72bar  as  required, and none disables the scroll bar display.  The
73default is static.
74Name:           width
75Class:          Width
76Command‐Line Switch:           ‐width
77Specifies the width of the scrolled canvas widget in any  of  the
78forms  acceptable to Tk_GetPixels.  The default height is 30 pix‐
79els.
80
81The iwidgets::scrolledcanvas command creates  a  scrolled  canvas
82with additional options to manage horizontal and vertical scroll‐
83bars.  This includes options to control which scrollbars are dis‐
84played and the method, i.e. statically or dynamically.
85
86The  iwidgets::scrolledcanvas  command  creates a new Tcl command
87whose name is pathName.  This command may be used to invoke vari‐
88ous operations on the widget.  It has the following general form:

pathName option ?arg arg ...? Option and the args determine the

90exact behavior of the command.  The following commands are possi‐
91ble for scrolledcanvas widgets:

addtag bbox bind canvasx

canvasy coords create dchars

delete dtag find focus

gettags icursor index insert

itemconfigure lower move postscript

raise scale scan select

type xview yview

99See the "canvas" manual entry for details on the associated meth‐
100ods.
101

pathName cget option Returns the current value of the configura‐

103tion option given by option.  Option may have any of  the  values
104accepted   by  the  iwidgets::scrolledcanvas  command.   pathName

childsite Returns the child site widget path name. pathName con‐

figure ?option? ?value option value ...? Query or modify the

107configuration options of the widget.  If no option is  specified,
108returns  a list describing all of the available options for path‐

Name (see Tk_ConfigureInfo for information on the format of this

110list).   If  option  is specified with no value, then the command
111returns a list describing the one named option (this list will be
112identical  to  the corresponding sublist of the value returned if
113no option is specified).  If one or more option−value  pairs  are
114specified,  then  the command modifies the given widget option(s)
115to have the given value(s);  in this case the command returns  an
116empty  string.  Option may have any of the values accepted by the

iwidgets::scrolledcanvas command. pathName justify direction

118Justifies  the canvas contents via the scroll bars in one of four
119directions: left, right, top, or bottom.
120
121Name:           canvas
122Class:          Canvas
123The canvas component is the canvas widget.  See the "canvas" wid‐
124get manual entry for details on the canvas component item.
125Name:           horizsb
126Class:          Scrollbar
127The  horizsb  component  is  the  horizontal scroll bar.  See the
128"ScrollBar" widget manual entry for details on the horizsb compo‐
129nent item.
130Name:           vertsb
131Class:          Scrollbar
132The  vertsb  component  is  the  vertical  scroll  bar.   See the
133"ScrollBar" widget manual entry for details on the vertsb  compo‐
134nent item.
135
136  package require Iwidgets 4.0
137  iwidgets::scrolledcanvas .sc
138
139  .sc create rectangle 100 100 400 400 ‐fill red
140  .sc create rectangle 300 300 600 600 ‐fill green
141  .sc create rectangle 200 200 500 500 ‐fill blue
142
143  pack  .sc  ‐padx  10  ‐pady  10  ‐fill both ‐expand yes Mark L.
144Ulferts scrolledcanvas, canvas, widget
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Impressum