Posted February 13, 20196 yr 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?
May 25, 20196 yr 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, 20196 yr by Kurapica
May 26, 20196 yr You can add a TFileOpenDialog with the options... fdoPickFolders fdoAllowMultiSelect 😀
June 22, 20205 yr Author On 5/26/2019 at 8:34 PM, NOP said: You can add a TFileOpenDialog with the options... fdoPickFolders fdoAllowMultiSelect 😀
June 22, 20205 yr with TCustomFileOpenDialog.Create(nil)do try Options := [fdoPickFolders,fdoAllowMultiSelect]; if Execute then begin // Do something end; finally Free; end;
June 23, 20205 yr Author 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?
June 23, 20205 yr Title := 'Some Title'; FileNameLabel := 'Some Label'; OkButtonLabel := 'Some Button Label'; and Files is a TStringList of your selected folders
June 23, 20205 yr Author 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
Create an account or sign in to comment