TdxSpreadSheetTableViewOptions.RightToLeftLayout Property
Switches a specific worksheet’s layout between right-to-left and left-to-right modes.
Declaration
property RightToLeftLayout: TdxDefaultBoolean read; write; default bDefault;
Property Value
Type | Default | Description |
---|---|---|
TdxDefaultBoolean | bDefault |
Remarks
Set the RightToLeftLayout
property to bTrue to flip the worksheet layout horizontally.
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.