iwidgets::scrolledframe(1)
π iwidgets::scrolledframe π
okay bestie, welcome to the manual page for iwidgets::scrolledframe(1) β that's the page you're reading, from the [incr Widgets] manual set. it's a scrollable frame, it's iconic, and by the end of this you're gonna know it like the back of your hand. no cap. π«Ά
β¨ NAME β¨
iwidgets::scrolledframe β create and manipulate scrolled frame widgets. that's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
iwidgets::scrolledframe pathName ?options?
that's the whole thing. path name, then some optional options, and boom, you have a widget. β¨
π¦ INHERITANCE π¦
ok so this widget is literally descended from royalty, look at this family tree:
itk::Widget <- iwidgets::Labeledwidget <- iwidgets::Scrolledwidget <-
iwidgets::Scrolledframe
main character energy running in the family fr fr. π
π STANDARD OPTIONS π
these are the options you get from the standard Tk crew, all 12 of them, and yes you need to know every single one:
activeBackgroundbackgroundborderWidthcursorfontforegroundhighlightColorhighlightThicknessreliefselectBackgroundselectBorderWidthselectForeground
check the "options" manual entry for the tea on all the standard options. iykyk.
π ASSOCIATED OPTIONS π
these three come along for the ride from the scrollbar world:
activeReliefelementBorderWidthjumptroughColor
the "scrollbar" manual entry has the deets on these associated options.
π INHERITED OPTIONS π
inherited from the ancestors, as one does:
LabelBitmaplabelFontlabelImagelabelMarginlabelPoslabelTextlabelVariablesticky
the "labeledwidget" class manual entry explains all the inherited options. go read it, bestie.
π₯ WIDGET-SPECIFIC OPTIONS π₯
now THIS is the good part. these are the options that make a scrolledframe a scrolledframe. every single one, in order, no skipping:
-heightβ Name:height, Class:Height. sets the height of the scrolled frame widget, in any of the forms thatTk_GetPixelsaccepts. the default height is100pixels. short king. π-hscrollmodeβ Name:hscrollMode, Class:ScrollMode. picks the display mode for the horizontal scrollbar, and you have three choices:static,dynamic, ornone. instaticmode the scrollbar is shown at all times.dynamicmode shows it only as required. andnonestraight up disables the scrollbar display. the default isstatic. periodt.-sbwidthβ Name:sbWidth, Class:Width. sets the width of the scrollbar, in any of the forms acceptable toTk_GetPixels. the default width is15pixels. β¨-scrollmarginβ Name:scrollMargin, Class:Margin. the distance between the frame and the scrollbar, in any of the forms acceptable toTk_GetPixels. the default is3pixels. personal space matters. π«Ά-vscrollmodeβ Name:vscrollMode, Class:ScrollMode. same deal as the horizontal one but for the vertical scrollbar:static,dynamic, ornone.staticmeans the scroll bar is displayed at all times,dynamicmeans it shows up as required, andnonedisables the scroll bar display entirely. the default isstatic. π-widthβ Name:width, Class:Width. sets the width of the scrolled frame widget, in any of the forms acceptable toTk_GetPixels. and the page says, quote unquote, the default height is100pixels. yeah girl, it says height. we're just reporting what the manpage says. π
π DESCRIPTION π
so here's the whole concept, bestie: scrolledframe combines the functionallity of scrolling with that of a typical frame widget, and together they implement a clipable viewing area whose visible region may be modified with the scroll bars. the way that lets you build visually larger areas than which could normally be displayed β and those areas can hold a heterogenous mix of other widgets. so you're not just scrolling text, you're scrolling a whole situation. π¦
and options exist which allow full control over which scrollbars are displayed, and the method β i.e. statically or dynamically. the frame itself may be accessed by the childsite method, and then filled with other widget combinations. that's the whole hack and it slays. π₯
π METHODS π
the iwidgets::scrolledframe command creates a new Tcl command whose name is pathName. this command may be used to invoke various operations 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 scrolledframe widgets:
π ASSOCIATED METHODS π
xviewyview
see the "canvas" manual entry for details on the associated methods.
π WIDGET-SPECIFIC METHODS π
pathName cget optionβ returns the current value of the configuration option given byoption.Optionmay have any of the values accepted by theiwidgets::scrolledframecommand.pathName childsiteβ returns the path name of the child site. this is THE method, the one you use to actually put stuff in there. iconic. πpathName configure ?option? ?value option value ...?β query or modify the configuration options of the widget. if nooptionis specified, returns a list describing all of the available options forpathName(seeTk_ConfigureInfofor information on the format of this list). ifoptionis specified with novalue, then the command returns a list describing the one named option β and this list will be identical to the corresponding sublist of the value returned if nooptionis specified. if one or more 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.Optionmay have any of the values accepted by theiwidgets::scrolledframecommand. it does everything. she's versatile. πpathName justify directionβ justifies the frame contents via the scroll bars in one of four directions:left,right,top, orbottom. pick a lane, bestie. π§
πΈ COMPONENTS πΈ
every scrolledframe comes with two little sidekicks:
horizsbβ Class:Scrollbar. thehorizsbcomponent is the horizontal scroll bar. see the "ScrollBar" widget manual entry for details on thehorizsbcomponent item.vertsbβ Class:Scrollbar. thevertsbcomponent is the vertical scroll bar. see the "ScrollBar" widget manual entry for details on thevertsbcomponent item.
two queens, one frame. π
β EXAMPLE β
here's the demo, copied exactly as it lives in the page, character for character, don't @ me about the line breaks:
package require Iwidgets 4.0 iwidgets::scrolledframe .sf -width 150
-height 180 \
-labelon yes -labeltext scrolledframe
set cs [.sf childsite] pack [button $cs.b1 -text Hello] -pady 10 pack
[button $cs.b2 -text World] -pady 10 pack [button $cs.b3 -text "This is
a test"] -pady 10 pack [button $cs.b4 -text "This is a really big
button"] -pady 10 pack [button $cs.b5 -text "This is another really big
button"] -pady 10 pack [button $cs.b6 -text "This is the last really big
button"] -pady 10
pack .sf -expand yes -fill both -padx 10 -pady 10
six buttons in a scrollable child site. that's the whole slay. β¨
π AUTHOR π
- Mark L. Ulferts
- Sue Yockey
legends, both of them. thank you for your service. π«Ά
π KEYWORDS π
scrolledframe, frame, widget β that's the search terms, bestie, use them wisely. π
okay that's the whole page, we ate and left no crumbs π
β¨. this came to you from the Tk corner of the world β iwidgets::scrolledframe(1), and yes, it is literally that girl. go build something gorgeous with it, bestie. π¦πΈπ
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1995 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms