tags:

views:

173

answers:

1

I have a project that uses a series of auto-generated user control instances. The user-control itself exists, but I populate a panel with a series of these user controls, one for each item in my collection.

Each user control displays a ton of information, but only ONE text field is editable. All of the other fields have TabStop set to false, and are marked as ReadOnly.

The tab order of each user control is set at the time it is created so that the tab-key goes from one field to the next (or ... it's supposed to).

When I have TWO fields on my user control whose TabStop is set to true, everything works great. But if I only have ONE field whose TabStop is true, the tab key stops working, and I have to physically CLICK on the next user control for it to gain focus.

What's up? Has anyone else seen this behavior? Am I doing something stupid as usual?

A: 

If there's only one control whose TabStop is true, you wouldn't be cycling between anything.

Andy Mikula
Each user control (i.e. souped-up text box) has only one tabstop-ish item. But there are MANY souped-up text boxes on the form. I'm trying to tab from one box to the next.
Jerry
Oh, I see - in that case, the only thing I can think of is that maybe the TabIndex of each control is different? You should be able to ensure that the indexes of the controls are sequential. Best of luck!
Andy Mikula
Rather, that the TabIndex of each control is -not- different?
Andy Mikula
Yep. They're different. I force that at instantiation as well.
Jerry