From ae5d7dfda184befa49c870fa070308caa57a1836 Mon Sep 17 00:00:00 2001 From: lazarus Date: Wed, 9 Oct 2002 11:46:05 +0000 Subject: [PATCH] MG: fixed loading TListView from stream git-svn-id: trunk@3492 - --- designer/columndlg.pp | 4 +++- designer/controlselection.pp | 1 + lcl/comctrls.pp | 6 +++++- lcl/include/customlistview.inc | 12 ++++++++++-- lcl/include/listcolumn.inc | 6 ++++-- lcl/include/listcolumns.inc | 5 ++++- 6 files changed, 27 insertions(+), 7 deletions(-) diff --git a/designer/columndlg.pp b/designer/columndlg.pp index 7db089eb4d..1d61652103 100644 --- a/designer/columndlg.pp +++ b/designer/columndlg.pp @@ -413,8 +413,10 @@ var begin //clear the listbox and display the items if any... Listbox1.Items.Clear; - for I := 0 to FColumns.Count-1 do + for I := 0 to FColumns.Count-1 do begin + writeln('TColumnDlg.FormOnShow ',i,' "',FColumns[i].Caption,'"'); Listbox1.Items.Add(FColumns[i].Caption); + end; if Listbox1.Items.Count > 0 then begin diff --git a/designer/controlselection.pp b/designer/controlselection.pp index 6c7c9c9323..0e371a9795 100644 --- a/designer/controlselection.pp +++ b/designer/controlselection.pp @@ -631,6 +631,7 @@ begin FTop:=FRealTop; FWidth:=FRealWidth; FHeight:=FRealHeight; + InvalidGuideLinesCache; Exclude(FStates,cssBoundsNeedsUpdate); end; diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index a491450f13..9c494701dc 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -240,7 +240,7 @@ type function GetItem(const AIndex: Integer): TListColumn; procedure SetItem(const AIndex: Integer; const AValue: TListColumn); protected - procedure Update(AItem: TCollectionItem); override; + procedure Update(AnItem: TCollectionItem); override; public constructor Create(AOwner: TCustomListView); function Add: TListColumn; @@ -304,6 +304,7 @@ type protected ParentWindow : TScrolledWindow; procedure InitializeWnd; override; + procedure Loaded; override; procedure Change(AItem: TListItem; AChange: Integer); dynamic; procedure ColClick(AColumn: TListColumn); dynamic; procedure Delete(Item : TListItem); @@ -1706,6 +1707,9 @@ end. { ============================================================================= $Log$ + Revision 1.50 2002/10/09 11:46:04 lazarus + MG: fixed loading TListView from stream + Revision 1.49 2002/10/01 18:00:02 lazarus AJ: Initial TUpDown, minor property additions to improve reading Delphi created forms. diff --git a/lcl/include/customlistview.inc b/lcl/include/customlistview.inc index d1bd10f997..05db3b1973 100644 --- a/lcl/include/customlistview.inc +++ b/lcl/include/customlistview.inc @@ -141,13 +141,12 @@ begin if FUpdateCount>0 then exit; if not (lvUpdateNeeded in FStates) then exit; if csDestroying in Componentstate Then Exit; - //TODO: Optimize implementation by invoking individual upadates instead of + //TODO: Optimize implementation by invoking individual updates instead of // recreating window //notify the interface.... if (not HandleAllocated) or (csLoading in ComponentState) then exit; Exclude(FStates,lvUpdateNeeded); RecreateWnd; - CNSendMessage(LM_SETPROPERTIES,self,nil); end; procedure TCustomListView.InitializeWnd; @@ -158,6 +157,12 @@ begin CNSendMessage(LM_LV_SELECTITEM,self,FSelected); end; +procedure TCustomListView.Loaded; +begin + inherited Loaded; + DoUpdate; +end; + {------------------------------------------------------------------------------} { TCustomListView DoDeletion } {------------------------------------------------------------------------------} @@ -540,6 +545,9 @@ end; { ============================================================================= $Log$ + Revision 1.23 2002/10/09 11:46:04 lazarus + MG: fixed loading TListView from stream + Revision 1.22 2002/09/14 14:47:41 lazarus MG: fixed icons diff --git a/lcl/include/listcolumn.inc b/lcl/include/listcolumn.inc index 26135caa26..58555e6548 100644 --- a/lcl/include/listcolumn.inc +++ b/lcl/include/listcolumn.inc @@ -32,7 +32,7 @@ begin FMinWidth := Col.MinWidth; FVisible := Col.Visible; FWidth := Col.Width; - Changed(False); + Changed(False); end else inherited Assign(ASource); end; @@ -74,7 +74,6 @@ end; procedure TListColumn.SetCaption(const AValue: String); begin if AValue = FCaption then Exit; - FCaption := AValue; Changed(False); end; @@ -122,6 +121,9 @@ end; { ============================================================================= $Log$ + Revision 1.4 2002/10/09 11:46:04 lazarus + MG: fixed loading TListView from stream + Revision 1.3 2002/05/10 06:05:53 lazarus MG: changed license to LGPL diff --git a/lcl/include/listcolumns.inc b/lcl/include/listcolumns.inc index a8697db4a6..9d9f57ff66 100644 --- a/lcl/include/listcolumns.inc +++ b/lcl/include/listcolumns.inc @@ -38,7 +38,7 @@ begin inherited SetItem(AIndex, AValue); end; -procedure TListColumns.Update(AItem: TCollectionItem); +procedure TListColumns.Update(AnItem: TCollectionItem); begin //TODO: Optimize implementation by invoking individual upadates instead of // recreating window @@ -49,6 +49,9 @@ end; { ============================================================================= $Log$ + Revision 1.4 2002/10/09 11:46:05 lazarus + MG: fixed loading TListView from stream + Revision 1.3 2002/05/10 06:05:53 lazarus MG: changed license to LGPL