TvpNavBar.RemoveItem also removes Folder
Brought to you by:
tpsfadmin
VpNavBar.Pas.
The RemoveItem function also removes the folder (folder
count is reduced).
This is caused by the statement:
FolderCollection.Delete(AItemIndex);
Why is it there?
Will removing it, cause other problems?
procedure TVpCustomNavBar.RemoveItem
(AFolderIndex, AItemIndex : Integer);
var
Folder : TVpNavFolder;
begin
Folder := TVpNavFolder(FolderCollection.GetItem
(AFolderIndex));
Folder.Items[AItemIndex].Free;
{$IFDEF VERSION5}
//This also removes the folder
FolderCollection.Delete(AItemIndex);
{$ENDIF}
end;