improved TGridColumn.GetDisplayName and updating column index in TCollection editor

git-svn-id: trunk@7608 -
This commit is contained in:
mattias 2005-08-31 08:43:26 +00:00
parent abe8ca8638
commit 373eba5ee6
3 changed files with 10 additions and 4 deletions

View File

@ -3338,6 +3338,7 @@ begin
if Collection=nil then exit;
Collection.Add;
FillCollectionListBox;
UpdateCaption;
Modified;
end;
@ -3384,6 +3385,7 @@ begin
end;
end;
UpdateButtons;
UpdateCaption;
end;
procedure TCollectionPropertyEditorForm.MoveDownButtonClick(Sender: TObject);
@ -3629,6 +3631,7 @@ begin
end;
end;
FillCollectionListBox;
UpdateCaption;
end;
procedure TCollectionPropertyEditorForm.Modified;

View File

@ -2994,10 +2994,10 @@ end;
function TColumn.GetDisplayName: string;
begin
if FFieldName='' then
result := 'column'
if FFieldName<>'' then
Result:=FFieldName
else
Result:=FFieldName;
Result:=inherited GetDisplayName;
end;
function TColumn.GetDefaultAlignment: TAlignment;

View File

@ -7403,7 +7403,10 @@ end;
function TGridColumn.GetDisplayName: string;
begin
Result := 'GridColumn';
if Title.Caption<>'' then
Result := Title.Caption
else
Result := 'GridColumn';
end;
function TGridColumn.GetDefaultAlignment: TAlignment;