Indentation in a TEdit

6

Is it possible to indent a text within a TEdit or a derived component (eg TLabeledEdit )? If so, how?
I do not want to align it ( Left, Center, Right ), I just want to indent it, as if it were the first line of a paragraph.

The application is VCL , not FireMonkey . Delphi XE7 .

    
asked by anonymous 16.11.2016 / 17:15

1 answer

3

You can send a message to the component by modifying its margin!

Try something like this:

LabeledEdit1.Perform(EM_SETMARGINS, EC_LEFTMARGIN or EC_RIGHTMARGIN, MakeLParam(20, 0));

The MakeLParam needs 2 integer parameters, the first corresponds to the left side and the second corresponds to the right side!

Serves to TEdit too!

    
17.11.2016 / 11:20