General information
Category:
Coding, syntax & commands
Bob-
>I have a few labels, I use as buttons. I set the captions, and in the click event I put some code, to launch code.
>
>the captions, I just added a \< to enable hot keys. I can hot key to the label, (the color changes, a little,) but to actually get it to do anything I have to use the mouse click.
Right. Label's don't get focus. The reason we put accelerator keys on labels is because when the keystroke fires, since the label can't get focus, the next control in the tab order receives the focus.
>Since there is not a keypress method on the label control ... and I have not found a way to put one there. I am stuck.
I think Iain's suggestion is the correct one for you.
>But I find it strange you can hot key to a label.caption, but can't get it to activiate the click method.
It has to be this way. Since we really want an accelerator key to work on control that can do things, and since those controls don't have captions that the user can see, we need the two elements.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only