From c18e6db6f73b14a3546a67a89c8834b64aa51a68 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Fri, 9 Oct 2009 13:02:27 +0200 Subject: New Count property to ImageList class. Signed-off-by: Graeme Geldenhuys --- src/corelib/fpg_imagelist.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/fpg_imagelist.pas b/src/corelib/fpg_imagelist.pas index 6f2f4466..1150211a 100644 --- a/src/corelib/fpg_imagelist.pas +++ b/src/corelib/fpg_imagelist.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Library - Copyright (C) 2006 - 2008 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2009 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -64,6 +64,7 @@ type function GetFListIndex(AIndex: Integer): Integer; function GetItem(AIndex: integer): TfpgImageItem; procedure SetItem(AIndex: integer; AItem: TfpgImageItem); + function GetCount: integer; public constructor Create; destructor Destroy; override; @@ -72,6 +73,7 @@ type procedure RemoveIndex(AIndex: integer); function GetMaxItem: integer; property Item[AIndex: integer]: TfpgImageItem read GetItem write SetItem; + property Count: integer read GetCount; end; @@ -126,6 +128,11 @@ begin FList.Add(AItem); end; +function TfpgImageList.GetCount: integer; +begin + Result := FList.Count; +end; + constructor TfpgImageList.Create; begin FList := TList.Create; -- cgit v1.2.3-70-g09d2