Revision: 2290 http://vexi.svn.sourceforge.net/vexi/?rev=2290&view=rev Author: clrg Date: 2007-09-20 14:14:14 -0700 (Thu, 20 Sep 2007)
Log Message: ----------- Fix tab focusing on Press1 Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tab.t Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tab.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tab.t 2007-09-20 21:00:00 UTC (rev 2289) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/tab.t 2007-09-20 21:14:14 UTC (rev 2290) @@ -7,32 +7,42 @@ <clickable /> <selectable /> + <focusable /> + <tooltipable /> <ui:box> - thisbox.KeyPressed ++= static.keypressFunc; + thisbox.focusable ++= static.focusableRead; + thisbox.KeyPressed ++= static.keypressWrite; + thisbox.Press1 ++= static.pressWrite; </ui:box> /** keyboard navigation of tabs */ - static.keypressFunc = function(v) - { - if (v=="left" || v=="up") - { + static.keypressWrite = function(v) { + if (v=="left" || v=="up") { var ps = trapee.prevselect; - if (ps) - { + if (ps) { ps.selected = true; ps.focused = true; } - } - else if (v=="right" or v=="down") - { + } else if (v=="right" or v=="down") { var ns = trapee.nextselect; - if (ns) - { + if (ns) { ns.selected = true; ns.focused = true; } - } - else cascade = v; + } else cascade = v; } + // this is all to do with focusing on press + + var forcefocusable = false; + static.focusableRead = function() { + return forcefocusable or cascade; + } + + static.pressWrite = function(v) { + forcefocusable = true; + cascade = v; + forcefocusable = false; + } + </vexi> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn