Jump to content
Sign in to follow this  
peter

line break in a grid.cell

Recommended Posts

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';

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×