Label / TextBox Hot Keys

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to write a C# program that will allow the user to navigate to
different text boxes using Hot Keys (ie Alt+P). I also want to have the
label for the text box display the hot key for the associated text box. I
know how to do that, I just don't know how to associate the Hot Key with
getting the appropriate text box to focus.
 
As long as the TabIndex property of labels and textboxes is correct, Windows
provides that mechanism automatically. That is, if you have:

Label1, "&My textbox", TabIndex = 0
TextBox1, TabIndex = 1

Then pressing Alt+M moves the focus to the next control of Label1 which is
TextBox1, since Label1 can not receive it.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
 
Back
Top