Hi,
I select an Item by code:
ACollectionView.SelectItem(ASection,ARow,spCollectionViewScrollPositionNone,false);
This item can be outside the visible area.
Only when the selected item is not visible on screen I want to scroll to it:
if ItemNotVisible then begin <- ?
if ARow < AOldRow then
ACollection.ScrollToItem(ASection,ARow,spCollectionViewScrollPositionTop,true)
else
ACollection.ScrollToItem(ASection,ARow,spCollectionViewScrollPositionBottom,true);
ACollection.ScrollToItem(ASection,ARow,spCollectionViewScrollPositionTop,true)
else
ACollection.ScrollToItem(ASection,ARow,spCollectionViewScrollPositionBottom,true);
end;
How can I implement the function ItemNotVisible ?
Thanks in advance,
Dietrich