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

TdxSpreadSheetTableViewOptions.RightToLeftLayout Property

Switches a specific worksheet’s layout between right-to-left and left-to-right modes.

#Declaration

Delphi
property RightToLeftLayout: TdxDefaultBoolean read; write; default bDefault;

#Property Value

Type Default Description
TdxDefaultBoolean bDefault
  • If bTrue, the RTL mode is explicitly enabled.
  • If bFalse, the RTL mode is explicitly disabled.
  • If bDefault, the control’s BiDiMode property specifies if the worksheet uses the right-to-left layout.

#Remarks

Set the RightToLeftLayout property to bTrue to flip the worksheet layout horizontally.

VCL Spreadsheet: Left-to-Right and Right-to-Left Worksheet Layouts

Different worksheets can use different content layouts.

#Code Example: Force the Left-to-Right Layout

Since v19.2, spreadsheet controls show worksheets with a right-to-left layout in the way they are designed to look. To restore the appearance of such documents in previous versions, you can iterate through all sheets in the loaded document and assign bFalse to the RightToLeftLayout property as demonstrated in the following code example:

var
  I: Integer;
begin
  dxSpreadSheet1.LoadFromFile('C:\MyFile.xlsx');
  for I := 0 to dxSpreadSheet1.SheetCount - 1 do
  begin
    if dxSpreadSheet1.Sheets[I] is TdxSpreadSheetTableView then
      TdxSpreadSheetTableView(dxSpreadSheet1.Sheets[I]).Options.RightToLeftLayout := bFalse;
  end;
end;

To identify if the RTL mode affects the worksheet, use the ActualRightToLeftLayout property.

#Limitations

The component printer does not support the right-to-left layout for report generation and print operations. Printed RTL worksheets always have the LTR layout.

#Default Value

The RightToLeftLayout property’s default value is bDefault.

See Also