mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 10:00:34 +02:00
lcl: setting items state on listview handle creation
git-svn-id: trunk@23724 -
This commit is contained in:
parent
1f6c52fe1a
commit
11f880e78a
@ -720,6 +720,7 @@ type
|
|||||||
procedure WSUpdateText;
|
procedure WSUpdateText;
|
||||||
procedure WSUpdateImages;
|
procedure WSUpdateImages;
|
||||||
procedure WSUpdateChecked;
|
procedure WSUpdateChecked;
|
||||||
|
procedure WSSetState;
|
||||||
procedure WSUpdateState;
|
procedure WSUpdateState;
|
||||||
|
|
||||||
procedure SetChecked(AValue: Boolean);
|
procedure SetChecked(AValue: Boolean);
|
||||||
|
@ -230,6 +230,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
LVN_ITEMCHANGED: begin
|
LVN_ITEMCHANGED: begin
|
||||||
Item := Items[nm^.iItem];
|
Item := Items[nm^.iItem];
|
||||||
|
if not (lisfWSItemsCreated in FListItems.Flags) then Exit;
|
||||||
//DebugLn('TCustomListView.CNNotify Count=',dbgs(Items.Count),' nm^.iItem=',dbgs(nm^.iItem),' destroying=',dbgs(lifDestroying in Item.FFlags));
|
//DebugLn('TCustomListView.CNNotify Count=',dbgs(Items.Count),' nm^.iItem=',dbgs(nm^.iItem),' destroying=',dbgs(lifDestroying in Item.FFlags));
|
||||||
if (Item <> nil) and (not OwnerData) and (lifDestroying in Item.FFlags) then begin
|
if (Item <> nil) and (not OwnerData) and (lifDestroying in Item.FFlags) then begin
|
||||||
if Item=FFocused then
|
if Item=FFocused then
|
||||||
|
@ -458,6 +458,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TListItem.WSSetState;
|
||||||
|
var
|
||||||
|
AState: TListItemState;
|
||||||
|
LV: TCustomListView;
|
||||||
|
idx: Integer;
|
||||||
|
begin
|
||||||
|
LV := FOwner.FOwner;
|
||||||
|
idx := GetIndex;
|
||||||
|
for AState := Low(TListItemState) to High(TListItemState) do
|
||||||
|
TWSCustomListViewClass(LV.WidgetSetClass).ItemSetState(LV, idx, Self, AState, AState in FStates);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
{ TListItem IntfUpdateAllowed }
|
{ TListItem IntfUpdateAllowed }
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
|
@ -185,6 +185,8 @@ begin
|
|||||||
FCacheItem.WSUpdateText;
|
FCacheItem.WSUpdateText;
|
||||||
FCacheItem.WSUpdateImages;
|
FCacheItem.WSUpdateImages;
|
||||||
FCacheItem.WSUpdateChecked;
|
FCacheItem.WSUpdateChecked;
|
||||||
|
if not (lisfWSItemsCreated in FFlags) then
|
||||||
|
FCacheItem.WSSetState;
|
||||||
FCacheItem.WSUpdateState;
|
FCacheItem.WSUpdateState;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user