![]() |
![]() ![]() ![]() |
acEdit, acNumberEdit, acIPEdit, acLabeledComboBox, acMRUComboBox and acImagesComboBox components as subproperty of AttachedLabel structure.
|
property ShowAccelChar: Boolean;
|
The ShowAccelChar property determines how an ampersand in the label text is displayed.
|
|
Set ShowAccelChar to True to allow the label to display an underlined accelerator key value. When ShowAccelChar is True, any character preceded by an ampersand (&) appears underlined. To display an ampersand when ShowAccelChar is True, use two ampersands (&&) to stand for the single ampersand that is displayed.
|
|
Set ShowAccelChar to False to display the label text with all ampersands appearing as ampersands.
|
This example uses two labels on a form. The first label has a caption with an accelerator character in it. The second label also includes an ampersand, but it does not appear as an accelerator character.
|
|
procedure TForm1.FormCreate(Sender: TObject);
|
begin
|
Label1.ShowAccelChar := True;
|
Label1.Caption := 'An &Underlined character appears here';
|
Label2.ShowAccelChar := False;
|
Label2.Caption := 'An ampersand (&) appears here';
|
end;
|
Caption property.
|