Search via SearchEdit doesn't seem to work if TJamShellLink.OnNavigating doesn't allow the SearchFolder
Question / Problem
Searching with the TJamShellSearchEdit doesn't work - no results are displayed, the search doesn't even appear to be running. What's wrong?
Answer / Solution
You need to synchronize the TJamShellSearchEdit component (or the TJamShellBreadCrumbbar containing the search pane) with a TJamShellList or an ExplorerBrowser control using a TJamShellLink. This will present the results of the search in the linked control.
If you have restricted the folders accessible for your application via the TJamShellLink.OnNavigating event, be sure to allow the SearchFolder to be opened:
procedure TForm1.JamShellLink1Navigating(Sender: TObject;
const pFolder: IItemIdList; var pCancel: Boolean);
begin
pCancel := not (TJamItemIdList.Create(AllowedPathBranch).IsParentOf(pFolder, true)) and not (IsSearchFolderPath(pFolder.DisplayPath));
end;
The searchfolder is a special folder that holds the temporary search result.