fixed restoring listview columns at design time, issue #6962

git-svn-id: trunk@9352 -
This commit is contained in:
jesus 2006-05-25 07:32:48 +00:00
parent 4fd508b71d
commit 3d36c2396e
3 changed files with 9 additions and 0 deletions

View File

@ -871,6 +871,7 @@ type
function GetMaxScrolledLeft : Integer;
function GetMaxScrolledTop : Integer;
procedure ImageChanged(Sender : TObject);
procedure Loaded; override;
procedure WMHScroll(var Msg: TLMScroll); message LM_HSCROLL;
procedure WMVScroll(var Msg: TLMScroll); message LM_VSCROLL;
protected

View File

@ -654,6 +654,13 @@ begin
// end;
end;
procedure TCustomListView.Loaded;
begin
// create interface columns if needed
FColumns.IntfCreateColumns;
inherited Loaded;
end;
procedure TCustomListView.SetScrollBars(const AValue: TScrollStyle);
begin
if (FScrollBars = AValue) then exit;

View File

@ -106,6 +106,7 @@ begin
Result := (Collection <> nil)
and (TListColumns(Collection).FOwner <> nil)
and TListColumns(Collection).FOwner.HandleAllocated
and not (csReading in TListColumns(Collection).FOwner.ComponentState)
and not (csDestroying in TListColumns(Collection).FOwner.ComponentState);
end;