You can affect the sorting of the ShellTree used by the RzSelectFolderDialog component by do a little bit of a hack. For example,
uses
RzShellFolderForm;
procedure TForm13.RzButton1Click(Sender: TObject);
begin
RzSelectFolderDialog1.Execute;
end;
function CustomSortProc(Node1, Node2: TTreeNode; Data: Integer): Integer; stdcall;
begin
Result := -AnsiStrIComp(PChar(Node1.Text), PChar(Node2.Text));
end;
procedure TForm13.RzSelectFolderDialog1FormShow(Sender: TObject);
begin
TRzSelectFolderForm( RzSelectFolderDialog1.Form ).ShellTree.CustomSort(@CustomSortProc, 0);
end;
This example will reverse sort the nodes in the Shell Tree.
The problem is that there is no simple way to get at the information you want to sort on. That is, the date modified. That information is not tracked with each node in the Shell Tree. You may be able to do some other lookup to get the information you need, then you could modify the CustomSortProc function to sort by modified date.
Ray