If anyone wants to experiment with RightToLeft, this should get you started. 
But you must disable Themes for it to work.  Otherwise all
TWinControl.Canvas gets corrupted and can not be used.  The
TWinControl.Canvas issue is the biggest obstacle to making RightToLeft Forms
in Lazarus.  Delphi does not have this problem.

Start a new project and drop a TPageControl on the Form.  Add 2 Tabs to the
TPageControl.  Then add the CreateParams code.
--------

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, LclType, ComCtrls;

type

  TForm1 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
  public
    procedure CreateParams(var Params : TCreateParams); override;
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

uses AviUtils, Windows;

procedure TForm1.CreateParams(var Params : TCreateParams);
begin
  inherited CreateParams(Params);
  {$IFDEF WINDOWS}
  if SysLocale.MiddleEast then 
    Params.ExStyle:= Params.ExStyle or WS_EX_LAYOUTRTL; // or
WS_EX_NOINHERITLAYOUT;
  {$ENDIF}
end;

end.




--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Looking-for-help-Trying-to-add-better-RightToLeft-support-to-Lazarus-tp4028216p4034186.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to