Reputation: 1987
When I use the BrowseForFolder
function in Inno Setup I get a dialog like this
Is it possible to get a dialog with an address bar such as this one?
Upvotes: 3
Views: 1335
Reputation: 202222
Use the TInputDirWizardPage
(CreateInputDirPage
), instead of using the BrowseForFolder
function.
The page has the browse dialog as you want (actually I assume your second screenshot shows this dialog).
If you do not want to add a new page, just create a fake one and abuse it.
var
FakePage: TInputDirWizardPage;
procedure BrowseForFolderEx(var Directory: String);
begin
FakePage.Values[0] := Directory;
FakePage.Buttons[0].OnClick(FakePage.Buttons[0]);
Directory := FakePage.Values[0];
end;
procedure InitializeWizard();
begin
FakePage :=
CreateInputDirPage(wpWelcome, '', '', '', False, SetupMessage(msgButtonNewFolder));
FakePage.Add('');
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result := (PageID = FakePage.ID);
end;
Upvotes: 2