This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Redeclaration of Fields in TELTreeAnchastor

In TELTreeAnchastor the member variables are defined

    FOnEditKeyDown: TKeyEvent;
    FHorizontalLines,
    FVerticalLines: Boolean;
    FExplorerEditMode: Boolean;

but in the TElTree and TElXTree these variables are redefined.

So the Hack-Class (THackElTree = class(TElTreeAncestor)) in ElTreeStdEditors will not work any more.


This bug occure if press <Shift>+<Alt>+C to complete a class. The IDE does not recognize that this members are already defined in the base class.

I changed the implementation of the base class to the following

  TElTreeAncestor = class(TElXPThemedControl) //, IElTree)
  protected
    FOnEditKeyDown: TKeyEvent;
    FHorizontalLines,
    FVerticalLines: Boolean;
    FExplorerEditMode: Boolean;
    FEditorManager: TElTreeInplaceManager;

    function GetTreeViewAncestor: TElTreeViewAncestor; virtual; abstract;
    function GetAlignmentOnSection(SectionIndex: integer): string; virtual; abstract;
  protected
    procedure SetVerticalLines(value: Boolean); virtual; abstract;
    procedure SetHorizontalLines(value: Boolean); virtual; abstract;
  public
    property ExplorerEditMode: Boolean read FExplorerEditMode write FExplorerEditMode default False;
    property VerticalLines: Boolean read FVerticalLines write SetVerticalLines default False;
    property HorizontalLines: Boolean read FHorizontalLines write SetHorizontalLines default False;

    property View: TElTreeViewAncestor read GetTreeViewAncestor;
    property EditorManager: TElTreeInplaceManager read FEditorManager;
    property OnEditKeyDown: TKeyEvent read FOnEditKeyDown write FOnEditKeyDown;
  end;

and removed the fields, property in the derived classes TElTree and TElXTree


Comments

Sign In or Register to comment.