(Solved) Problem with TpageControl BiDiMode lazarus / 31-LCL ---------------------------------------------------------------------- delphi887 · 2013-03-06 07:53 hi  i programing with Lazarus in Linux and Windows. my program language is Persian and BiDiMode in Tform and othe component  change to  bdRightToLeft . in Kubuntu or ubunru Tpagecontrol set right to left  correctly but in windows XP not correct. my program in Kubutnu with Tpagecontrol BiDiMode bdRightToLeft http://ubuntuone.com/4B5p8hgaOovvHQ8cgrdQpz my program in Windows XP with Tpagecontrol BiDiMode bdRightToLeft http://ubuntuone.com/7dM65nPUCkvCYZPhZ2tDnY How do I fix this error in Windows XP ???? ---------------------------------------------------------------------- theo · 2013-03-06 10:58 http://www.lazarus.freepascal.org/index.php?topic=17272.0 ---------------------------------------------------------------------- Avishai · 2013-03-06 15:49 I have made a lot of progress in recent times.  The Following routines should help mirror TWinControls (Like TPageControl) for RightToLeft or LeftToRight under MSWindows. But you MUST disable Themes for this to work.  I ask that if you find better solutions you let me know.  Good Luck. Code: [Select]{===== RtlCtrl =====} procedure RTLCtrl(ACtrl: TObject); { Make TWinControl RightToLeft - MSWindows ONLY! } begin {$IfDef MSWindows}   if ACtrl is TWinControl then     with TWinControl(ACtrl) do begin       SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE)         or RightToLeftLayout or NoInheritLayout);   end; {$EndIf} end;  {===== LtrCtrl =====} procedure LTRCtrl(ACtrl: TObject); { Make TWinControl LeftToRight - Windows ONLY! } begin {$IfDef MSWindows}   if ACtrl is TWinControl then     with ACtrl as TWinControl do begin       SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE)         and RightToLeftLayout and NoInheritLayout);   end; {$EndIf} end; ---------------------------------------------------------------------- delphi887 · 2013-03-06 18:30 hi  thanks very much theo & Avishai  this solution is worked and  TPageControl set RightToLeft  completely. only  Themes  is disabled    good luck ---------------------------------------------------------------------- Avishai · 2013-03-06 18:39 Hopefully someday soon someone will figure out how to fix Themes so that we can do RightToLeft with Themes on.  By the way, you can even mirror TFrom the way it should be.  Those routines work on all TWinControls, but some controls don't like it.  For example SynEdit, but why would anyone mirror SynEdit???