Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Share Me

  • Please share this topic with your friends. Click any of the icons below:
  • Twitter
  • facebook
  • reddit
  • email

Redeclaration of Fields in TELTreeAnchastor

In TELTreeAnchastor the member variables are defined

    FOnEditKeyDown: TKeyEvent;
    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)
    FOnEditKeyDown: TKeyEvent;
    FVerticalLines: Boolean;
    FExplorerEditMode: Boolean;
    FEditorManager: TElTreeInplaceManager;

    function GetTreeViewAncestor: TElTreeViewAncestor; virtual; abstract;
    function GetAlignmentOnSection(SectionIndex: integer): string; virtual; abstract;
    procedure SetVerticalLines(value: Boolean); virtual; abstract;
    procedure SetHorizontalLines(value: Boolean); virtual; abstract;
    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;

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


Sign In or Register to comment.