6
私はinno-setupベースのインストーラでカスタムウィザードページを作成することにしました。しかし、私は一からそれを作成したくありません。私はTInputDirWizardPageを取得し、それを変更したいと思います。コンボボックスを追加します。出来ますか?どうやってするの?Inno-setup:既存のページタイプに基づくカスタムウィザードページ
私はinno-setupベースのインストーラでカスタムウィザードページを作成することにしました。しかし、私は一からそれを作成したくありません。私はTInputDirWizardPageを取得し、それを変更したいと思います。コンボボックスを追加します。出来ますか?どうやってするの?Inno-setup:既存のページタイプに基づくカスタムウィザードページ
私はそれを自分で考え出しました。だから私は自分の質問に答えます。サンプルコードは次のとおりです。
[Code]
const DB_PAGE_CAPTION='Select Application Database Folder';
DB_PAGE_DESCRIPTION='Where should application database files be installed or where your database files already are?';
DB_PAGE_SUBCAPTION='In case of new installation select the folder in which Setup should install application database files, then click Next. Or select folder where previous version of application stored database files, then click Next';
var databasePage : TInputDirWizardPage;//this is predefined form declaration
CheckListBox : TNewCheckListBox; //this is new element i'm about to add to page
procedure createDatabaseWizardPage; //creating page
begin
databasePage :=CreateInputDirPage(wpSelectDir,
DB_PAGE_CAPTION,
DB_PAGE_DESCRIPTION,
DB_PAGE_SUBCAPTION,
False, '');
databasePage.Add('');
databasePage.buttons[0].Top:=databasePage.buttons[0].Top+ScaleY(70);//moving predefined
databasePage.edits[0].Top:=databasePage.edits[0].Top+ScaleY(70); //elements down.
databasePage.edits[0].Text:=ExpandConstant('{commonappdata}\my app');//default value
CheckListBox := TNewCheckListBox.Create(databasePage);//creating and modifying new checklistbox
CheckListBox.Top := 40 + ScaleY(8);
CheckListBox.Width := databasePage.SurfaceWidth;
CheckListBox.Height := ScaleY(50);
CheckListBox.BorderStyle := bsNone;
CheckListBox.ParentColor := True;
CheckListBox.MinItemHeight := WizardForm.TasksList.MinItemHeight;
CheckListBox.ShowLines := False;
CheckListBox.WantTabs := True;
CheckListBox.Parent := databasePage.Surface;//setting control's parent element
CheckListBox.AddRadioButton('New Installation', '', 0, True, True, nil);
CheckListBox.AddRadioButton('Update existing copy', '', 0, False, True, nil);
end;
procedure InitializeWizard;
begin
createDatabaseWizardPage();
end;
ありがとうございました! :-)
あなたのソリューションを共有してくれてありがとう、非常に助かりました! – reiniero