mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 16:27:26 +01:00
* Delphi compatebility. Patch from Graeme Geldenhuys
git-svn-id: trunk@8390 -
This commit is contained in:
parent
b234e3cdfc
commit
bd4284dbd7
@ -565,6 +565,8 @@ type
|
||||
TListItemFlag = (lifDestroying, lifCreated);
|
||||
TListItemFlags = set of TListItemFlag;
|
||||
|
||||
{ TListItem }
|
||||
|
||||
TListItem = class(TPersistent)
|
||||
private
|
||||
FOwner: TListItems;
|
||||
@ -574,6 +576,7 @@ type
|
||||
FData: Pointer;
|
||||
FImageIndex: Integer;
|
||||
FStates: TListItemStates;
|
||||
function GetListView: TCustomListView;
|
||||
function GetState(const ALisOrd: Integer): Boolean;
|
||||
function GetIndex: Integer;
|
||||
function GetSubItemImages(const AIndex: Integer): Integer;
|
||||
@ -606,6 +609,7 @@ type
|
||||
property Focused: Boolean index Ord(lisFocused) read GetState write SetState;
|
||||
property Index: Integer read GetIndex;
|
||||
property ImageIndex: Integer read FImageIndex write SetImageIndex default -1;
|
||||
property ListView: TCustomListView read GetListView;
|
||||
property Owner: TListItems read FOwner;
|
||||
property Selected: Boolean index Ord(lisSelected) read GetState write SetState;
|
||||
property SubItems: TStrings read GetSubItems write SetSubItems;
|
||||
|
||||
@ -442,6 +442,14 @@ begin
|
||||
else Result := AState in FStates;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
{ The ListView this ListItem belongs to }
|
||||
{------------------------------------------------------------------------------}
|
||||
function TListItem.GetListView: TCustomListView;
|
||||
begin
|
||||
Result := Owner.Owner;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
{ TListItem GetSubItemImages }
|
||||
{------------------------------------------------------------------------------}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user