Hi,
When using ScaleRichviewedit (through ActionTestUni demo project) when I enter RTL text either in Arabic and make a selection, the position of the characters in the selections moves around in an odd way. Please refer to the images below
This is the original Arabic text
This is the same text with selection starting from extreme right of the image. The selected area is showing misplaced characters. The text at the end of the sentence is somehow appearing at the start of the selection.
I am using Delphi XE2 on Windows Vista.
I would appreciate your assistance to solve this problem.
Kind regards,
Extorian
[/img]
Text selections with Unicode BiDi
-
- Site Admin
- Posts: 17554
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Assign SRichViewEdit1.BiDiMode = rvbdLeftToRight (or rvbdRightToLeft).
Also, in this demo, in the procedure TForm3.AddEditor, assign srve.BiDiMode as well (this procedure is called when a new tab is open).
Additionally, value of BiDiMode may be stored in RVF files, so, when RVF file is loaded, value of BiDiMode may be reset. In this demo, in TForm3.OnOpenEditor, add:
after the line
Also, in this demo, in the procedure TForm3.AddEditor, assign srve.BiDiMode as well (this procedure is called when a new tab is open).
Additionally, value of BiDiMode may be stored in RVF files, so, when RVF file is loaded, value of BiDiMode may be reset. In this demo, in TForm3.OnOpenEditor, add:
Code: Select all
if ActiveEditor.RichViewEdit.BiDiMode = rvbdUnspecified then
ActiveEditor.BiDiMode := rvbdLeftToRight;
Code: Select all
srvActionsResource.rvActionOpen1.ExecuteTarget(ActiveEditor.RichViewEdit);