SftDirectory 2.5

SftDirectory.Filtering Event

Softel vdm, Inc.

A file/folder is added.

Syntax       

VB.NET

Private Sub object_Filtering(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.Filtering

VB

Private Sub object_Filtering(Folder As SftDirectoryFolder, RemoveFolder As Boolean)

C#.NET

void object_Filtering(object sender, EventArgumentType e);

VC++

void OnFilteringobject(ISftDirectoryFolder** Folder, VARIANT_BOOL* RemoveFolder);

C

HRESULT OnFilteringobject(ISftDirectoryFolder** Folder, VARIANT_BOOL* RemoveFolder);

Delphi

procedure objectFiltering(Sender: TObject; var Folder : ISftDirectoryFolder; var RemoveFolder : WordBool);

object

A SftDirectory object.

Folder

Describes the SftDirectoryFolder being added to the control's contents.

RemoveFolder

Set to True to remove the folder from the control's contents or False to accept the folder.

Comments

The Filtering event occurs when a file/folder is added.

An application can decide to remove the folder as it is being added to the control, to implement application-specific filtering based on folder attributes or contents.

The AutoInitialLoad property may need to be set to False so the control does not load its contents immediately.  This may be necessary if filtering is desired.  The Filtering event may not occur when the control is initially created, due to certain environment restrictions.  For example, in Visual Basic, the Filtering event is not generated until the Form_Load event has occurred.  The control however is created before the Form_Load event occurs, preventing the Filtering events from being handled by the application. This in effect prevents any filtering from taking place.  The solution is to set AutoInitialLoad to False and use the control's Reload method in the Form_Load event.  Setting AutoInitialLoad to False isn't absolutely necessary, but it may save processing time as the control contents are only loaded once, in response to the Reload method.


Feedback / comments / error reports for this topic
© 2003, 2008 - Softel vdm, Inc. - www.softelvdm.com