Mega Code Archive

 
Categories / Delphi / Strings
 

Buttons with wrapped text - use a tbitbtn

Besides using a TButton with an embedded TLabel, you can simply use a TBitBtn to display wrapped text. This can be achieved by either of the following ways: Select 'view form as text' (Alt-F12) and change the TBitBtn caption to Caption = 'wrapped'#10'here'#10'and there' then 'view as form' again Caution: a few mistypes and have strange consequences here: DO NOT change names or cutnpaste new objects, modify only those already created In startup code (.FormCreate()) set caption to 'Hello' + #10 + 'World'; If you copy a LF(#10) to clipboard you can paste (shift-insert) it into the TBitBtn caption to get the multiline text at design time CR doesn't work for this nor does alt-013 or alt-010 :-( this at least allows captioning.