hi sergey
how to align RichView rvbdRightToleft with Program ?
Rv Align
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
For the whole document: a simple assignment, RichView1.BiDiMode := rvbdRightToLeft.
--
You can also assign BiDiMode property of a paragraph style (it overrides the document BiDiMode) and of a text style (it overrides the both document and a paragraph BiDiMode).
If you want to do it as an editing operation (undoable), you need to use ApplyStyleConversion/ApplyParaStyleConversion procedure. Or, if you use RichViewActions, you can simply use TrvActionTextRTL and TrvActionParaRTL.
--
You can also assign BiDiMode property of a paragraph style (it overrides the document BiDiMode) and of a text style (it overrides the both document and a paragraph BiDiMode).
If you want to do it as an editing operation (undoable), you need to use ApplyStyleConversion/ApplyParaStyleConversion procedure. Or, if you use RichViewActions, you can simply use TrvActionTextRTL and TrvActionParaRTL.
---> no effect
No effect vor All
Richview.bidimode: rvRightToLeft
procedure TForm1.Button1Click(Sender: TObject);
begin
with rvActionTextRTL1 do
begin
rv.BiDiMode:=rvbdRightToLeft;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
with rvActionParaRTL1 do
begin
rv.BiDiMode:=rvbdRightToLeft;
end;
end;
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
BiDiMode specifies a text direction, not alignment.
Regardless of the value of BiDiMode property, alignment is defined by Alignment property of a paragraph style.
In your project, to align the list to the right side:
- Delphi IDE, right click RVStyle2, choose "Edit Paragraph Styles". Add a new style in the collection (it will be the third style). Assign its Alignment = rvaRight.
- in Button3Click, change rv.AddNL(Name,4,0) to rv.AddNL(Name,4,2);
--
As for BiDiMode:
- you need to change it to rvbdRightToLeft or rvbdLeftToRight to display Arabic text; otherwise, RTL text will not be processed correctly;
- the value of this property affects to neutral characters; English characters are always displayed LTR, Arabic characters are always displayed RTL; what's why you cannot see a difference in your example.
Regardless of the value of BiDiMode property, alignment is defined by Alignment property of a paragraph style.
In your project, to align the list to the right side:
- Delphi IDE, right click RVStyle2, choose "Edit Paragraph Styles". Add a new style in the collection (it will be the third style). Assign its Alignment = rvaRight.
- in Button3Click, change rv.AddNL(Name,4,0) to rv.AddNL(Name,4,2);
--
As for BiDiMode:
- you need to change it to rvbdRightToLeft or rvbdLeftToRight to display Arabic text; otherwise, RTL text will not be processed correctly;
- the value of this property affects to neutral characters; English characters are always displayed LTR, Arabic characters are always displayed RTL; what's why you cannot see a difference in your example.