Delphi Multiple Line Form Caption

Posted on 2006-11-12
Medium Priority
Last Modified: 2010-08-05
Good day,

Is it possible to add a multiple line caption to my form.

I tried to use  : form1.Caption := 'Top line'+#13#10+'Bottom Line';
But it does not work.

Can you also center text exactly on a form caption e.g. I need text on my left and exaclty in the middle some other text, and on my right some text.


Question by:henryreynolds
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 17928275
It is not possible to multiple line on a the form.

>>Can you also center text exactly on a form caption
Do you mean to center the caption of the from in the middle. That can be done at runtime.
First take the width of the text, take almost half of its width then put spaces beofre the caption of the form. It will come almost the middle.

LVL 10

Accepted Solution

atul_parmar earned 200 total points
ID: 17928356
It is possible. However, the caption should have enough space to accomodate the lines. or you need to smaller the font size.
see http://delphi.about.com/od/adptips2006/qt/draw_captionbar.htm

Author Comment

ID: 17928461
Hi sun4sunday , atul_parmar

Thank you both for your reply, but I must give the points to atul_parmar, because it work's 100% for me.

Enjoy your day



Expert Comment

ID: 17928792
Thanks Atul for the info and Henry for asking this question. This getting update my delphi knowledge


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question