Unable to set focus of a textbox inside a groupbox

E

Emma Middlebrook

Hi,

I am having great difficulty in setting focus to a textbox that is
inside a groupbox, why is that?

I have checked and the textbox.CanFocus returns false.... I can set the
focus to the groupbox but that doesn't help me because I still then
have to tab to the text box.

Can anyone suggest a solution, this is just a simple modal dialog in
C#.?

Thanks,

Emma
 
G

Guest

You may be using the wrong container control for your purpose. Try using a
panel control.

Jerry
 
E

Emma Middlebrook

Hi Jerry,

Thanks for the reply, sorry it has taken so long to get back to you. I
was using the group box because I wanted these particular controls to
be grouped and I also wanted to show that in the UI by having some text
in the outline.

What I have is a combo box that holds category names. I then had a
group box that housed the controls to edit a category so I displayed
"Details" in the group box text area. When the user edits a category, I
just wanted to place the focus/input cursor at the first control in the
details group box to make editing easier, instead of having them have
to tab to the details area.. Do you think this is not possible with a
group box?

Thanks,

Emma
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top