I am relatively new to Delphi and this is probably a very basic query but I havent been able to find an answer thus far.
The question is, I have built a form which contains an unlimited free text field into which users will enter data. When the form loads I would like to have headings in the text field as a prompt for users to make relevant notes under these headings.
Is there any way to insert these headings into a free text field so that they display each time the form loads?
Many thanks.
You can place a
TLabelcontrol above the text box.If you want multiple headings within the text, essentially creating sections within the text, then you can set the text box’s
Textproperty to contain whatever starter text you want:The
#13#10part inserts a line break in the text. Some more recent Delphi versions also have thesLineBreakconstant you can use in place of the character literals.I’d argue that it’s not really a “free text” field anymore, though, so if you want to enforce that people fill in text designated for specific sections, then you should have separate text boxes, and then you can put a
TLabelcontrol with each one.