Menu

#72 TvpNavBar.RemoveItem also removes Folder

open
nobody
5
2013-01-15
2003-04-14
No

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;

Discussion


Log in to post a comment.

MongoDB Logo MongoDB