NAME
iwidgets::scrolledcanvas - Create and manipulate scrolled canvas wid-
getsSYNOPSIS
iiwwiiddggeettss::::ssccrroolllleeddccaannvvaass pathName ?options? IINNHHEERRIITTAANNCCEEitk::Widget <- iwidgets::Labeledwidget <- iwidgets::Scrolledwidget <-
iwidgets::Scrolledcanvas SSTTAANNDDAARRDD OOPPTTIIOONNSS aaccttiivveeBBaacckkggrroouunndd bbaacckkggrroouunndd bboorrddeerrWWiiddtthh ccuurrssoorr eexxppoorrttSSeelleeccttiioonn ffoonntt ffoorreeggrroouunndd hhiigghhlliigghhttCCoolloorr hhiigghhlliigghhttTThhiicckknneessss iinnsseerrttBBoorrddeerrWWiiddtthh iinnsseerrttOOffffTTiimmee iinnsseerrttOOnnTTiimmee iinnsseerrttWWiiddtthh rreelliieeff sseelleeccttBBaacckkggrroouunndd sseelleeccttBBoorrddeerrWWiiddtthh sseelleeccttFFoorreeggrroouunndd See the "options" manual entry for details on the standard options. AASSSSOOCCIIAATTEEDD OOPPTTIIOONNSS cclloosseeEEnnoouugghh ccoonnffiinnee ssccrroollllRReeggiioonn xxSSccrroollllIInnccrreemmeenntt yySSccrroollllIInnccrreemmeennttSee the "canvas" widget manual entry for details on the above associ-
ated options. aaccttiivveeRReelliieeff eelleemmeennttBBoorrddeerrWWiiddtthh jjuummppttrroouugghhCCoolloorrSee the "scrollbar" widget manual entry for details on the above asso-
ciated options. IINNHHEERRIITTEEDD OOPPTTIIOONNSS ddiissaabblleeddFFoorreeggrroouunndd llaabbeellBBiittmmaapp llaabbeellFFoonnttllaabbeellIImmaaggee llaabbeellMMaarrggiinn llaabbeellPPooss llaabbeellTTeexxtt llaabbeellVVaarriiaabbllee ssttaattee ssttiicckkyy See the "labeledwidget" class manual entry for details on the inherited options.WWIIDDGGEETT-SSPPEECCIIFFIICC OOPPTTIIOONNSS
Name: aauuttooMMaarrggiinn Class: AAuuttooMMaarrggiinnCommand-Line Switch: -aauuttoommaarrggiinn
Specifies the autoresize extra margin to reserve. This option is only effective with autoresize turned on. The default is 10. Name: aauuttooRReessiizzee Class: AAuuttooRReessiizzeeCommand-Line Switch: -aauuttoorreessiizzee
Automatically adjusts the scrolled region to be the bounding box covering all the items in the canvas following the execution of any method which creates or destroys items. Thus, as new items are added, the scrollbars adjust accordingly. Name: hheeiigghhtt Class: HHeeiigghhttCommand-Line Switch: -hheeiigghhtt
Specifies the height of the scrolled canvas widget in any of theforms acceptable to TTkkGGeettPPiixxeellss. The default height is 30 pix-
els. Name: hhssccrroollllMMooddee Class: SSccrroollllMMooddeeCommand-Line Switch: -hhssccrroollllmmooddee
Specifies the the display mode to be used for the horizontal scrollbar: ssttaattiicc,, ddyynnaammiicc,, or nnoonnee. In static mode, the scroll bar is displayed at all times. Dynamic mode displays the scroll bar as required, and none disables the scroll bar display. The default is static. Name: ssbbWWiiddtthh Class: WWiiddtthhCommand-Line Switch: -ssbbwwiiddtthh
Specifies the width of the scrollbar in any of the forms accept-
able to TTkkGGeettPPiixxeellss. The default width is 15 pixels.. Name: ssccrroollllMMaarrggiinn Class: SSccrroollllMMaarrggiinnCommand-Line Switch: -ssccrroollllmmaarrggiinn
Specifies the distance between the canvas and scrollbar in anyof the forms acceptable to TTkkGGeettPPiixxeellss. The default is 3 pix-
els. Name: tteexxttBBaacckkggrroouunndd Class: BBaacckkggrroouunnddCommand-Line Switch -tteexxttbbaacckkggrroouunndd
Specifies the background color for the canvas. This allows the background within the canvas to be different from the normal background color. Name: vvssccrroollllMMooddee Class: SSccrroollllMMooddeeCommand-Line Switch: -vvssccrroollllmmooddee
Specifies the the display mode to be used for the vertical scrollbar: ssttaattiicc,, ddyynnaammiicc,, or nnoonnee. In static mode, the scroll bar is displayed at all times. Dynamic mode displays the scroll bar as required, and none disables the scroll bar display. The default is static. Name: wwiiddtthh Class: WWiiddtthhCommand-Line Switch: -wwiiddtthh
Specifies the width of the scrolled canvas widget in any of theforms acceptable to TTkkGGeettPPiixxeellss. The default height is 30 pix-
els.DESCRIPTION
The iiwwiiddggeettss::::ssccrroolllleeddccaannvvaass command creates a scrolled canvas with additional options to manage horizontal and vertical scrollbars. This includes options to control which scrollbars are displayed and the method, i.e. statically or dynamically. MMEETTHHOODDSS The iiwwiiddggeettss::::ssccrroolllleeddccaannvvaass command creates a new Tcl command whosename is pathName. This command may be used to invoke various opera-
tions on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for scrolledcanvas widgets: AASSSSOOCCIIAATTEEDD MMEETTHHOODDSS aaddddttaagg bbbbooxx bbiinndd ccaannvvaassxx ccaannvvaassyy ccoooorrddss ccrreeaattee ddcchhaarrss ddeelleettee ddttaagg ffiinndd ffooccuuss ggeettttaaggss iiccuurrssoorr iinnddeexx iinnsseerrtt iitteemmccoonnffiigguurree lloowweerr mmoovvee ppoossttssccrriipptt rraaiissee ssccaallee ssccaann sseelleecctt ttyyppee xxvviieeww yyvviieeww See the "canvas" manual entry for details on the associated methods.WWIIDDGGEETT-SSPPEECCIIFFIICC MMEETTHHOODDSS
pathName ccggeett option Returns the current value of the configuration option given byoption. Option may have any of the values accepted by the iiwwiidd-
ggeettss::::ssccrroolllleeddccaannvvaass command. pathName cchhiillddssiittee Returns the child site widget path name. pathName ccoonnffiigguurree ?option? ?value option value ...? Query or modify the configuration options of the widget. If nooption is specified, returns a list describing all of the avail-
able options for pathName (see TTkkCCoonnffiigguurreeIInnffoo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one ormore option-value pairs are specified, then the command modifies
the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iiwwiiddggeettss::::ssccrroolllleeddccaannvvaass command. pathName jjuussttiiffyy direction Justifies the canvas contents via the scroll bars in one of four directions: lleefftt, rriigghhtt, ttoopp, or bboottttoomm. CCOOMMPPOONNEENNTTSS Name: ccaannvvaass Class: CCaannvvaass The canvas component is the canvas widget. See the "canvas" widget manual entry for details on the canvas component item. Name: hhoorriizzssbb Class: SSccrroollllbbaarr The horizsb component is the horizontal scroll bar. See the"ScrollBar" widget manual entry for details on the horizsb com-
ponent item. Name: vveerrttssbb Class: SSccrroollllbbaarr The vertsb component is the vertical scroll bar. See the"ScrollBar" widget manual entry for details on the vertsb compo-
nent item. EEXXAAMMPPLLEE package require Iwidgets 4.0 iwidgets::scrolledcanvas .sc.sc create rectangle 100 100 400 400 -fill red
.sc create rectangle 300 300 600 600 -fill green
.sc create rectangle 200 200 500 500 -fill blue
pack .sc -padx 10 -pady 10 -fill both -expand yes
AUTHOR Mark L. Ulferts KKEEYYWWOORRDDSS scrolledcanvas, canvas, widget Tk iwidgets::scrolledcanvas(1)