Bug: Canceling a Folder Expand Event Causes Folder Reloading
|Bug: Canceling a Folder
Expand Event Causes Folder Reloading
Last reviewed July 02, 1999
If the Expand event is cancelled for a folder that
has not yet been expanded, when the folder is finally expanded, the FolderTreeview
displays duplicate subfolders under that folder.
The FolderTreeview control still loads a folder's
subfolders whose Expand event is cancelled, but fails to set an internal flag indicating
that the folder's subfolders have been loaded.
When the FolderTreeview's Expand event is cancelled, the FTV correctly loads all the subfolders into the tree under the collapsed parent folder. The parent's subfolders are in the tree, they're just not visible. This functionality is used by the Folder class, and is necessary.
Internally, each time a folder is expanded, the FTV code checks that treeview item's TVIS_EXPANDEDONCE state flag. This flag indicates whether or not the item has been expanded once. If the item has not yet been expanded, the FTV loads the subfolders under that folder item.
When the Expand event is cancelled for a folder
that has never been expanded, the TVIS_EXPANDEDONCE flag is not correctly set. As a
result, all subfolders under a parent folder can get loaded twice or more.
This has been confirmed as a bug and *updated FTV
beta 3 control build will be made available on the CCRP site soon.
Users of the FTV Beta 3 build 0.03.0023 can use the methods in this demo to circumvent the problem. This code will not be necessary in the updated FTV control release.
Existing users of the FTV Beta 3 build 0.03.0023 should download the newer Version 1 control from the following links: