Welcome, Guest
Username: Password: Remember me
Components and Libraries for Algorithms Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Abbrevia - abListView example 10 years 6 months ago #5506

  • Jan Roza
  • Jan Roza's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 173
  • Thank you received: 6
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 11 and Linux Mint (64-bit) and virtual Raspberry Pi Desktop

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

Abbrevia - abListView example 10 years 6 months ago #5507

  • Jan Roza
  • Jan Roza's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 173
  • Thank you received: 6
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 11 and Linux Mint (64-bit) and virtual Raspberry Pi Desktop

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

Abbrevia - abListView example 10 years 6 months ago #5508

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
Thanks Sir
PilotLogic Architect and Core Programmer

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

  • Page:
  • 1