[Lazarus] Looking for help: Trying to add better RightToLeft support to Lazarus.

Avishai avishai.gore at gmail.com
Thu Dec 20 10:30:33 CET 2012


Looking for help:  Trying to add better RightToLeft support to Lazarus.

I only work with Windows so any help with other OS's would be very good.

For Windows ONLY:

Ideally, RightToLeft should happen at Design-Time so that there is no
difference working RightToLeft or LeftToRight.  So far I have not been
able to make that work so I am forced to Design 'LeftToRight' and see
it RightToLeft only at Run-Time.

Since Windows Vista, BiDiMode is obsolete and should not be used.
Windows Vista introduced RightToLeftLayout and NoInheritLayout that
control the Origin and Direction of TWinControl.Canvas effectively
mirroring the Control and controlling Text Direction.

One problem seems to be with Themes.  If Themes are active mirroring
controls does not work properly and can not be used.  Solution 1. Go
to 'Project/Project Options' and uncheck 'Use manifest...'.  Solution
2.  This is a hack and should not be used unless you ONLY do
RightToLeft.  In Themes.pas you can disable Themes in Procedure
TThemeServices.UpdateThemes;

Most TWinControl descendants work well but not all of them.  Examples
of things that don't work well:  TMenuItem images, TSpeedButton
images, TBitBtn text.

I am attaching a Zip File with modifications that I have made to core
Lazarus source files.  It also has a small demonstration project.  If
you want to try this, I highly recommend that you use a second
installation of Lazarus.

-- 
Shalom,
Avishai
avishai.gore at gmail.com
אבישי גוֹר
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LazRTLtest.zip
Type: application/zip
Size: 130031 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20121220/1dd98fbb/attachment-0002.zip>


More information about the Lazarus mailing list