Delphi XE7 text prompt

Before I submit a QA report to Embacadero, I wanted to know if there is something simple that I am missing regarding TEdit and setting the TextPrompt property.

Whenever you try to install TextPrompt of any TEdit, a tooltip is not displayed. Am I missing a step or is there a simple work on this error that everyone knows about now?

Delphi XE7 for iOS (FMX)

+4
source share
2 answers

You can also simply insert a TLabel inside your TEdit and align it with the content or client. Set the HitTest property to false. Show it on the onChange event or hide it if the Text property is empty. TextPrompt had problems in previous versions, so I used this workaround.

+7
source

You need to use a style book to make it work correctly.

Example:

  • Create a new application for multiple devices.
  • Add TStylebook component.
  • Set the stylebook property in Stylebook1
  • add TEdit

. , , TEdit " ", , , .... . .....

  • TEdit , " "

stylebook1.

  • "edit1style1: TLayout"
  • ": TLabel"
  • "" , .
  • " "

, tedit, .

+1

All Articles