Tk Library Source Code
Artifact [123cb22468]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

Artifact 123cb22468b4b31d846cb36c4298a57470fc1b5a:



<html><head>
<title>autoscroll - Automatic mapping of scrollbars</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.toc,UL.toc UL, UL.toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.section, LI.subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.requirements LI, UL.syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'autoscroll.man' by tcllib/doctools with format 'html'
   -->
<! -- CVS: $Id$ autoscroll.n
   -->
<body><div class="doctools">
<hr> [
   <a href="../../../../../../../../home">Tklib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<h1 class="title">autoscroll(n) 1.1 tklib &quot;Automatic mapping of scrollbars&quot;</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>autoscroll - Provides for a scrollbar to automatically mapped and unmapped as needed</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">autoscroll <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="syntax">
<li><a href="#1"><b class="cmd">::autoscroll::autoscroll</b> <i class="arg">scrollbar</i></a></li>
<li><a href="#2"><b class="cmd">::autoscroll::unautoscroll</b> <i class="arg">scrollbar</i></a></li>
<li><a href="#3"><b class="cmd">::autoscroll::wrap</b></a></li>
<li><a href="#4"><b class="cmd">::autoscroll::unwrap</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>This package allows scrollbars to be mapped and
unmapped as needed depending on the size and
content of the scrollbars scrolled widget. The
scrollbar must be managed by either pack or grid,
other geometry managers are not supported.</p>
<p>When managed by pack, any geometry changes made in the
scrollbars parent between the time a scrollbar is
unmapped, and when it is mapped will be lost. It is
an error to destroy any of the scrollbars siblings while the
scrollbar is unmapped. When 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.</p>
<p>This package may be used on any scrollbar-like widget
as long as it supports the <b class="const">set</b> subcommand in the same
style as scrollbar. If the <b class="const">set</b> subcommand is not used
then this package will have no effect.</p>
<dl class="definitions">
<dt><a name="1"><b class="cmd">::autoscroll::autoscroll</b> <i class="arg">scrollbar</i></a></dt>
<dd><p>Arranges for the already existing scrollbar <b class="const">scrollbar</b>
to be mapped and unmapped as needed.</p></dd>
<dt><a name="2"><b class="cmd">::autoscroll::unautoscroll</b> <i class="arg">scrollbar</i></a></dt>
<dd><p>Returns the named scrollbar to its original static state.</p></dd>
<dt><a name="3"><b class="cmd">::autoscroll::wrap</b></a></dt>
<dd><p>Arranges for all scrollbars created after this command is run
to be automatically mapped and unmapped as needed.</p></dd>
<dt><a name="4"><b class="cmd">::autoscroll::unwrap</b></a></dt>
<dd><p>Turns off the automatic autoscrolling of all new scrollbars.
Does not effect existing scrollbars</p></dd>
</dl>
<pre class="example">
text .t -yscrollcommand &quot;.scrolly set&quot;
scrollbar .scrolly -orient v -command &quot;.t yview&quot;
pack .scrolly -side right -fill y
pack .t -side left -fill both -expand 1
::autoscroll::autoscroll .scrolly
</pre>
</div>
<div id="section2" class="section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>autoscroll</em> of the
<a href="http://core.tcl.tk/tklib/reportlist">Tklib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key99">scroll</a>, <a href="../../../../index.html#key98">scrollbar</a></p>
</div>
</div></body></html>