

| Type | Description | |||
| Boolean | A boolean expression that specifies whether the control is drawn from right to left or from left to right. |
Changing the RightToLeft property on True does the following:
The following screen shot shows how the control looks if the RightToLeft property is True:

(By default) Changing the RightToLeft property on False does the following:
The following screen shot shows how the control looks if the RightToLeft property is False:

With Grid1
.BeginUpdate
.ScrollBars = exDisableBoth
.LinesAtRoot = exLinesAtRoot
With .Columns.Add("P1")
.Def(exCellHasCheckBox) = True
.PartialCheck = True
End With
With .Items
h = .AddItem("Root")
.InsertItem h,0,"Child 1"
.InsertItem h,0,"Child 2"
.ExpandItem(h) = True
End With
.RightToLeft = True
.EndUpdate
End With
The following VB.NET sample shows how to change the order of the columns from right to left
Dim h
With AxGrid1
.BeginUpdate
.ScrollBars = EXGRIDLib.ScrollBarsEnum.exDisableBoth
.LinesAtRoot = EXGRIDLib.LinesAtRootEnum.exLinesAtRoot
With .Columns.Add("P1")
.Def(EXGRIDLib.DefColumnEnum.exCellHasCheckBox) = True
.PartialCheck = True
End With
With .Items
h = .AddItem("Root")
.InsertItem h,0,"Child 1"
.InsertItem h,0,"Child 2"
.ExpandItem(h) = True
End With
.RightToLeft = True
.EndUpdate
End With
The following C++ sample shows how to change the order of the columns from right to left
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
#import <ExGrid.dll>
using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutScrollBars(EXGRIDLib::exDisableBoth);
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"P1")));
var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE);
var_Column->PutPartialCheck(VARIANT_TRUE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,long(0),"Child 1");
var_Items->InsertItem(h,long(0),"Child 2");
var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->PutRightToLeft(VARIANT_TRUE);
spGrid1->EndUpdate();
The following C# sample shows how to change the order of the columns from right to left
axGrid1.BeginUpdate();
axGrid1.ScrollBars = EXGRIDLib.ScrollBarsEnum.exDisableBoth;
axGrid1.LinesAtRoot = EXGRIDLib.LinesAtRootEnum.exLinesAtRoot;
EXGRIDLib.Column var_Column = (axGrid1.Columns.Add("P1") as EXGRIDLib.Column);
var_Column.set_Def(EXGRIDLib.DefColumnEnum.exCellHasCheckBox,true);
var_Column.PartialCheck = true;
EXGRIDLib.Items var_Items = axGrid1.Items;
int h = var_Items.AddItem("Root");
var_Items.InsertItem(h,0,"Child 1");
var_Items.InsertItem(h,0,"Child 2");
var_Items.set_ExpandItem(h,true);
axGrid1.RightToLeft = true;
axGrid1.EndUpdate();
The following VFP sample shows how to change the order of the columns from right to left
with thisform.Grid1
.BeginUpdate
.ScrollBars = 15
.LinesAtRoot = -1
with .Columns.Add("P1")
.Def(0) = .T.
.PartialCheck = .T.
endwith
with .Items
h = .AddItem("Root")
.InsertItem(h,0,"Child 1")
.InsertItem(h,0,"Child 2")
.DefaultItem = h
.ExpandItem(0) = .T.
endwith
.RightToLeft = .T.
.EndUpdate
endwith
The following Delphi sample shows how to change the order of the columns from right to left
with AxGrid1 do
begin
BeginUpdate();
ScrollBars := EXGRIDLib.ScrollBarsEnum.exDisableBoth;
LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot;
with (Columns.Add('P1') as EXGRIDLib.Column) do
begin
Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
PartialCheck := True;
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,TObject(0),'Child 1');
InsertItem(h,TObject(0),'Child 2');
ExpandItem[h] := True;
end;
RightToLeft := True;
EndUpdate();
end