1

In my setup, in the browser showed by a "Browse" button (wpSelectDir or CreateInputDirPage for example), a Network is never shown.

I've searched a while on this but I haven't found any solution for now. Is there a way to show network and let the user select a network path?

Thanks for any help on this!

Martin Prikryl
  • 167,268
  • 50
  • 405
  • 846
BenDev
  • 309
  • 2
  • 16

1 Answers1

1

Hardly.

But you can re-implement the button using the BrowseForFolder function, which does show the network.

For example for the CreateInputDirPage:

var
  Page: TInputDirWizardPage;

procedure DirBrowseButtonClick(Sender: TObject);
var
  Path: String;
begin
  Path := Page.Values[0];
  if BrowseForFolder(SetupMessage(msgBrowseDialogLabel), Path, True) then
  begin
    Page.Values[0] := Path;
  end;
end;

procedure InitializeWizard();
begin
  Page := CreateInputDirPage(...);
  Page.Add('');
  Page.Buttons[0].OnClick := @DirBrowseButtonClick;
end;
Martin Prikryl
  • 167,268
  • 50
  • 405
  • 846
  • Hey, very thanks to you! How could I not have thought of that before? Pretty clean and quick solution ;) – BenDev Aug 29 '16 at 08:06