Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop Delphi processing the prefix "&" character in some control captions?

I found that if I set the Caption of TPanel, TLabel or TRadioGroup with a string containing "&" character, it is not displayed and the next character is underlined. How can I stop this? I want the caption to be displayed with the exact string I set.

like image 911
Marus Gradinaru Avatar asked Oct 20 '25 20:10

Marus Gradinaru


1 Answers

For TLabel and TStaticText, set ShowAccelChar property to False (default is True). For TPanel, TRadioGroup etc you need to use double ampersand.

You may also want to take a look in help for TLabel.ShowAccelChar, for a description how TLabel.ShowAccelChar and TLabel.FocusControl are related.

like image 129
Tom Brunberg Avatar answered Oct 23 '25 20:10

Tom Brunberg