Jump to content


Photo

line break in a grid.cell


  • Please log in to reply
1 reply to this topic

#1 peter

peter
  • Members
  • 6 posts

Posted 18 May 2017 - 09:09 AM

How do I create a line break in a grid.cell?

 

Hello                Hello World

World

 

My code:

 

W3Grid1.RowHeight := 36;
Col1 := TW3TextColumn.Create(W3Grid1 as IW3ColumnsControl);
Col2 := TW3TextColumn.Create(W3Grid1 as IW3ColumnsControl);
Col1.Alignment := taLeft;
Col2.Alignment := taLeft;
Col1.Width := 200;
Col2.Width := 200;
W3Grid1.Columns.Add(Col1);
W3Grid1.Columns.Add(Col2);

W3Grid1.AddRow(1);
W3Grid1.Cell[0, W3Grid1.LastAddedRow].Value:= 'Hello'+#13#10+'World';

W3Grid1.Cell[1, W3Grid1.LastAddedRow].Value:= 'Hello World';

 

 



#2 Igor Savkic

Igor Savkic
  • Members
  • 184 posts

Posted 18 May 2017 - 01:59 PM

> How do I create a line break in a grid.cell?

> Hello                Hello World

> World

 

Just use <br> tag, like

W3Grid1.Cell[1, W3Grid1.LastAddedRow].Value:= 'Hello<br>World';

 


  • Nico Wouterse likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users