?
Solved

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

Posted on 2007-04-02
2
Medium Priority
?
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Expert Comment

by:whityum
ID: 18836657
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 2000 total points
ID: 18842106
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month12 days, 11 hours left to enroll

777 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