autoscroll(n)
π¦ autoscroll(n) π¦
okay bestie, this is the autoscroll(n) manual page β the one all about Automatic mapping of scrollbars. it's literally here so your scrollbar can show up and dip out exactly when it's needed. no cap. slay. π
π NAME π
autoscroll β provides for a scrollbar to be automatically mapped and unmapped as needed. that's the whole glow-up, fr fr.
β¨ SYNOPSIS β¨
package require Tcl
package require autoscroll ?1.1?
::autoscroll::autoscroll scrollbar
::autoscroll::unautoscroll scrollbar
::autoscroll::wrap
::autoscroll::unwrap
πΈ DESCRIPTION πΈ
This package lets scrollbars be mapped and unmapped as needed, depending on the size and content of the widget that the scrollbar is scrolling. Your scrollbar has to be managed by either pack or grid β other geometry managers are not supported, periodt. π
π«Ά pack bestie check: when a scrollbar is managed by pack, any geometry changes made in the scrollbar's parent between the time the scrollbar is unmapped and when it is mapped will be lost. Also, it is an error to destroy any of the scrollbar's siblings while the scrollbar is unmapped. π
π§ grid bestie check: when a scrollbar is managed by grid, if anything becomes gridded in the same row and column the scrollbar occupied, it will be replaced by the scrollbar when remapped.
This package may be used on any scrollbar-like widget as long as it supports the set subcommand in the same style as scrollbar. If the set subcommand is not used, then this package will have no effect. iykyk.
π οΈ the commands
::autoscroll::autoscroll scrollbarβ arranges for the already existing scrollbar scrollbar to be mapped and unmapped as needed. it's giving "existing scrollbar, you're the main character now" energy. π::autoscroll::unautoscroll scrollbarβ returns the named scrollbar to its original static state. lowkey a reset button for the vibe. π::autoscroll::wrapβ arranges for all scrollbars created after this command is run to be automatically mapped and unmapped as needed. future scrollbars, you're covered. β¨::autoscroll::unwrapβ turns off the automatic autoscrolling of all new scrollbars. Does not effect existing scrollbars. (yes, it says "effect" β we're preserving the original wording, bestie.) π
π example time
text .t -yscrollcommand ".scrolly set"
scrollbar .scrolly -orient v -command ".t yview"
pack .scrolly -side right -fill y
pack .t -side left -fill both -expand 1
::autoscroll::autoscroll .scrolly
π BUGS, IDEAS, FEEDBACK π
This document, and the package it describes, will undoubtedly contain bugs and other problems. iconic, honestly. Please report such in the category autoscroll of the Tklib Trackers [http://core.tcl.tk/tklib/reportlist]. Please also report any ideas for enhancements you may have for either package and/or documentation. we love a feedback moment. π
π KEYWORDS π
scroll, scrollbar
mwah π β this autoscroll(n) page is from tklib, version 1.1. date? not printed here, so we're not inventing one. that's the source/version footer vibe, bestie. π«Ά
π¦ where this page comes from
- alpine 3.24: tk-lib-doc 0.7-r0 Β· TCL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms