Scrolled(3) User Contributed Perl Documentation Scrolled(3)

# [NAME](#NAME)

Tk::Scrolled - Create a widget with attached scrollbar(s)

# [SYNOPSIS](#SYNOPSIS)

    *$whatever* = *$parent*-&gt;**Scrolled**(*Whatever* ?,**-scrollbars**=&gt;*where*? ?,...?);

# [DESCRIPTION](#DESCRIPTION)

To stop a flood of **ScrlWhatever** widgets Perl/Tk introcuded the special constructor **Scrolled**. **Scrolled** creates a widget of the given Class *Whatever* with attached scrollbar(s).

# [OPTIONS](#OPTIONS)

All options beside **-scrollbars** explained below are passed to the *Whatever* widget constructor.

[-scrollbars](#scrollbars)

Expects as argument the position where the scrollbars should be created: **w**, **e** or **n**, **s** or a combination of them. If the one or both positions are prefixed with **o** the scrollbar will only show up if there is a 'real' need to scroll.

# [ADVERTISED SUBWIDGETS](#ADVERTISED_SUBWIDGETS)

See "Subwidget" in Tk::mega how to use advertised widgets.

[scrolled](#scrolled)

the scrolled widget

[*widget*](#widget)

same as **scrolled** above. *widget* is the kind of widget passed to scrolled as first argument in all lowercase.

[xscrollbar](#xscrollbar)

the **Scrollbar** widget used for horizontal scrolling (if it exists)

[yscrollbar](#yscrollbar)

the **Scrollbar** widget used for vertical scrolling (if it exists)

[corner](#corner)

a frame in the corner between the vertical and horizontal scrolbar

# [BUGS](#BUGS)

If a widget does not support *-{x,y}scrollcommand* options, **Scrolled** does not complain if the specified widget class does not support them. E.g.,

    *$parent*-&gt;**Scrolled**(**'Button'**, ...)

One does not get an error message or warning when one tries to configure scrollbars after the widget construction:

    *$ascrolled*-&gt;**configure**(**-scrollbars** =&gt; **'e'**);

# [SEE ALSO](#SEE_ALSO)

Tk::Scrollbar

# [KEYWORDS](#KEYWORDS)

scrolled, scrollbar

2026-08-31 perl v5.44.0

---

Document: Tk::Scrolled(3pm) from perl-tk 804.036-r11 (Chainguard OS)
Source: https://github.com/eserte/perl-tk
