textbox focus

Z

zdavid

Hi,

I have a dialog box with a multiline textbox and three buttons. The
obvious thing I'm suffering with is how to give focus to the textbox,
so that when the dialogbox pops up, the user could immediately start
typing without having to click in the textbox.
I tried textBox.Focus(), textBox.SelectAll() with no success... The
tabindex of the textbox is set to 0, which should mean that the
textbox would have the focus when the dialogbox is shown....But it
isn't focused.

Any ideas?
 
M

Morten Wennevik

Are you using a groupbox? If the textbox is inside you need to set focus
to the groupbox first, then the textbox.
 

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