MG: fixed loading TListView from stream

git-svn-id: trunk@3492 -
This commit is contained in:
lazarus 2002-10-09 11:46:05 +00:00
parent 1c558db206
commit ae5d7dfda1
6 changed files with 27 additions and 7 deletions

View File

@ -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

View File

@ -631,6 +631,7 @@ begin
FTop:=FRealTop;
FWidth:=FRealWidth;
FHeight:=FRealHeight;
InvalidGuideLinesCache;
Exclude(FStates,cssBoundsNeedsUpdate);
end;

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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