IdeIntf: Support TCustomTreeView descendants in property editors. Make Images public. Issue #31071, patch from Michal Gawrycki.

git-svn-id: trunk@53621 -
This commit is contained in:
juha 2016-12-09 11:20:56 +00:00
parent 547523b49a
commit 8a1c1ebeb1
2 changed files with 8 additions and 8 deletions

View File

@ -62,9 +62,9 @@ type
procedure btnSaveClick(Sender: TObject);
procedure edtIndexStateEditingDone(Sender: TObject);
private
FTreeView: TTreeView;
FTreeView: TCustomTreeView;
FModified: Boolean;
procedure LoadFromTree(ATreeView: TTreeView);
procedure LoadFromTree(ATreeView: TCustomTreeView);
procedure SaveToTree;
procedure UpdateEnabledStates;
public
@ -91,7 +91,7 @@ implementation
{$R *.lfm}
function EditTreeView(ATreeView: TTreeView):boolean;
function EditTreeView(ATreeView: TCustomTreeView):boolean;
var
TreeViewItemsEditorForm: TTreeViewItemsEditorForm;
begin
@ -241,7 +241,7 @@ begin
end;
end;
procedure TTreeViewItemsEditorForm.LoadFromTree(ATreeView: TTreeView);
procedure TTreeViewItemsEditorForm.LoadFromTree(ATreeView: TCustomTreeView);
begin
FTreeView := ATreeView;
if Assigned(ATreeView) then
@ -277,7 +277,7 @@ end;
procedure TTreeViewItemsProperty.Edit;
begin
if EditTreeView(GetComponent(0) as TTreeView) then
if EditTreeView(GetComponent(0) as TCustomTreeView) then
Modified;
end;
@ -294,7 +294,7 @@ begin
If Index = 0 then
begin
GetHook(Hook);
if EditTreeView(GetComponent as TTreeView) then
if EditTreeView(GetComponent as TCustomTreeView) then
if Assigned(Hook) then
Hook.Modified(Self);
end;

View File

@ -3457,7 +3457,6 @@ type
property HideSelection: Boolean
read GetHideSelection write SetHideSelection default True;
property HotTrack: Boolean read GetHotTrack write SetHotTrack default False;
property Images: TCustomImageList read FImages write SetImages;
property Indent: Integer read FIndent write SetIndent default 15;
property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect default False;
property OnAddition: TTVExpandedEvent read FOnAddition write FOnAddition;
@ -3499,7 +3498,6 @@ type
property ShowRoot: Boolean read GetShowRoot write SetShowRoot default True;
property ShowSeparators: Boolean read GetShowSeparators write SetShowSeparators default True;
property SortType: TSortType read FSortType write SetSortType default stNone;
property StateImages: TCustomImageList read FStateImages write SetStateImages;
property ToolTips: Boolean read GetToolTips write SetToolTips default True;
public
constructor Create(AnOwner: TComponent); override;
@ -3557,6 +3555,7 @@ type
property ExpandSignSize: integer read FExpandSignSize write FExpandSignSize default DefaultTreeNodeExpandSignSize;
property ExpandSignType: TTreeViewExpandSignType
read FExpandSignType write SetExpandSignType default tvestTheme;
property Images: TCustomImageList read FImages write SetImages;
property InsertMarkNode: TTreeNode read FInsertMarkNode write SetInsertMarkNode;
property InsertMarkType: TTreeViewInsertMarkType read FInsertMarkType write SetInsertMarkType;
property Items: TTreeNodes read FTreeNodes write SetTreeNodes;
@ -3572,6 +3571,7 @@ type
property SelectionFontColorUsed: boolean read FSelectedFontColorUsed write FSelectedFontColorUsed default False;
property Selections[AIndex: Integer]: TTreeNode read GetSelections;
property SeparatorColor: TColor read fSeparatorColor write SetSeparatorColor default clGray;
property StateImages: TCustomImageList read FStateImages write SetStateImages;
property TopItem: TTreeNode read GetTopItem write SetTopItem;
property TreeLineColor: TColor read FTreeLineColor write FTreeLineColor default clWindowFrame;
property TreeLinePenStyle: TPenStyle read FTreeLinePenStyle write FTreeLinePenStyle default psPattern;