× Components and Libraries for Algorithms Development, discussions, problems and suggestions

Question Abbrevia - abListView example

  • Jan Roza
  • Jan Roza's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
6 years 2 months ago #5506 by Jan Roza
Abbrevia - abListView example was created by Jan Roza
I'm using the abTreeView and abListView in my program but I cannot figger out how to unzip selected files from the abListView.
Has anyone used this and if so can you provide an example how to extract files selected in the listview from a zip file?
Any help would be greatly appreciated.

Operating Systems Windows 10 (64-bit) and virtual Linux Mint (64-bit)

Please Log in or Create an account to join the conversation.

  • Jan Roza
  • Jan Roza's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
6 years 2 months ago #5507 by Jan Roza
Replied by Jan Roza on topic Abbrevia - abListView example
Finally found out how it works.
procedure TfrmRestore.btnRestoreClick(Sender: TObject);
var
  i: integer;
  strItem: string;
begin
  with TFileOpenDialog.Create(nil) do
    try
      Options := [fdoPickFolders, fdoPathMustExist];

      if Execute
      then begin
           for i := 0 to AbListView1.Items.Count - 1 do
           begin
             if AbListView1.Items.Item[i].Checked = True
             then begin
                  strItem := AbListView1.Path + '\' + AbListView1.Items.Item[i].Caption;
                  AbUnZipper1.BaseDirectory := FileName;
                  AbUnZipper1.ExtractFiles(strItem);
             end;
           end;
      end;
    finally
      Free;
    end;
end;

Maybe other Abbrevia users can use it to their benefit.

Operating Systems Windows 10 (64-bit) and virtual Linux Mint (64-bit)

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
6 years 2 months ago #5508 by Sternas Stefanos
Replied by Sternas Stefanos on topic Abbrevia - abListView example
Thanks Sir

PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.