folderlistview OnFolderChanged event
Return to Introduction  Previous page  Next page
Applies to
dcFolderListView component.  

Declaration
type  
  TdcFolderChangedEvent = procedure(Sender: TObject; Folder: Stringof object;  
 
property OnFolderChanged: TdcFolderChangedEvent;  

Description
The OnFolderChanged event occurs when user passes to another subfolder (i.e: clicking the folder icon in the list view), or when you call Back method (i.e: when user clicks the "Up" button to go to up-level folder).  
 
The Folder parameter determines the directory in which user passed to. At once after occuring this event, the content of the list view will be automatically refreshed.  

Note
iiinfo The OnFolderChanged event will not occurs when you changing the Folder property programatically.  

Example
procedure TForm1.dcFolderListView1FolderChanged(Sender: TObject;  
  Folder: String);  
begin  
  dcFolderEdit1.Text := Folder;  
  UpBtn.Enabled := dcFolderListView1.IsBackPossible;  
end;  
 
procedure TForm1.UpBtnClick(Sender: TObject);  
begin  
  dcFolderListView1.Back;  
end;  

See also
Folder property and Back method.