Search code examples
delphivcldelphi-10-seattle

How to show placeholder in TEdit


Is there any way to add a placeholder text to an edit?

My only idea is to always manually set the color and the text of the given edit in its OnChange event, but it seems to be a bit tedious to me.

Any other suggestions?


Solution

  • What you are looking for is handled by the TEdit.TextHint property. Note that it only works on XP and later with Visual Themes/Styles enabled for the app.