Solved

Focus Porblem using Tab Key and Tab+Shift Key in a Custom Control

Posted on 2007-04-02
2
317 Views
Last Modified: 2008-02-01
Hello,
 
I have created a custom control in visual studio 2005 containing/embedding two child button controls inside it, when i reference this control in my testing page and create two to three instances of that custom control it works well and custom controls are created, now when i use Tab Key from Keyboard to move focus between custom controls, it works well and focus shifts back and forth with Tab key Tab+Shif keys.
Now my problem is that i want when focus comes on some custom control then that custom control's first child control should get focus and selected and when again i press Tab key then it should shift to next custom control not to the second child control of that custom control whom first child control is selected. Also when the focus is on some custom control or some of its child control, when i press Shift+Tab key it should move to previous custom control and its first child control should be selected.
 
Please some body help me in this problem?
 
urgently.
 
 
 
0
Comment
Question by:imrancs
2 Comments
 
LVL 7

Expert Comment

by:whityum
Comment Utility
does setting TabIndex=X on the button controls solve the problem?  

If not, you will need to add complex custom javascript created at run time to set the tab order.
0
 
LVL 5

Accepted Solution

by:
Qaiser_Mehmood_Mughal earned 500 total points
Comment Utility
This code will capture the Shift+Tab Event both in Mozila / IE

<script LANGUAGE="JavaScript1.2">
function IEKeyCap(e)
{
    var evtobj=window.event? event : e
    var unicode=evtobj.keyCode? evtobj.keyCode : evtobj.charCode
    //alert(evtobj.altKey);
    if (evtobj.altKey)
    {
         if (unicode == 9)
           {alert('That\'s the Tab key')};
    }
     
}


</script>

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now