The Underscore *will* serve as a shortcut key, if you set the FocusControl property to the control you want it to activate.
Main Topics
Browse All TopicsDear Experts,
I am using TLabel components as buttons on an application that uses allot of graphics as part of the interface.
This interface does limit me because I can not for example set a label's caption:
"&Ok" and the underscore "O" will serve as a shortcut key.
1) How can I implement this functionality with using TLabel components.
Please note that I would prefer to get a way of working WITH the TLabel components
as I my entire application is completed and to change all the buttons will be allot of work.
2) Maybe if there are freeware components that can assist with this task I would be glad to hear of them.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
In that case, you should use buttons. Download and install GExperts http://gexperts.org/
Once installed, there is an IDE add-on to Replace Components, so you can essentially replace all your Labels with Buttons.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
// added manually
TLabel = class(StdCtrls.TLabel)
protected procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR;
end;
TForm1 = class(TForm)
Label1: TLabel;
procedure Label1Click(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
// added manually
procedure TLabel.CMDialogChar(var Message: TCMDialogChar);
begin
Click;
end;
// default onClick event
procedure TForm1.Label1Click(Sender:
begin
ShowMessage('blah');
end;
end.
Business Accounts
Answer for Membership
by: BlackTigerXPosted on 2006-05-03 at 13:28:03ID: 16600046
you want to know of freeware components to do the job, but you don't want to replace your labels with buttons?