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