Indentation in a Tedit

Asked

Viewed 172 times

6

It is possible to indent a text inside a TEdit or a derivative component (ex. TLabeledEdit)? If yes, how?
I don’t want to line him up (Left, Center, Right), I just want to indentify it, like it’s the first line of a paragraph.

The application is VCL, nay FireMonkey.
Delphi XE7.

  • Play a tab at the beginning ?

  • Basically this @Victorzanella a Tab or a Espaço would generate the desired effect, but would like to obtain this effect without inserting a character.

  • Got it, what’s your goal with it? Since Tedit usually only has one line.

  • @Victorzanella I actually want to apply this effect to the component TLabeledEdit, whereas the TLabel would be above the TEdit. Since the form in question has many fields, the effect I require would help the user to view the information.

  • 1

    I get it, I’m trying to apply a similar treatment to Richedit’s Paragraph.Firstindent. Take a look at this guy.

1 answer

4


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

Try something like that:

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 for the TEdit also!

  • This is new for me, beautiful balcony. + 1

  • ;) that Perform is similar to SendMessage, sharing we learn more.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.