Mega Code Archive

 
Categories / Delphi / VCL
 

Using ampersands inside delphi

Question: How can I make a Window control's text property contain an ampersand character? Answer: Use two ampersand characters. The Windows default text handling for controls interprets a single Ampersand character as meaning the next character is a hot key. Example: Button1.Caption := 'This && That';