1.RVE, TextStyle, ParaStyle are set to BiDiMode = rvbdRightToLeft.
2.Enter number which contains "a period" in the middle eg. 123.456
3.Select a period
4.Change style of selection to some other style (ApplyTextStyle)
5. The number looks as following 456.123
What is wrong?
RightToLeft mode problem
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Well, there is an imperfection of bidi layout algorithm related to arranging items. By assigning a different style to the dot you make 3 items: '123', '.', '456'. When arranging items on the line, TRichView takes adjacent characters of items into account. While one of characters in the pairs ('3', '.') and ('.', '4') is a LTR character, another character (dot) is not, so TRichView arranges them according to the paragraph settings (RTL).
Solution: assign LTR to the bidimode of the text style of this number (at least to the dot).
Solution: assign LTR to the bidimode of the text style of this number (at least to the dot).
Thank you, Sergey!
I tried to evaluate your solution, but I think in our case it's too complicated to implement.
I'll try to explain the problem:
Our application must work in RTL mode. It presents textual information where any(!!!) adjacent char can have different style. Style are assigned according to specific application logic. Once information is displayed, user can modify it. Any modification can cause to a change of particular char/word/phrase style. This is the situation.
I tried to evaluate your solution, but I think in our case it's too complicated to implement.
I'll try to explain the problem:
Our application must work in RTL mode. It presents textual information where any(!!!) adjacent char can have different style. Style are assigned according to specific application logic. Once information is displayed, user can modify it. Any modification can cause to a change of particular char/word/phrase style. This is the situation.
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: