Solved

C# Tabbing Between User Controls

Posted on 2007-03-20
8
1,122 Views
Last Modified: 2008-01-09
I have created a User Control with a label on it and a button next to the label.

I have then added the control to a form 4 times, one below the other and set the tab order up correctly.

When I load the form the focus is on the first User Control, however when I tab to go the the next control, nothing happens, any ideas?
0
Comment
Question by:CAMSYSTEMS
[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
8 Comments
 
LVL 3

Expert Comment

by:Kate12
ID: 18755774
Make sure that the TabStop of the usercontrol is set to true and the TabIndex is set to the ordinal you expect to follow during the tabbing.
0
 

Author Comment

by:CAMSYSTEMS
ID: 18755912
Yes they are definately setup correctly. Any other ideas?

P.S on the User Control there are other buttons that are not visible. However these buttons have tabstop set to false
0
 
LVL 13

Expert Comment

by:Webstorm
ID: 18755939
Hi CAMSYSTEMS,

Check the CanFocus property is set to true.

Also, you may want to transfer the focus to the button inside your user control. So you have to handle the user control's Focused event.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:Kate12
ID: 18755949
"the User Control there are other buttons that are not visible. However these buttons have tabstop set to false"
Definetly worth looking at it...
0
 

Author Comment

by:CAMSYSTEMS
ID: 18757253
I have found the reason for it.....

I am using the below override, which I need to use. It catches the Tab key press, however I need it to treat this as it normally would...

Any ideas???

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{

}
0
 

Author Comment

by:CAMSYSTEMS
ID: 18757491
Sorted.

If Key = Tab then return false, easy at that, what I nightmare I had!!!!

O well, hopefully it will help someone else in the future
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19090286
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 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