initial checkin
[org.ibex.widgets.git] / src / org / ibex / theme / win2k / scrollpane.t
1 <!-- Copyleft 2004 - see COPYING for details [LGPL] -->
2
3 <ibex xmlns:lib="ibex.lib" xmlns="ibex.widget">
4     <meta:doc>
5         Author: Charles Goodwin
6     </meta:doc>
7
8     <lib:scrollpane redirect="$content">
9
10         th_hscroll = $hscroll;
11         th_vscroll = $vscroll;
12         th_viewport = $view;
13
14         $hscroll.SizeChange ++= function(v) { $inset.height = $hscroll.height; }
15         $vscroll.SizeChange ++= function(v) { $inset.width = $vscroll.width; }
16
17         orient ++= function(v) {
18             if (v == "horizontal") { hshrink = false; vshrink = true; }
19             else if (v == "vertical") { hshrink = true; vshrink = false; }
20         }
21
22         <bevel form="down"> 
23             <ui:box rows="2">
24                 <ui:box id="view">
25                     <ui:box id="content" align="topleft" packed="false" shrink="true" />
26                 </ui:box>
27                 <scrollbar id="hscroll" orient="horizontal" />
28                 <scrollbar id="vscroll" orient="vertical" />
29                 <ui:box id="inset" />
30             </ui:box>
31         </bevel>
32     </lib:scrollpane>
33 </ibex>