ADDNL problem with RightToLeft mode

General TRichView support forum. Please post your questions here
Post Reply
eddy_mar

ADDNL problem with RightToLeft mode

Post by eddy_mar »

I made very simple example with following settings:
- RichViewEdit BiDiMode is set to rvbdRightToLeft
- Paragraph BiDiMode is set to rvbdRightToLeft
- Paragraph Alignment is set to rvaRight
- TextStyle BiDiMode is set to rvbdRightToLeft

I have a button with follwing procedure on button click:

AddNL(Edit1.Text, rvsDefStyle, -1);
Format;

Edit1.Text contains some Hebrew values that are changed every time before click.

On my XP machine it works fine, every click adds chars according to RightToLeft scenario.

When I run the same compiled application on Windows 2000 machine, it works different. It always puts added chars to the first position on the right side. I evaluated CurItemNo in inspector and it was always 0. When I just edit a text in the component, it works perfect.

What can be a problem?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Did I understand you right - on Win2000, initially text is displayed wrong, but after making some changes in text all comes to normal?
Guest

Post by Guest »

No, A text doesn't come normal. I just wanted to say that manual editing was working, but adding text programmatically does not.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I.e., if (in Win2000) you create a new document by typing, it is created correctly (?) If yes, what happens if you save it as RVF and then reload?
Guest

Post by Guest »

Reload doesn't fix the problem.
I made another test: File which I produced on XP machine (it looked correct), I reloaded on Windows 2000 machine and I got the same problem: Order of chars became wrong.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Make sure that Hebrew support is installed in this Windows 2000.
Control Panel, options about language (something like "Regional and Language Options"), find Hebrew in the list of languages and check it.
Guest

Post by Guest »

I definetly have full Hebrew support installed on Windows 2000 machine.

I made another test:
I saved the same content from XP machine in two formats (RVF, RTF) and loaded it after on Windows 2000 machine. RTF file was loaded OK, but rvf as I described in my previous post.
Guest

Post by Guest »

I found today that it works, when "your locale" is set to Hebrew, regardless is it XP or Windows 2000.

Thank you, Sergey!
Post Reply