How To Create a Table in the Rich Edit
The following example demonstrates how to create a table in the rich edit:
//...
var
ATableParams: TcxRichEditTableParams;
AIndex: Integer;
begin
ATableParams := TcxRichEditTableParams.Create;
try
AIndex := ATableParams.AddColumnParams;
with ATableParams.ColumnParams[AIndex] do
begin
Width := 100;
BackgroundColor := recCyan;
VerticalAlignment := taBottomJustify;
end;
cxRichEdit1.InsertTable(3, 5, ATableParams);
finally
ATableParams.Free;
end;
end;
Note that tables are supported if the rich edit’s Properties.RichEditClass property is recRichEdit41.
See Also