hidden props related to TComponent

This commit is contained in:
Basile Burg 2014-07-31 09:37:32 +02:00
parent ae93adbbda
commit cfa7c95bbf
1 changed files with 13 additions and 0 deletions

View File

@ -26,6 +26,7 @@ type
procedure GridEditorFilter(Sender: TObject; aEditor: TPropertyEditor;var aShow: boolean);
procedure selConfChange(Sender: TObject);
procedure TreeChange(Sender: TObject; Node: TTreeNode);
procedure GridFilter(Sender: TObject; aEditor: TPropertyEditor;var aShow: boolean);
private
fProj: TCEProject;
function getGridTarget: TPersistent;
@ -46,6 +47,7 @@ constructor TCEProjectConfigurationWidget.create(aOwner: TComponent);
begin
inherited;
Tree.Selected := Tree.Items.GetLastNode;
Grid.OnEditorFilter := @GridFilter;
end;
procedure TCEProjectConfigurationWidget.projNew(const aProject: TCEProject);
@ -139,6 +141,17 @@ begin
endUpdateByEvent;
end;
procedure TCEProjectConfigurationWidget.GridFilter(Sender: TObject; aEditor: TPropertyEditor;var aShow: boolean);
begin
if getGridTarget = fProj then
begin
if aEditor.GetName = 'Name' then
aShow := false;
if aEditor.GetName = 'Tag' then
aShow := false;
end;
end;
function TCEProjectConfigurationWidget.getGridTarget: TPersistent;
begin
if fProj = nil then exit(nil);