I'm trying to assign a shortkey to a text box via a label control adjacent to the text box, but I dont know how link the label to the box. Any suggestions?
How do I assign shortkeys to text boxes?
Collapse
X
-
your idea is not clear.
I worked on VB around 2 years ago. Cant recall much.
But I think Label do not receive any Focus. So I think that this is not possible.
or did you mean you want to assign value of certain text field to label field after pressing certain key while that text box is focused? it is possible Try OnKeyPress or onKeyDown or OnKeyUp action. Do two thing first set the text(text) to label(caption) and then set the value of keycode to zero. It will do -
The Label MUST have the TabIndex Property set to TextBox's TabIndex Property - 1
Example: If TextBox's TabIndex = 2 then Label's TabIndex must be = 1Comment
Comment