View Issue Details

IDProjectCategoryView StatusLast Update
0019255PatchesLCLpublic2011-08-06 12:24
ReporterAvishai Assigned ToJuha Manninen  
Status closedResolutionfixed 
Product Version0.9.31 (SVN) 
Summary0019255: Patch for TPanel to correct TPanel.Caption when BiDiMode:= bdRightToLeft.
DescriptionThis is a partial patch to correct TPanel.Caption when BiDiMode:= bdRightToLeft. It only works during runtime. It corrects the display of BiDi text, but does not work at designtime. My code changes are marked as

//=== Avishai's Code
//=== End of Avishai's Code
Tagsbidi, multi-language support
Fixed in Revisionr30592
Attached Files


related to 0019268 closedJuha Manninen Patches Patch to add BiDiMode and ParentBiDiMode properties to 5 components. 
related to 0018949 closedVincent Snijders Packages TPanel.Caption is not RightToLeft when BiDiMode:= beRightToLeft 
related to 0019303 acknowledged Lazarus BiDi meta issue 


2011-04-28 17:00 (1,958 bytes)

Juha Manninen

2011-04-29 18:28

developer   ~0047911

Does someone know why it does not work at design-time?
IMO Paint is called also at design-time.

This run-time only solution could be applied if the design-time issue is diffucult to solve.


2011-04-30 00:03

reporter   ~0047913

Last edited: 2011-04-30 11:01

I made modifications to some other components and now for some unknown reason, when TPanel.BiDiMode:= bdRightToLeft the caption displays properly in both Design and runtime :)

Juha Manninen

2011-05-07 11:18

developer   ~0048106

I applied it. Please test.


2011-05-09 20:49

reporter   ~0048158

