summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@laptop.(none)>2010-07-22 16:16:09 +0200
committerGraeme Geldenhuys <graemeg@laptop.(none)>2010-07-22 16:16:09 +0200
commit403390b55bbb2b724d6cf03d095948b9f92e20fe (patch)
tree1fb02c5482b43ca87a7323e91ecf793258e1b45e
parentc65a96939317c955d4f90b2fd7ee694ffd8da51a (diff)
downloadfpGUI-403390b55bbb2b724d6cf03d095948b9f92e20fe.tar.xz
ListView: Introduced new .NewItem method.
* This differs from .AddNew, in that it doesn't add the newly created item to the Items list. The developer can decide to insert it anywhere, or add it to the end of the Items list.
-rw-r--r--src/gui/fpg_listview.pas6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/fpg_listview.pas b/src/gui/fpg_listview.pas
index f93c1950..12ed4364 100644
--- a/src/gui/fpg_listview.pas
+++ b/src/gui/fpg_listview.pas
@@ -247,6 +247,7 @@ type
procedure MakeItemVisible(AIndex: Integer; PartialOK: Boolean = False);
function ItemAdd: TfpgLVItem; deprecated;
function AddItem: TfpgLVItem;
+ function NewItem: TfpgLVItem;
published
property Columns: TfpgLVColumns read FColumns;
property HScrollBar: TfpgScrollBar read FHScrollBar;
@@ -1623,6 +1624,11 @@ begin
FItems.Add(Result);
end;
+function TfpgListView.NewItem: TfpgLVItem;
+begin
+ Result := TfpgLVItem.Create(FItems);
+end;
+
{ TfpgLVColumns }
function TfpgLVColumns.GetColumn(AIndex: Integer): TfpgLVColumn;