Right To Left Forms support

Tuesday, February 12th, 2008 | Delphi Programming

How to enable Right To Left Forms (including icons and form captions) with Delphi:

Override the CreateParams method and insert

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.ExStyle := Params.ExStyle or WS_EX_LEFT or WS_EX_RTLREADING or
    WS_EX_LEFTSCROLLBAR or WS_EX_LAYOUTRTL or WS_EX_NOINHERITLAYOUT;
end;

Now take a look at your BiDiMode settings – it may have the contrary effect if set to “bdRightToLeft”…

Tags: , , , ,

No comments yet.

Leave a comment

About

I'm an avid programmer working on a variety of platforms in a variety of languages with a wide technical interest.

QR Code

Search

Categories

Blogroll