Recent

Author Topic: Multiline Edit  (Read 7911 times)

NOPIK

  • New Member
  • *
  • Posts: 11
Multiline Edit
« on: April 29, 2010, 09:54:16 am »
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?

Zoran

  • Hero Member
  • *****
  • Posts: 1830
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Multiline Edit
« Reply #1 on: April 29, 2010, 10:22:06 am »
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.

NOPIK

  • New Member
  • *
  • Posts: 11
Re: Multiline Edit
« Reply #2 on: April 30, 2010, 09:18:33 am »
I was not aware of SingleLine property of Text style. So the input controls...

 

TinyPortal © 2005-2018