mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 13:37:45 +02:00
lcl: return TListView.SelCount even if Handle is not allocated (bug #0011057)
git-svn-id: trunk@18404 -
This commit is contained in:
parent
fefaf6be1a
commit
a21dad9e56
@ -673,10 +673,18 @@ begin
|
||||
end;
|
||||
|
||||
function TCustomListView.GetSelCount: Integer;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
if HandleAllocated
|
||||
then Result := TWSCustomListViewClass(WidgetSetClass).GetSelCount(Self)
|
||||
else Result := 0;
|
||||
else
|
||||
begin
|
||||
Result := 0;
|
||||
for i := 0 to Items.Count - 1 do
|
||||
if Items[i].Selected then
|
||||
inc(Result);
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user