initial checkin
[org.ibex.widgets.git] / src / ibex / widget / scrollbar.t
1 <!-- Copyleft 2004 - see COPYING for details [LGPL] -->
2
3 <ibex xmlns:theme="org.ibex.theme.win2k">
4     <meta:doc>
5         <name>Scrollbar</name>
6         <desc>A scrollbar widget, commonly found in scrollpanes</desc>
7         <usage>
8             Put to the text property of a button for a basic label,
9             or simply wrap the button around more complex content
10         </usage>
11     </meta:doc>
12
13     <theme:redirect />
14     <theme:margin redirect="null" orient="horizontal">
15         <theme:scrollbar id="widget">
16             ibex..org.ibex.theme.win2k.polarizable(thisbox);
17         </theme:scrollbar>
18
19         // glue code
20
21         redirectTo($widget, "orient", "slave");
22
23         if ($widget.margin) thisbox.margin = $widget.margin;
24         if ($widget.padding) $content.padding = $widget.padding;
25
26         //var shrfun = function(v) { ibex.log.info(trapname); }
27         //$widget.shrink ++= shrfun;
28         //$widget.hshrink ++= shrfun;
29         //$widget.vshrink ++= shrfun;
30
31         $widget.SizeChange ++= function(v) { thisbox.hshrink = $widget.hshrink; thisbox.vshrink = $widget.vshrink; }
32  
33     </theme:margin>
34 </ibex>