dionel1969 Posted August 9, 2011 Share Posted August 9, 2011 I have a form with 5 Edits and 1 DBGrid. The property of TabStop of first 3 Edits and the DBGrid is off, because I need that the user navigate only with Tab or Enter key through the last two Edits, and when the user clicks on the DBGrid it will be selected. Any way when the user exit from last edit the dbgrid become selected. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 10, 2011 Administrators Share Posted August 10, 2011 Tab navigation is handled by browser and the only control we have over it is changing the order of tabbing. Link to comment Share on other sites More sharing options...
dionel1969 Posted August 10, 2011 Author Share Posted August 10, 2011 Tab navigation is handled by browser and the only control we have over it is changing the order of tabbing. It means that the TabStop property does not work in web mode???? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 10, 2011 Administrators Share Posted August 10, 2011 It means that the TabStop property does not work in web mode???? You can say that. Currently we can't prevent browser from tabbing thru visual elements until we implement our own special tab key handler which is planned but not for a near future. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 10, 2011 Administrators Share Posted August 10, 2011 You can try applying same logic we used for up/down key. See below example: http://forums.unigui.com/index.php?/topic/1133-version-0860/page__view__findpost__p__3777 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 10, 2011 Administrators Share Posted August 10, 2011 Something like this: function doNextTab(sender, e) { var c=null; var a=e.getCharCode(); if (a==9) { c=sender.nextSibling(); while (c && !c.events['keypress']) { c=c.nextSibling(); } } if (c) c.focus(); } For each Editable Control add below to OnKeyPress client event: function OnKeypress(sender, e) { doNextTab(sender, e); } Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 10, 2011 Administrators Share Posted August 10, 2011 and add below to MainForm.Scripts: if (typeof window.event != 'undefined') { /* IE */ document.onkeydown = function() /* IE */ { var kc=event.keyCode; return (kc != 9); } } else { document.onkeypress = function(e) /* FireFox/Others */ { var kc=e.keyCode; return (kc != 9); } } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now