lcl: return header section text as display name if available

git-svn-id: trunk@23010 -
This commit is contained in:
paul 2009-12-07 02:28:11 +00:00
parent 0e2a102350
commit 29154135e7
2 changed files with 10 additions and 0 deletions

View File

@ -2775,6 +2775,8 @@ type
procedure SetWidth(Value: Integer);
procedure SetImageIndex(const Value: TImageIndex);
procedure CheckConstraints;
protected
function GetDisplayName: string; override;
public
constructor Create(ACollection: TCollection); override;
procedure Assign(Source: TPersistent); override;

View File

@ -594,6 +594,14 @@ begin
FWidth := FMaxWidth;
end;
function THeaderSection.GetDisplayName: string;
begin
if Length(Text) = 0 then
Result := inherited GetDisplayName
else
Result := Text;
end;
constructor THeaderSection.Create(ACollection: TCollection);
begin
inherited Create(ACollection);