Browse Source

* Implemented GetDisplayName for fielddef

git-svn-id: trunk@14204 -
michael 15 years ago
parent
commit
bf39a852b4
1 changed files with 9 additions and 0 deletions
  1. 9 0
      packages/fcl-db/src/datadict/fpdatadict.pp

+ 9 - 0
packages/fcl-db/src/datadict/fpdatadict.pp

@@ -74,6 +74,7 @@ Type
   protected
     function GetSectionName: String; override;
     procedure SetSectionName(const Value: String); override;
+    function GetDisplayName: string; override;
   Public
     Constructor Create(ACollection : TCollection); override;
     Function FieldDefs : TDDFieldDefs;
@@ -1013,6 +1014,14 @@ begin
   FFieldName:=Value;
 end;
 
+function TDDFieldDef.GetDisplayName: string;
+begin
+  If (FieldName<>'') then
+    Result:=FieldName
+  else
+    Result:=inherited GetDisplayName;
+end;
+
 constructor TDDFieldDef.Create(ACollection: TCollection);
 begin
   Inherited;