Class TTreeListItems

Unit

Declaration

type TTreeListItems = class(TObjectList)

Description

This is the list used for storing (sub)-items

Hierarchy

Overview

Methods

Public constructor create(parent:TTreeListItem;const TreeListView:TTreeListView);
Public function Add(caption:string=''):TTreelistItem; overload;
Public function Add(captions:array of string):TTreelistItem; overload;
Public function Add(Parent:TTreeListItem;caption:string=''):TTreelistItem; overload;
Public function GetRealItemCount(const countTyp:TRealItemCounting ) :integer;
Public function RealIndexOf(const item:ttreeListItem;const countTyp:TRealItemCounting):integer;
Public function GetItemWithRealIndex(index:integer;const countTyp:TRealItemCounting):TTreeListItem;
Public function FindItemWithText(caption: string): TTreeListItem;
Public function FindItemWithRecordText(text: string;pos: longint=0):TTreeListItem;
Public function find(searchFor: string; searchFields:cardinal; backward: boolean=false; loopAround: PBOOL=nil; startItem: TTreeListItem=nil; startColumn: longint=0; startTextPosition:longint=0): TTreeListRecordItem; overload;

Properties

Public property Items[Index: Integer]: TTreeListItem read Get write Put;

Description

Methods

Public constructor create(parent:TTreeListItem;const TreeListView:TTreeListView);
 
Public function Add(caption:string=''):TTreelistItem; overload;

This adds an item with the given caption to this list

Public function Add(captions:array of string):TTreelistItem; overload;

This adds an item with the given record texts

Public function Add(Parent:TTreeListItem;caption:string=''):TTreelistItem; overload;

This adds an item with the given parent and caption
If parent is Nil the item is added to this list, otherwise to the list parent.subitems

Public function GetRealItemCount(const countTyp:TRealItemCounting ) :integer;

This counts all (direct and indirect) children of this item

Public function RealIndexOf(const item:ttreeListItem;const countTyp:TRealItemCounting):integer;

This retrieve the real index of the given item
The real index tells you how many items (including all children) are between item and self
This also finds indirect children

Public function GetItemWithRealIndex(index:integer;const countTyp:TRealItemCounting):TTreeListItem;

This get the item which are certain real index

See also
RealIndexOf
This retrieve the real index of the given item
The real index tells you how many items (including all children) are between item and self
This also finds indirect children
Public function FindItemWithText(caption: string): TTreeListItem;

This searches recursive for a item with the given caption

Returns

the first matching item or nil if nothing is found

Public function FindItemWithRecordText(text: string;pos: longint=0):TTreeListItem;

This searches recursive for a item with text in the column pos (if pos = 0 this is the same as FindItemWithText)

Returns

the first matching item or nil if nothing is found

Public function find(searchFor: string; searchFields:cardinal; backward: boolean=false; loopAround: PBOOL=nil; startItem: TTreeListItem=nil; startColumn: longint=0; startTextPosition:longint=0): TTreeListRecordItem; overload;

This searches the text searchFor in searchFields.

Parameters
searchFields
Bit-wise combination of column numbers. Use 1 shl i for column i. (you can only use the first 32 columns)
backward
Specifies search direction

Properties

Public property Items[Index: Integer]: TTreeListItem read Get write Put;

access to the direct sub items


Generated by PasDoc 0.16.0.