|
-
Jan 30th, 2006, 02:00 AM
#12
Re: Do panels mess up Focus for other controls?
 Originally Posted by Mike Hildner
Urgh. Have you tried this? I don't think you understand the issue. Whenever I click on a control that's within some container, the tab order business works just fine. The real issue is resetting which container control is the first tab.
Mike
The first one would be all zeros.
So your treeview would be the first tab. If you want to reset it, then simply changed the TabIndex property of it. If you have controls on other containers (like a panel), then they automatically have a higher base index, sort to speak.
Let's say you have the following:

The first textbox is on a panel. Then the center textbox is by itself with the buttons on its own panel.
Right now, the first textbox will get focus.
If I want to change it so the button first gets focus, I can't change it's TabIndex to be 0 because it's already 0. I have to change the panel's tabindex that contains the button (which is 2, hence the "2.0" and "2.1" over the buttons). If I change that panel to 0, then I can change the order in which things happen and now the button becomes first:

I hope I explained that right.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|