Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Delphi, Dialog to select multiple folders.

Featured Replies

Posted

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?

  • 3 months later...

I'm amazed to see people still use Delphi these days.

You can add a TFileOpenDialog with the options...

  • fdoPickFolders
  • fdoAllowMultiSelect

😀

  • 1 year later...
  • Author
On 5/26/2019 at 8:34 PM, NOP said:

You can add a TFileOpenDialog with the options...

  • fdoPickFolders
  • fdoAllowMultiSelect

😀

image.png.a5c3ca972fb34d83589774e16b94efdd.png

  with TCustomFileOpenDialog.Create(nil)do
    try
      Options := [fdoPickFolders,fdoAllowMultiSelect];
      if Execute then
        begin
            // Do something
        end;
    finally
      Free;
    end;

 

  • 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?

Title := 'Some Title';

FileNameLabel := 'Some Label';

OkButtonLabel := 'Some Button Label';

and Files is a TStringList of your selected folders

  • 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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.