Adding line break with Enter Key? lazarus / 31-LCL ---------------------------------------------------------------------- egsuh · 2021-08-11 11:07 Hi, this is normal action with TMemo, etc.  But I have set up TStringGrid so that it displays multiple lines. This has no problem with #13#10 --- for example, following codes display the content as expected.     StringGrid1.Cells[aCol, aRow] := Memo1.Text; But when I directly input texts into the TStringGrid, I cannot make the line break. Pressing Enter just pops editing state. I tried Shift- enter, Ctrl-Enter, Alt-enter, etc. without success.  I tried to set OnKeyPress, but .... this is ridiculous.       if Key=#13 then...       I DO NOT KNOW WHAT TO DO. ---------------------------------------------------------------------- egsuh · 2021-08-12 07:43 Yes. I tried with TMemo, but I couldn't close TMemo^^  I have to review examples. But I think defining another component with these behaviors as default, with names like TStringGridEx, etc. would be very good, as this is quite useful in many cases.