RusSun Posted February 13, 2019 Posted February 13, 2019 Hi, everybody. I'm using KOL - Key Objects Library. Need a dialog to select multiple folders. This option works for text files. procedure click button2(dummy: pointer;Slender: Control; var mouse:TMouseEventData); var s: String; begin Dialog: = NewOpenSaveDialog ( " , FileFullPath ('Project1.exe'), [ OSFileMustExist, OSHideReadonly, OSAllowMultiSelect, OSOverwritePrompt, OSPathMustExist ] ); dialog.Filter:= '*.txt/*.txt|all/*.*'; Dialogue.OpenDialog: = true; if Dialog.Execute then / / else exit; s:=Dialog.Filename; k:=-1; while s < > " do begin inc(k); a[k]:=Trim( Parse( s, #13 ) ); s: = Trim( s ); end; form.Caption:=inttostr(k); Forms'.Add2AutoFree (Dialogue); end; Q: how to do for multiple folders?
uqr02060 Posted May 25, 2019 Posted May 25, 2019 I'm amazed to see people still use Delphi these days.
Kurapica Posted May 25, 2019 Posted May 25, 2019 (edited) Maybe this can help : http://www.gtro.com/delphi/gtrocheckshelltreeview_e.php www.gtro.com/download/gtrocheckshelltreeview.zipgtrocheckshelltreeview.zip you will have to dig deep in the old archives ! gtrocheckshelltreeview.zip Edited May 25, 2019 by Kurapica
NOP Posted May 26, 2019 Posted May 26, 2019 You can add a TFileOpenDialog with the options... fdoPickFolders fdoAllowMultiSelect 😀
RusSun Posted June 22, 2020 Author Posted June 22, 2020 On 5/26/2019 at 8:34 PM, NOP said: You can add a TFileOpenDialog with the options... fdoPickFolders fdoAllowMultiSelect 😀
NOP Posted June 22, 2020 Posted June 22, 2020 with TCustomFileOpenDialog.Create(nil)do try Options := [fdoPickFolders,fdoAllowMultiSelect]; if Execute then begin // Do something end; finally Free; end;
RusSun Posted June 23, 2020 Author Posted June 23, 2020 18 hours ago, NOP said: with TCustomFileOpenDialog.Create(nil)do try Options := [fdoPickFolders,fdoAllowMultiSelect]; if Execute then begin // Do something end; finally Free; end; How to acsses to info that will be managed by this Tcustom dialog?
NOP Posted June 23, 2020 Posted June 23, 2020 Title := 'Some Title'; FileNameLabel := 'Some Label'; OkButtonLabel := 'Some Button Label'; and Files is a TStringList of your selected folders
RusSun Posted June 23, 2020 Author Posted June 23, 2020 1 hour ago, NOP said: Title := 'Some Title'; FileNameLabel := 'Some Label'; OkButtonLabel := 'Some Button Label'; and Files is a TStringList of your selected folders Thnx! full answer
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now