Pascal Scripting: CreateInputDirPage

Inno Setup

Pascal Scripting: CreateInputDirPage

Prototype:

function CreateInputDirPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; AAppendDir: Boolean; ANewFolderName: String): TInputDirWizardPage;

Description:

Creates a wizard page that contains edit boxes and Browse buttons for selecting directories. If AAppendDir is True, the value of ANewFolderName will be appended onto any folder name the user clicks. If AAppendDir is False and ANewFolderName is not empty, a Make New Folder button will be shown that creates a new folder with the specified default name.

Remarks:

To create directory selection boxes on the page, call the Add method. Use the Values property to get/set the items' values.

Example:
var
  Page: TInputDirWizardPage;
  DataDir: String;

...

// Create the page
Page := CreateInputDirPage(wpWelcome,
  'Select Personal Data Location', 'Where should personal data files be stored?',
  'Personal data files will be stored in the following folder.'#13#10#13#10 +
  'To continue, click Next. If you would like to select a different folder, click Browse.',
  False, 'New Folder');

// Add item (with an empty caption)
Page.Add('');

// Set initial value (optional)
Page.Values[0] := ExpandConstant('{userappdata}\My Company\My Program');

...

// Read value into variable
DataDir := Page.Values[0];
See also:

TInputDirWizardPage