Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Label control
Message
From
08/07/2001 18:31:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00527963
Message ID:
00527967
Views:
38
This message has been marked as the solution to the initial question of the thread.
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
Map
View

Click here to load this message in the networking platform