Forum > LCL

Multiline Edit


Can I choose multiline mode for editor in TEdit, grids and so on?
Or, at least, can I display multiline content for these kinds of controls?

Not with TEdit, but if you use TMemo and set its heigth to Edit's default, you will achieve exactly this.

Actually, that's just what TMemo is -- nothing else but multiline edit. :)

So the answer to your question is yes, as TMemo is "these kinds of controls" -- it's a TCustomEdit's descendent.

For grid... you can set any control to be cell editor. The default is some kind of TEdit, but you can use TMemo. To understand how to use a control as cell editor, open example project "gridcelleditor", which you will find in <your lazarus folder>\examples\gridexamples\gridcelleditor. This is very simple application which shows how to use ComboBox as cell editor for third column of string grid.

I was not aware of SingleLine property of Text style. So the input controls...


[0] Message Index

Go to full version