J
Joseph Geretz
Don't get me wrong - I'm a fan of .NET; I am enthusiastic about the richness
and elegance of the environment. However, richness and elegance should be
dedicated toward making development easier for developers, not more
difficult. In many ways this goal is achieved. However, I've run up against
one particular area of development, where what should be a trivial excercise
is turning out to be much more difficult than it should be. I'm trying to
devleop a user control which will act as the container for other controls.
Why do I think this should be easy? Well, it used to be very easy. In VB6
all we'd need to do is set the UserControl's ControlContainer property to
True. Done.
In .NET it doesn't seem that it should be any more difficult. The following
creates a user control onto which I can drop other controls when I'm working
with this control in another project.
[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public partial class SRSPanel : UserControl
{
OK, that works as far as it goes, however, at run time I'm experiencing a
problem which is an absolute show-stopper to my implementation. When focus
is on the last control contained within my control, and the Tab key is
pressed, focus does not move to the next control in the tab order on the
current form. Rather, a beep is issued and the cursor remains where it is.
1. Why does this happen?
2. How do I handle this?
Has anyone created a control container in .NET? Have you seen this problem?
How do you handle this?
Thanks very much for your help!
- Joseph Geretz -
and elegance of the environment. However, richness and elegance should be
dedicated toward making development easier for developers, not more
difficult. In many ways this goal is achieved. However, I've run up against
one particular area of development, where what should be a trivial excercise
is turning out to be much more difficult than it should be. I'm trying to
devleop a user control which will act as the container for other controls.
Why do I think this should be easy? Well, it used to be very easy. In VB6
all we'd need to do is set the UserControl's ControlContainer property to
True. Done.
In .NET it doesn't seem that it should be any more difficult. The following
creates a user control onto which I can drop other controls when I'm working
with this control in another project.
[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public partial class SRSPanel : UserControl
{
OK, that works as far as it goes, however, at run time I'm experiencing a
problem which is an absolute show-stopper to my implementation. When focus
is on the last control contained within my control, and the Tab key is
pressed, focus does not move to the next control in the tab order on the
current form. Rather, a beep is issued and the cursor remains where it is.
1. Why does this happen?
2. How do I handle this?
Has anyone created a control container in .NET? Have you seen this problem?
How do you handle this?
Thanks very much for your help!
- Joseph Geretz -