Set Focus to a ToolStripTextBox

G

Guest

Upon the load of my form, I would like the cursor to be in a textbox within a
toolstrip. Does anyone know if this is possibe? I've tried putting the
following code in both the Form_Activate and Form_Load events:

ToolStripTextBox1.Focus()
ToolStripTextBox1.Select()
ToolStripTextBox1.SelactAll()

None of these cause an error, but none of them work. Any ideas appreciated.
 
A

AlexS

Most probably you need to activate and focus toolstrip itself before you
can focus contained controls.

Just a guess though
 

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