ScrolledText
A multi-line Text with its scrollbars managed for you: the
vertical bar appears only when there's something to scroll (and a horizontal
one with wrap: 'none'). Everything else — content, tags, marks, embedded
widgets, options — behaves exactly like a plain Text.
Live preview
Live preview. In the Player's built-in docs viewer (
scriptweaver --help), this rendersScrolledTextas a live, theme-aware widget you can interact with.
Example
const log = app.ScrolledText({ wrap: 'word', height: 12 });
log.pack.configure({ fill: 'both', expand: true });
log.setText('Starting…\n');
log.insert('end', 'step 1 done\n');
log.see('end'); // keep the tail visible
It is a Text
The full Text surface works directly on the widget: insert/get/
delete/clear, setText/getText, see/index, the tag* styling and
binding helpers, windowCreate for embedded widgets, and all Text options
(wrap, font, undo, state, spacing*, …) — see
Text. Mouse-wheel scrolling is Tk's own; nothing global is
installed.
Two differences:
autohide(boolean, default true) — setfalseto keep the scrollbars always visible.xScrollCommand/yScrollCommandare owned by the widget and rejected — the scroll wiring is the whole point.