Revision: 4161
          http://vexi.svn.sourceforge.net/vexi/?rev=4161&view=rev
Author:   clrg
Date:     2011-06-24 16:12:27 +0000 (Fri, 24 Jun 2011)

Log Message:
-----------
Feature: hidetabs - set to 'true' on tabpane to hide the tabs when there is 
only 1 tab available

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/tabpane.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/tabpane.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/tabpane.t  
2011-06-24 16:11:41 UTC (rev 4160)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/tabpane.t  
2011-06-24 16:12:27 UTC (rev 4161)
@@ -11,6 +11,7 @@
     <ui:box>
         
         thisbox.closeable = false;
+        thisbox.hidetabs = false;
         thisbox.maxtabsize = 0;
         thisbox.shrinktabs = true;
         thisbox.displayclose = false;

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t       
2011-06-24 16:11:41 UTC (rev 4160)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t       
2011-06-24 16:12:27 UTC (rev 4161)
@@ -30,6 +30,16 @@
         thisbox.th_prev = $prev;
         thisbox.th_tablist = $tablist;
         
+        var hideTabsTrap = function(v) {
+            cascade = v;
+            var hide = 1 >= v_content.numchildren;
+            $wrap.display = !hide;
+            $content.y = hide ? 0 : $head.height - 2;
+        }
+        
+        thisbox.hidetabs ++= hideTabsTrap;
+        v_container ++= function(v) { cascade = v; v_content.Children ++= 
hideTabsTrap; }
+        
         /** support variable tab height */
         $head.height ++= function(v) {
             $wrap.height = v;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to