2

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
  • 188,800
  • 56
  • 490
  • 992
BenDev
  • 349
  • 3
  • 18

1 Answers1

2

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
  • 188,800
  • 56
  • 490
  • 992
  • 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