Science, Tech, Math › Computer Science Setting a Multi-Line Caption for a Tlabel (At Design-Time) Share Flipboard Email Print Geber86 / Getty Images Computer Science Delphi Programming Delphi Tutorials Advanced PHP Programming Perl Python Java Programming Javascript Programming C & C++ Programming Ruby Programming Visual Basic View More By Zarko Gajic Zarko Gajic Twitter Computer Science Expert MSCS, Computer Science, University of Osijek Zarko Gajic is experienced in SQL and has working knowledge of DB systems such as MS SQL Server, Firebird, Interbase, and Oracle. He is also proficient in XML, DHTML, and JavaScript. Learn about our Editorial Process Updated on March 18, 2019 A TLabel Delphi component has a WordWrap property you can set to true in order for the text in the Caption property appear wrapped (multi-lined) when it is too long for the width of the label. What's more, at run-time, you can use the next assignment to specify multiple lines of text for a Label: Label1.Caption := 'First line' + #13#10 + 'SecondLine'; However, you *cannot* specify multi-line text for a TLabel at design-time, using Object Inspector. Instructions One trick to add more lines of text for a Caption property of a TLabel, at design time, is to edit the Form's .DFM file directly. Here's how: Drop a TLabel on a Form Right click the Form to activate the popup menu Select "View As Text" Locate the "object Label1:TLabel" section Change the line "Caption = 'Label1'" to: Caption = 'Label1' + #13#10 + 'Second line' Right click the code to activate the popup, again Select "View As Form" Job done! TLabel with multiple lines of text, at design-time! Cite this Article Format mla apa chicago Your Citation Gajic, Zarko. "Setting a Multi-Line Caption for a Tlabel (At Design-Time)." ThoughtCo, Sep. 8, 2021, thoughtco.com/setting-multi-line-caption-for-tlabel-1057575. Gajic, Zarko. (2021, September 8). Setting a Multi-Line Caption for a Tlabel (At Design-Time). Retrieved from https://www.thoughtco.com/setting-multi-line-caption-for-tlabel-1057575 Gajic, Zarko. "Setting a Multi-Line Caption for a Tlabel (At Design-Time)." ThoughtCo. https://www.thoughtco.com/setting-multi-line-caption-for-tlabel-1057575 (accessed March 22, 2023). copy citation Featured Video