Pascal Scripting: CreateInputOptionPage

Prototype

function CreateInputOptionPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; Exclusive, ListBox: Boolean): TInputOptionWizardPage;

Description

Creates a wizard page containing check boxes or radio buttons.

If Exclusive is True, radio buttons are displayed instead of check boxes, and only one item in the list may be selected at a time. If ListBox is True, the check boxes or radio buttons are placed inside a scrollable list box.

Remarks

To create check boxes / radio buttons on the page, call the Add method. Use the Values property to get/set the checked state of items. On pages created with Exclusive set to True, you can get/set the index of the one selected item via the SelectedValueIndex property.

Example:
var
  Page: TInputOptionWizardPage;
  IsRegisteredUser: Boolean;

...

// Create the page
Page := CreateInputOptionPage(wpWelcome,
  'License Information', 'Are you a registered user?',
  'If you are a registered user, please check the box below, then click Next.',
  False, False);

// Add items
Page.Add('&I am a registered user');

// Set initial values (optional)
Page.Values[0] := False;

...

// Read values into variables
IsRegisteredUser := Page.Values[0];

See AllPagesExample.iss for another example.

See also

TInputOptionWizardPage