Advertisement
5_2007-2008 Miscellaneous #172590

Scroll a larger PictureBox inside a smaller one

This class module, complete with demo project, will allow you to easily scroll a large picture box inside a much smaller one. This can be extremely useful when space is something you have little of.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Using JavaScript, you can very easily make content expand and contact, like with 
a folding tree. The key is the CSS property "display." I use it below to create 
a header that expands/contacts when clicked on: </p>
<pre>&lt;script type=&quot;text/javascript&quot;&gt;
function foldinout(theid){
var theid=document.getElementById(theid)
theid.style.display=(theid.style.display==&quot;block&quot;)? &quot;none&quot; : &quot;block&quot;
}
&lt;/script&gt;
&lt;div onClick=&quot;foldinout('thelinks')&quot;&gt;&lt;b&gt;Categories&lt;/b&gt;&lt;/div&gt;
&lt;div id=&quot;thelinks&quot; style=&quot;display:block&quot;&gt;
-Games
-Entertainment
-Movies
&lt;/div&gt;</pre>
<p>I love this &quot;Switch Menu&quot; script from Dynamic Drive, which makes excellent 
use of this idea: http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm</p>
Original Comments (3)
Recovered from Wayback Machine