I guess that repainting is done in the ancesstor class?not all controls need rewriting repainting routine, because some like Tbutton are painted by the OS, so you need to tell the OS to Draw Them as RTL, but other need, Like TStringGrid because they are painted by LCL.
I guess that repainting is done in the ancesstor class?I installed FortesReportCE and had a look at TRLCustomMemo. It does not have its own Paint method, but its ancestor, TRLCustomMultiLine, has. This Paint method calls a "MemoDraw" which is a stand-alone procedure (not a method). It does not get any BiDi-related parameter which makes me suspect that this library is not prepared for BiDi at all. But maybe we are lucky and it is sufficient to mirror the Alignment parameter:
How to test RightToLeft readingBy the way how BiDImode is implemented from scratch if someone will not
Create a new form, then add a TButton or TEdit. Set the caption to OK?. You must add ? or ! or . to the last word without a space. Now set the BidiMode to bdRightToLeft, and you should see the ? in the left of word if it works.
By the way how BiDImode is implemented from scratch if someone will notI think you must investigate how Fortes does the text rendering; I think, in the end it is CanvasTextRectEx in unit RLMetaVCL. Before the last "if" you must merge in the code for RTL. Maybe like this:
Inherit from an ancesstor which already got it?
"Hero member".This is just related to the number of posts, nothing "heroic".
One thing was not behaving as it should is the text alignmentI suppose taJustify means expanding the spaces such that left and right edges of text blocks are aligned. This feature is not available in the standard LCL canvas. Therefore, Fortes must have implemented it by themselves, i.e. calculating the total width of the words in each line and adjusting the space width to the difference of the block width to the total word width divided by the word count (minus 1). Ignoring BiDi, I guess they are painting words from left to right, but with RTL probably the words must be painted from right to left - but maybe I am wrong, this is very confusing, and I don't live in a RTL country. I can only encourage you to study the source code of the text drawing objects. Maybe search for "taJustify" and see what they are doing there.
The RLMemo and other text controls in RLReport package have text alignment as:
TRLTextAlignment = (taLeftJustify, taRightJustify, taCenter, taJustify);
When it set to taJustify, then if a half line is at the end of the text, then this half line should go
From right to left as well. It is now bizzar and comes from left to right as if the justify is set to taLeft
which is not correct behaviour.