When TPanel is set to bdRightToLeft, it now displays correctly at design-time, but does not display correctly at run-time. You can see this by enclosing text in parentheses. If you type (Hello), it will display (Hello( at design-time. But when you run it, it will display (Hello). In a RightToLeft language, the opposite happens. In Design time-time it displays (***) and is correct, but in run-time it displays (***(.

Also the taAlignment works backward. When RightToLeft is set to taLeftJustify, it should align the text to the right and taRightJustify should Align to the Left. If you compare TPanel with TLabel alignment you can see what I am trying to explain. I hope this isn't too confusing :)

Juha Manninen

2011-05-09 22:17

developer   ~0048165

I can't reproduce here with Linux.

Did your changed code work before I applied it?
I don't have time or energy to test RightToLeft languages now, I don't use such language myself. I can however apply your patches and check they don't break anything else.

Did you get SVN working. If not, you can get help through forum, mailing list or chat.
Please provide proper patches in future.


2011-05-10 12:03

reporter   ~0048186

I changed code on 10-5-11.

Juha Manninen

2011-05-10 20:05

developer   ~0048198

> I changed code on 10-5-11.

What code?


2011-05-10 20:52

reporter   ~0048199

Last edited: 2011-05-10 20:53

Sorry, I see the confusion. You asked "Did your changed code work before I applied it?" What I meant was that I got the latest snapshot on 10-5-11. I'll try to be more careful with my answers :) The code for TPanel.Caption that I posted here works in Windows 7.

Juha Manninen

2011-05-10 22:50

developer   ~0048203

You still use snapshots instead of SVN trunk. It doesn't make a big difference for testing but it would make things a lot easier for you and it is required to create proper patches.
Do you still have problems configuring SVN? You can get help from me, from mailing list, from forum or from chat. I have even sent you a personal message about it.

I have tested TPanel with BidiMode=dbRightToLeft and different Caption texts, on Linux and on Windows. I still can't reproduce the problem.

We must figure out what causes the difference. Your code works but latest trunk does not. It means I have copied and applied your changes wrongly somehow. Can you please point where it went wrong. What is the difference between your code and the Lazarus trunk code?


2011-05-11 08:30

reporter   ~0048211

Thank you so much :) You are a very patient person. I can't add SVN to this computer because it doesn't belong to me and the owner doesn't want it.

The lines that I added are missing in the snapshots version. I enclosed my changes between: I hope this helps, and thank you again.

//Avishai's Code
//End of Avishai's Code

Juha Manninen

2011-05-11 09:52

developer   ~0048213

I try to be more patient, sorry.
Still, please remember that a proper patch (diff format) is a norm and a requirement.
I _patiently_ extracted your changes from your copied files for this and other reports. Any other developer would ask for proper patches or just ignore them. I will do the same thing in future.

> I can't add SVN to this computer because it doesn't belong to me and the owner doesn't want it.

That complicates things a bit of course. I see the computer has Windows 7. TortoiseSVN should be safe to install there. You already were allowed to install Lazarus.

I rechecked: your change can be seen in starting from line 112.
I also rechecked the commit history. The change was indeed applied at r30592.
It means you are not looking at the latest Lazarus trunk version.


2011-05-11 13:38

reporter   ~0048216

NO NO NO!!! I really meant that you ARE a very patient person. I wasn't trying to say that you are not. Please forgive me for not making that more clear. I'm so sorry that you understood it differently. I was trying to complement you.

Juha Manninen

2011-05-11 19:01

developer   ~0048221

I am pushing you to install SVN because you are willing and capable to create patches. You would really need it.
I hope you get your own computer some time soon.


2011-05-12 11:17

reporter   ~0048232

Thank you for the complement :) I am willing, but not so capable. I have made all of the patches that I have the skills for. All of the other components are too complicated for me. I wanted to fix TStringGrid and TDBStringGrid for bdRightToLeft because they are so important and do not work. But I looked at the code and I do not have the skills for that. I looked at all of the components for bdRightToLeft. Some work well, others do not.

Juha Manninen

2011-08-06 10:41

developer   ~0050530

I resolve this old issue now.

Issue History

Date Modified Username Field Change
2011-04-28 17:00 Avishai New Issue
2011-04-28 17:00 Avishai File Added:
2011-04-29 18:28 Juha Manninen LazTarget => -
2011-04-29 18:28 Juha Manninen Note Added: 0047911
2011-04-29 18:28 Juha Manninen Status new => feedback
2011-04-30 00:03 Avishai Note Added: 0047913
2011-04-30 08:33 Avishai Tag Attached: bidi
2011-04-30 08:35 Avishai Tag Attached: multi-language support
2011-04-30 11:01 Avishai Note Edited: 0047913
2011-04-30 13:44 Juha Manninen Relationship added related to 0019268
2011-05-06 22:13 Juha Manninen Relationship added related to 0019303
2011-05-07 10:52 Juha Manninen Relationship added related to 0018949
2011-05-07 11:18 Juha Manninen Fixed in Revision => r30592
2011-05-07 11:18 Juha Manninen Status feedback => resolved
2011-05-07 11:18 Juha Manninen Resolution open => fixed
2011-05-07 11:18 Juha Manninen Assigned To => Juha Manninen
2011-05-07 11:18 Juha Manninen Note Added: 0048106
2011-05-09 20:49 Avishai Note Added: 0048158
2011-05-09 22:17 Juha Manninen Status resolved => assigned
2011-05-09 22:17 Juha Manninen Resolution fixed => reopened
2011-05-09 22:17 Juha Manninen Note Added: 0048165
2011-05-10 12:03 Avishai Note Added: 0048186
2011-05-10 20:05 Juha Manninen Note Added: 0048198
2011-05-10 20:52 Avishai Note Added: 0048199
2011-05-10 20:53 Avishai Note Edited: 0048199
2011-05-10 22:50 Juha Manninen Note Added: 0048203
2011-05-11 08:30 Avishai Note Added: 0048211
2011-05-11 09:52 Juha Manninen Note Added: 0048213
2011-05-11 13:38 Avishai Note Added: 0048216
2011-05-11 19:01 Juha Manninen Note Added: 0048221
2011-05-12 11:17 Avishai Note Added: 0048232
2011-08-06 10:41 Juha Manninen Status assigned => resolved
2011-08-06 10:41 Juha Manninen Resolution reopened => fixed
2011-08-06 10:41 Juha Manninen Note Added: 0050530
2011-08-06 12:24 Avishai Status resolved => closed