was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

35 Visitors Online


 
...einen Delphi BiDi Bug korrigieren?
Autor: Ido Kanner
[ Tip ausdrucken ]  

Tip Bewertung (13):  
     


{
  When you set the BiDiMode in you form to bdRightToLeft, you do only HALF mirroring.

  Since Win98 (Hebrew/Arabic version) mirror it's envirement completly
 (the Minimize, Close, Maxmize buttons are on the Left, and the Icon is on the right).
  How can we do it in delphi ?
}

{...}
const
 
WS_EX_LAYOUTRTL = $00400000;
 WS_EX_LAYOUT_RTL = WS_EX_LAYOUTRTL;

{...}

 
TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    
{ Private declarations }
  
public
    
{ Public declarations }
    
procedure CreateParams(var Params : TCreateParams); override;
  end;

{...}

implementation

procedure 
TForm1.CreateParams(var Params : TCreateParams);
begin
  inherited 
CreateParams(Params);
  Params.ExStyle := WS_EX_LEFT or WS_EX_RTLREADING or WS_EX_LEFTSCROLLBAR or WS_EX_LAYOUT_RTL;
 {WS_EX_LEFT to set the text caption to the right,
  use WS_EX_RIGHT to set the caption to the left}
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 
BiDiMode := bdLeftToRight; //A must !!!
end;

{The result is Right to Left (including the buttons, the icon and the system menu) }


 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners