BidiMode

From Free Pascal wiki
Revision as of 11:53, 2 June 2007 by Zaher (talk | contribs)
Jump to navigationJump to search

Phase 1: Add BidiMode property to TControl

TBidiMode already declaired in Classes

 property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode stored IsBiDiModeStored;
 property ParentBiDiMode: Boolean read FParentBiDiMode write SetParentBiDiMode default True;

BidiMode must not stored if ParentBidiMode = True

 function TControl.IsBiDiModeStored: Boolean;
 begin
   Result := not ParentBiDiMode;
 end;

Add virtual functions

 function IsRightToLeft:Boolean; virtual;
 function UseRightToLeftAlignment: Boolean; virtual;
 function UseRightToLeftReading: Boolean; virtual;
 function UseRightToLeftScrollBar: Boolean; virtual;
 BiDiMode property in public and must published in every control need to RightToLeft

In delphi there is UseRightToLeftAlignment and UseRightToLeftReading and UseRightToLeftScrollBar but there is a Alignment property in TLabel, TEdit not have but we can implement an Alignment so i will not use this technique for now.