Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How To Create a Table in the Rich Edit

The following example demonstrates how to create a table in the rich edit:

Delphi
//...
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