Recent

Author Topic: [SOLVED] Update TShell(Tree|List)View  (Read 15001 times)

wp

  • Hero Member
  • *****
  • Posts: 12864
Re: [SOLVED] Update TShell(Tree|List)View
« Reply #45 on: November 17, 2023, 10:43:09 pm »
Committed. A little bit different code so that the backslash after c: is retained:
Code: Pascal  [Select][+][-]
  1.   function FindExistingSubPath(APath: String): String;
  2.   var
  3.     path: String;
  4.     i: Integer;
  5.   begin
  6.     APath := AppendPathDelim(APath);
  7.     Result := APath;
  8.     for i := 1 to Length(APath) do
  9.     begin
  10.       if APath[i] = PathDelimiter then
  11.       begin
  12.         path := Copy(APath, 1, i);
  13.         if Exists(path) then
  14.           Result := path
  15.         else
  16.           break;
  17.       end;
  18.     end;
  19.     Result := ChompPathDelim(Result);
  20.   end;

d7_2_laz

  • Hero Member
  • *****
  • Posts: 637
Re: [SOLVED] Update TShell(Tree|List)View
« Reply #46 on: November 18, 2023, 10:16:59 am »
So cool! I looked into the committed update with regard to the last topics discussed, and tried it.
I think, now the procedure is very well prepared for an efficient usage.

Many thanks tcrass for your initial implementation
and to you wp for the integration and input, the possibility to discuss and the final updates and commits !
Lazarus 4.0  FPC 3.2.2 Win10 64bit

 

TinyPortal © 2005-2018