CINXE.COM
Scrollutil
<!DOCTYPE html> <html lang='en'> <head> <meta charset='utf-8'> <meta name='viewport' content='width=device-width, initial-scale=1'> <meta name='description' content='Tclers wiki'> <meta name='author' content=''> <link rel='icon' href='/img/favicon.ico'> <title>Scrollutil</title> <!-- Latest compiled and minified CSS --> <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'> <link rel='stylesheet' href='/css/nikit.css' type='text/css'> <link rel='stylesheet' href='/css/sh_style.css' type='text/css'> <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.0/css/theme.bootstrap_3.min.css' type='text/css'> <script src='//cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js'></script> </head> <body onload='sh_highlightDocument(); nikitUser();'> <nav class='navbar navbar-fixed-top navbar-inverse'> <div class='container'> <div class='navbar-header'> <button type='button' class='navbar-toggle' data-toggle='collapse' data-target='#myNavbar'> <span class='icon-bar'></span> <span class='icon-bar'></span> <span class='icon-bar'></span> </button> <ul class='nav navbar-nav'> <li class='dropdown'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'> Tcler's Wiki<span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a href='/welcome'>Home</a></li> <li><a rel='nofollow' href='/recent'>Changes</a></li> <li><a rel='nofollow' href='/_random'>Random page</a></li> <li><a rel='nofollow' href='/_new'>New page</a></li> </ul> </li> </ul> </div> <div class='collapse navbar-collapse' id='myNavbar'> <ul class='nav navbar-nav'> <li class='dropdown' id='li_idPageEdit' style='display:none'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span id=name_idPageEdit>Page</span><span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a rel='nofollow' href='/_edit/Scrollutil?A=1'>Comment</a></li> <li><a rel='nofollow' hidden='true' href='/_edit/Scrollutil'>Edit</a></li> <li><a rel='nofollow' href='/_upload/Scrollutil'>Upload</a></li> <li><a rel='nofollow' href='/ref/Scrollutil'>References</a></li> <li><a rel='nofollow' href='/history/Scrollutil'>History</a></li> <li><hr></li> <li><a href='#4e82ae4d7313f6b462c5668bc96244d52a154a9aca8dbc170f115584a898f0bc'> Attributes </a> </li> <li><a href='#47742718299e82699bc374b81e6ab6b22c2b19c674703379e03143e714e9e3c1'> Description </a> </li> </ul> </li> <li class='dropdown' id='li_idPageNoEdit' style='display:none'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span id=name_idPageNoEdit>Page</span><span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a rel='nofollow' href='/ref/Scrollutil'>References</a></li> <li><a rel='nofollow' href='/history/Scrollutil'>History</a></li> <li><hr></li> <li><a href='#4e82ae4d7313f6b462c5668bc96244d52a154a9aca8dbc170f115584a898f0bc'> Attributes </a> </li> <li><a href='#47742718299e82699bc374b81e6ab6b22c2b19c674703379e03143e714e9e3c1'> Description </a> </li> </ul> </li> <li><a href="/page/Showcase">Showcase</a></li> <li><a href="/page/Tcl+Tutorial+Lesson+0">Tutorial</a></li> <li><a href="/page/Articles">Articles</a></li> <li><a href="/page/Tcl+Playground">Playground</a></li> <li class='dropdown'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'> Help<span class='caret'></span></a> <ul class='dropdown-menu scrollable-menu' role='menu'><li><a rel='nofollow' href='/page/Help'>Page Markup</a></li> <li><a rel='nofollow' href='/page/How+do+Wiki+Categories+work'>Wiki Categories</a></li> <li><a rel='nofollow' href='/page/Contents'>Topics</a></li> <li><a rel='nofollow' target='_blank' href='https://chiselapp.com/user/stevel/repository/nikit/ticket'>Report Problems</a></li> <li><a rel='nofollow' href='/privacy'>Privacy</a></li> <li><a rel='nofollow' href='/license'>License</a></li> </ul> </li> </ul> <ul class='nav navbar-nav navbar-right'> <li class='dropdown'> <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span id=name_SMenu>User</span><span class='caret'></span></a> <ul class='dropdown-menu' id='ul_SMenu'> </ul> </li> </ul> <form class='navbar-form navbar-right' method='post' action='/search' id='searchform'> <input name='Q' type='text' class='form-control' placeholder='Search...'/> <input type="hidden" name="sites" value="wiki.tcl-lang.org"/> </form> </div> </div> </nav> <div class='container'> <div class='row'> <div class='col-xs-12'> <h2>Scrollutil</h2> </div> </div> <div class='row'> <div class='col-xs-12'> <p class='mkup_p'><b class='mkup_b'><a rel='nofollow' class='mkup_a' href='https://www.nemethi.de/'>Scrollutil <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a></b>, by <a class='mkup_a mkup_known' href='/page/Csaba+Nemethi'>Csaba Nemethi</a>, is a scrolling utilities package for <a class='mkup_a mkup_known' href='/page/Tk'>Tk</a> 8.0 or higher, written in pure Tcl code.</p> <h2 id='4e82ae4d7313f6b462c5668bc96244d52a154a9aca8dbc170f115584a898f0bc' class='mkup_h1'> Attributes </h2><dl class='mkup_dl'><dt class='mkup_dt'>name</dt><dd class='mkup_dd'>Scrollutil</dd></dl><dl class='mkup_dl'><dt class='mkup_dt'>location</dt><dd class='mkup_dd'><a rel='nofollow' class='mkup_a' href='https://www.nemethi.de'>https://www.nemethi.de <span class='glyphicon glyphicon-globe' aria-hidden='true'></span></a></dd></dl><dl class='mkup_dl'><dt class='mkup_dt'>latest release</dt><dd class='mkup_dd'>2.5</dd></dl><dl class='mkup_dl'><dt class='mkup_dt'>release time</dt><dd class='mkup_dd'>2025-03</dd></dl><dl class='mkup_dl'><dt class='mkup_dt'>contact</dt><dd class='mkup_dd'><a class='mkup_a mkup_known' href='/page/Csaba+Nemethi'>Csaba Nemethi</a></dd></dl> <h2 id='47742718299e82699bc374b81e6ab6b22c2b19c674703379e03143e714e9e3c1' class='mkup_h1'> Description </h2><p class='mkup_p'>The Scrollutil package contains:</p><UL class='mkup_UL'><li class='mkup_li'>the implementation of the <b class='mkup_b'>scrollarea</b>, <b class='mkup_b'>scrollsync</b>, <b class='mkup_b'>scrollableframe</b>, <b class='mkup_b'>scrollednotebook</b>, <b class='mkup_b'>plainnotebook</b>, and <b class='mkup_b'>pagesman</b> mega-widgets, including a general utility module for mega-widgets;</li><li class='mkup_li'>the command <span class='mkup_tt'><b class='mkup_b'>scrollutil::addMouseWheelSupport</b></span>, which creates mouse wheel event bindings for a given binding tag;</li><li class='mkup_li'>commands for <i class='mkup_i'>user-friendly</i> mouse wheel event handling in <b class='mkup_b'>scrollable widget containers</b> like scrollutil::scrollableframe, BWidget ScrollableFrame, and iwidgets::scrolledframe;</li><li class='mkup_li'>demo scripts illustrating the use of the Scrollutil package in connection with various scrollable widgets and the above-mentioned scrollable widget containers;</li><li class='mkup_li'>demo scripts illustrating the use of the scrollednotebook, plainnotebook, and pagesman widgets;</li><li class='mkup_li'>a programmer's guide and reference pages in HTML format.</li></UL><p class='mkup_p'><b class='mkup_b'>The scrollutil::scrollarea mega-widget</b> greatly simplifies the creation of arbitrary scrolled widgets. It consists of a scrollable widget and two scrollbars connected with that widget. The display mode of each scrollbar can be <span class='mkup_tt'><b class='mkup_b'>static</b></span>, <span class='mkup_tt'><b class='mkup_b'>dynamic</b></span>, or <span class='mkup_tt'><b class='mkup_b'>none</b></span>.</p><p class='mkup_p'><b class='mkup_b'>The scrollutil::scrollsync mega-widget</b> is designed for scrolling several widgets simultaneously. It is horizontally and vertically scrollable, hence it can be embedded into a scrollutil::scrollarea widget via the latter's <span class='mkup_tt'><b class='mkup_b'>setwidget</b></span> subcommand.</p><p class='mkup_p'><b class='mkup_b'>The scrollutil::scrollableframe mega-widget</b> is a lightweight, theme-able, and full-featured replacement for BWidget ScrollableFrame and iwidgets::scrolledframe. Arbitrary regions of its content frame can be brought into view by scrolling, and the widget also provides a <span class='mkup_tt'><b class='mkup_b'>see</b></span> subcommand for making individual widgets contained in the content frame visible in the scrollableframe window.</p><p class='mkup_p'><b class='mkup_b'>The scrollutil::scrollednotebook mega-widget</b> is based on a ttk::notebook within a scrollableframe and supports an arbitrary number of unsqueezed tabs. The package also implements the navigation between the tabs of a ttk::notebook or scrollednotebook widget via the mouse wheel, as well as the support for moving the tabs with the mouse and closing them with the aid of the new <span class='mkup_tt'><b class='mkup_b'>closetab</b></span> style element.</p><p class='mkup_p'><b class='mkup_b'>The scrollutil::plainnotebook mega-widget</b> extends a ttk::notebook having an arbitrary number of pages with invisible tabs by a ttk::frame to its left or right containing, among others, a scrollableframe whose content frame is the parent of a series of widgets that play the role of vertically laid-out notebook tabs.</p><p class='mkup_p'><b class='mkup_b'>The scrollutil::pagesman mega-widget</b> provides the basic functionality of a pages manager, meaning that it manages a list of windows, of which only one is visible at a time. By using it with plainnotebook widgets as pages, it is quite easy to write applications in which the user can navigate between the plainnotebooks with a single mouse click.</p><p class='mkup_p'><b class='mkup_b'>The commands for mouse wheel event handling in scrollable widget containers</b> make sure that the mouse wheel events will only scroll the widget under the pointer if it has the focus, otherwise they will scroll the widget container that is an ancestor of the widget in question and is contained in the latter's toplevel.</p><hr class='mkup_hr'><p class='mkup_p'><a class='mkup_a mkup_known' href='/page/Jeff+Smith'>Jeff Smith</a> 2025-03-28 : Below is an online demo using <a class='mkup_a mkup_known' href='/page/CloudTk'>CloudTk</a>. This demo runs "Scrollutil" in an Alpine Linux Docker Container. It is a 29.9MB image which is made up of Alpine Linux + tclkit + Scrollutil2.5.kit + libx11 + libxft + fontconfig + ttf-linux-libertine. It is run under a user account in the Container. The Container is restrictive with permissions for "Other" removed for "execute" and "read" for certain directories. </p><p class='mkup_p'><a class='mkup_a mkup_known' href='/page/Jeff+Smith'>Jeff Smith</a> 2025-03-28 : This demo now runs with Tcl9.</p><p class='mkup_p'>By clicking on the "V" in the upper left corner you can access other demos. </p> <iframe height="750" width="600" src="https://cloudtk-app.tcl-lang.org/cloudtk/VNC?session=new&Tk=Scrollutil" allowfullscreen></iframe> <p class='mkup_p'><a class='mkup_a mkup_known' href='/page/Csaba+Nemethi'>Csaba Nemethi</a> 2020-01-15 : The Scrollutil version installed on the CloudTk server is now 1.4 (many thanks to Jeff for the upgrade). This version creates mouse wheel event bindings for the ttk::scrollbar widget, which (as of Tk 8.6.10) are missing in the Tk core. The demo script applies the command <span class='mkup_tt'><b class='mkup_b'>scrollutil::addMouseWheelSupport</b></span> to the text widget, thus making sure that the mouse wheel scrolls the text by lines rather than pixels. Last but not least, the scan support (added to the scrollutil::scrollableframe widget in Scrollutil 1.3) enables you to drag the content of the scrollableframe at high speed with the aid of mouse button 1.</p><p class='mkup_p'><a class='mkup_a mkup_known' href='/page/Jeff+Smith'>Jeff Smith</a> 2025-03-28 : The Scrollutil version installed on the CloudTk server is now 2.5.</p><hr><div class='mkup_centered'><table class='mkup_categories'><tr><td class='mkup_td'><a class='mkup_a' href='/page/Category+TK'>Category TK</a></td><td class='mkup_td'><a class='mkup_a' href='/page/Category+Package'>Category Package</a></td></tr></table></div> </div> </div> <div class='row'> <div class='col-xs-12'> <div class='Footer'>Updated 2025-03-30 02:30:31</div> </div> </div> </div> <!-- jQuery library --> <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.0/js/jquery.tablesorter.combined.js'></script> <!-- Latest compiled JavaScript --> <script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'></script> <script type='text/javascript' src='/scripts/nikit.js'></script> <script type='text/javascript' src='/scripts/sh_main.js'></script> <script type='text/javascript' src='/scripts/sh_tcl.js'></script> <script type='text/javascript' src='/scripts/sh_c.js'></script> <script type='text/javascript' src='/scripts/sh_cpp.js'></script> <!-- <script src='https://www.google.com/recaptcha/api.js'></script> --> <script src='https://hcaptcha.com/1/api.js'></script> <script>var clipboard = new ClipboardJS('.copybtn', { text: function(trigger) { return document.querySelector(trigger.getAttribute('data-clipboard-target')).textContent + '\n'; } }); sort_tables(); </script> </body> </html>