|
@@ -5,11 +5,18 @@
|
|
[Setup]
|
|
[Setup]
|
|
AppName=My Program
|
|
AppName=My Program
|
|
AppVersion=1.5
|
|
AppVersion=1.5
|
|
|
|
+WizardStyle=modern
|
|
CreateAppDir=no
|
|
CreateAppDir=no
|
|
DisableProgramGroupPage=yes
|
|
DisableProgramGroupPage=yes
|
|
DefaultGroupName=My Program
|
|
DefaultGroupName=My Program
|
|
UninstallDisplayIcon={app}\MyProg.exe
|
|
UninstallDisplayIcon={app}\MyProg.exe
|
|
OutputDir=userdocs:Inno Setup Examples Output
|
|
OutputDir=userdocs:Inno Setup Examples Output
|
|
|
|
+PrivilegesRequired=lowest
|
|
|
|
+
|
|
|
|
+; Uncomment the following three lines to test the layout when scaling and rtl are active
|
|
|
|
+;[LangOptions]
|
|
|
|
+;RightToLeft=yes
|
|
|
|
+;DialogFontSize=12
|
|
|
|
|
|
[Files]
|
|
[Files]
|
|
Source: compiler:WizModernSmallImage.bmp; Flags: dontcopy
|
|
Source: compiler:WizModernSmallImage.bmp; Flags: dontcopy
|
|
@@ -36,37 +43,43 @@ begin
|
|
Form.ClientWidth := ScaleX(256);
|
|
Form.ClientWidth := ScaleX(256);
|
|
Form.ClientHeight := ScaleY(128);
|
|
Form.ClientHeight := ScaleY(128);
|
|
Form.Caption := 'TSetupForm';
|
|
Form.Caption := 'TSetupForm';
|
|
- Form.CenterInsideControl(WizardForm, False);
|
|
|
|
|
|
|
|
Edit := TNewEdit.Create(Form);
|
|
Edit := TNewEdit.Create(Form);
|
|
Edit.Top := ScaleY(10);
|
|
Edit.Top := ScaleY(10);
|
|
Edit.Left := ScaleX(10);
|
|
Edit.Left := ScaleX(10);
|
|
Edit.Width := Form.ClientWidth - ScaleX(2 * 10);
|
|
Edit.Width := Form.ClientWidth - ScaleX(2 * 10);
|
|
Edit.Height := ScaleY(23);
|
|
Edit.Height := ScaleY(23);
|
|
|
|
+ Edit.Anchors := [akLeft, akTop, akRight];
|
|
Edit.Text := 'TNewEdit';
|
|
Edit.Text := 'TNewEdit';
|
|
Edit.Parent := Form;
|
|
Edit.Parent := Form;
|
|
|
|
|
|
OKButton := TNewButton.Create(Form);
|
|
OKButton := TNewButton.Create(Form);
|
|
OKButton.Parent := Form;
|
|
OKButton.Parent := Form;
|
|
- OKButton.Width := ScaleX(75);
|
|
|
|
- OKButton.Height := ScaleY(23);
|
|
|
|
OKButton.Left := Form.ClientWidth - ScaleX(75 + 6 + 75 + 10);
|
|
OKButton.Left := Form.ClientWidth - ScaleX(75 + 6 + 75 + 10);
|
|
OKButton.Top := Form.ClientHeight - ScaleY(23 + 10);
|
|
OKButton.Top := Form.ClientHeight - ScaleY(23 + 10);
|
|
|
|
+ OKButton.Width := ScaleX(75);
|
|
|
|
+ OKButton.Height := ScaleY(23);
|
|
|
|
+ OKButton.Anchors := [akRight, akBottom]
|
|
OKButton.Caption := 'OK';
|
|
OKButton.Caption := 'OK';
|
|
OKButton.ModalResult := mrOk;
|
|
OKButton.ModalResult := mrOk;
|
|
OKButton.Default := True;
|
|
OKButton.Default := True;
|
|
|
|
|
|
CancelButton := TNewButton.Create(Form);
|
|
CancelButton := TNewButton.Create(Form);
|
|
CancelButton.Parent := Form;
|
|
CancelButton.Parent := Form;
|
|
- CancelButton.Width := ScaleX(75);
|
|
|
|
- CancelButton.Height := ScaleY(23);
|
|
|
|
CancelButton.Left := Form.ClientWidth - ScaleX(75 + 10);
|
|
CancelButton.Left := Form.ClientWidth - ScaleX(75 + 10);
|
|
CancelButton.Top := Form.ClientHeight - ScaleY(23 + 10);
|
|
CancelButton.Top := Form.ClientHeight - ScaleY(23 + 10);
|
|
|
|
+ CancelButton.Width := ScaleX(75);
|
|
|
|
+ CancelButton.Height := ScaleY(23);
|
|
|
|
+ CancelButton.Anchors := [akRight, akBottom]
|
|
CancelButton.Caption := 'Cancel';
|
|
CancelButton.Caption := 'Cancel';
|
|
CancelButton.ModalResult := mrCancel;
|
|
CancelButton.ModalResult := mrCancel;
|
|
CancelButton.Cancel := True;
|
|
CancelButton.Cancel := True;
|
|
|
|
|
|
Form.ActiveControl := Edit;
|
|
Form.ActiveControl := Edit;
|
|
|
|
+ { Keep the form from sizing vertically since we don't have any controls which can size vertically }
|
|
|
|
+ Form.KeepSizeY := True;
|
|
|
|
+ { Center on WizardForm. Without this call it will still automatically center, but on the screen }
|
|
|
|
+ Form.FlipSizeAndCenterIfNeeded(True, WizardForm, False);
|
|
|
|
|
|
if Form.ShowModal() = mrOk then
|
|
if Form.ShowModal() = mrOk then
|
|
MsgBox('You clicked OK.', mbInformation, MB_OK);
|
|
MsgBox('You clicked OK.', mbInformation, MB_OK);
|
|
@@ -77,7 +90,8 @@ end;
|
|
|
|
|
|
procedure TaskDialogButtonOnClick(Sender: TObject);
|
|
procedure TaskDialogButtonOnClick(Sender: TObject);
|
|
begin
|
|
begin
|
|
- //TaskDialogMsgBox isn't a class but showing it anyway since it fits with the theme
|
|
|
|
|
|
+ { TaskDialogMsgBox isn't a class but showing it anyway since it fits with the theme }
|
|
|
|
+
|
|
case TaskDialogMsgBox('Choose A or B',
|
|
case TaskDialogMsgBox('Choose A or B',
|
|
'You can choose A or B.', 'You can choose A or B'#13#10#13#10'Do you choose A?',
|
|
'You can choose A or B.', 'You can choose A or B'#13#10#13#10'Do you choose A?',
|
|
mbInformation,
|
|
mbInformation,
|
|
@@ -122,6 +136,7 @@ begin
|
|
Panel.Width := Page.SurfaceWidth div 2 - ScaleX(8);
|
|
Panel.Width := Page.SurfaceWidth div 2 - ScaleX(8);
|
|
Panel.Left := Page.SurfaceWidth - Panel.Width;
|
|
Panel.Left := Page.SurfaceWidth - Panel.Width;
|
|
Panel.Height := Button.Height * 2;
|
|
Panel.Height := Button.Height * 2;
|
|
|
|
+ Panel.Anchors := [akLeft, akTop, akRight];
|
|
Panel.Caption := 'TPanel';
|
|
Panel.Caption := 'TPanel';
|
|
Panel.Color := clWindow;
|
|
Panel.Color := clWindow;
|
|
Panel.BevelKind := bkFlat;
|
|
Panel.BevelKind := bkFlat;
|
|
@@ -147,6 +162,7 @@ begin
|
|
PasswordEdit.Left := Page.SurfaceWidth - Edit.Width;
|
|
PasswordEdit.Left := Page.SurfaceWidth - Edit.Width;
|
|
PasswordEdit.Top := CheckBox.Top + CheckBox.Height + ScaleY(8);
|
|
PasswordEdit.Top := CheckBox.Top + CheckBox.Height + ScaleY(8);
|
|
PasswordEdit.Width := Edit.Width;
|
|
PasswordEdit.Width := Edit.Width;
|
|
|
|
+ PasswordEdit.Anchors := [akLeft, akTop, akRight];
|
|
PasswordEdit.Text := 'TPasswordEdit';
|
|
PasswordEdit.Text := 'TPasswordEdit';
|
|
PasswordEdit.Parent := Page.Surface;
|
|
PasswordEdit.Parent := Page.Surface;
|
|
|
|
|
|
@@ -154,6 +170,7 @@ begin
|
|
Memo.Top := Edit.Top + Edit.Height + ScaleY(8);
|
|
Memo.Top := Edit.Top + Edit.Height + ScaleY(8);
|
|
Memo.Width := Page.SurfaceWidth;
|
|
Memo.Width := Page.SurfaceWidth;
|
|
Memo.Height := ScaleY(89);
|
|
Memo.Height := ScaleY(89);
|
|
|
|
+ Memo.Anchors := [akLeft, akTop, akRight, akBottom];
|
|
Memo.ScrollBars := ssVertical;
|
|
Memo.ScrollBars := ssVertical;
|
|
Memo.Text := 'TNewMemo';
|
|
Memo.Text := 'TNewMemo';
|
|
Memo.Parent := Page.Surface;
|
|
Memo.Parent := Page.Surface;
|
|
@@ -162,6 +179,7 @@ begin
|
|
FormButton.Top := Memo.Top + Memo.Height + ScaleY(8);
|
|
FormButton.Top := Memo.Top + Memo.Height + ScaleY(8);
|
|
FormButton.Width := ScaleX(75);
|
|
FormButton.Width := ScaleX(75);
|
|
FormButton.Height := ScaleY(23);
|
|
FormButton.Height := ScaleY(23);
|
|
|
|
+ FormButton.Anchors := [akLeft, akBottom];
|
|
FormButton.Caption := 'TSetupForm';
|
|
FormButton.Caption := 'TSetupForm';
|
|
FormButton.OnClick := @FormButtonOnClick;
|
|
FormButton.OnClick := @FormButtonOnClick;
|
|
FormButton.Parent := Page.Surface;
|
|
FormButton.Parent := Page.Surface;
|
|
@@ -171,6 +189,7 @@ begin
|
|
TaskDialogButton.Left := FormButton.Left + FormButton.Width + ScaleX(8);
|
|
TaskDialogButton.Left := FormButton.Left + FormButton.Width + ScaleX(8);
|
|
TaskDialogButton.Width := ScaleX(110);
|
|
TaskDialogButton.Width := ScaleX(110);
|
|
TaskDialogButton.Height := ScaleY(23);
|
|
TaskDialogButton.Height := ScaleY(23);
|
|
|
|
+ TaskDialogButton.Anchors := [akLeft, akBottom];
|
|
TaskDialogButton.Caption := 'TaskDialogMsgBox';
|
|
TaskDialogButton.Caption := 'TaskDialogMsgBox';
|
|
TaskDialogButton.OnClick := @TaskDialogButtonOnClick;
|
|
TaskDialogButton.OnClick := @TaskDialogButtonOnClick;
|
|
TaskDialogButton.Parent := Page.Surface;
|
|
TaskDialogButton.Parent := Page.Surface;
|
|
@@ -181,6 +200,7 @@ begin
|
|
|
|
|
|
ComboBox := TNewComboBox.Create(Page);
|
|
ComboBox := TNewComboBox.Create(Page);
|
|
ComboBox.Width := Page.SurfaceWidth;
|
|
ComboBox.Width := Page.SurfaceWidth;
|
|
|
|
+ ComboBox.Anchors := [akLeft, akTop, akRight];
|
|
ComboBox.Parent := Page.Surface;
|
|
ComboBox.Parent := Page.Surface;
|
|
ComboBox.Style := csDropDownList;
|
|
ComboBox.Style := csDropDownList;
|
|
ComboBox.Items.Add('TComboBox');
|
|
ComboBox.Items.Add('TComboBox');
|
|
@@ -190,18 +210,21 @@ begin
|
|
ListBox.Top := ComboBox.Top + ComboBox.Height + ScaleY(8);
|
|
ListBox.Top := ComboBox.Top + ComboBox.Height + ScaleY(8);
|
|
ListBox.Width := Page.SurfaceWidth;
|
|
ListBox.Width := Page.SurfaceWidth;
|
|
ListBox.Height := ScaleY(97);
|
|
ListBox.Height := ScaleY(97);
|
|
|
|
+ ListBox.Anchors := [akLeft, akTop, akRight, akBottom];
|
|
ListBox.Parent := Page.Surface;
|
|
ListBox.Parent := Page.Surface;
|
|
ListBox.Items.Add('TListBox');
|
|
ListBox.Items.Add('TListBox');
|
|
ListBox.ItemIndex := 0;
|
|
ListBox.ItemIndex := 0;
|
|
|
|
|
|
StaticText := TNewStaticText.Create(Page);
|
|
StaticText := TNewStaticText.Create(Page);
|
|
StaticText.Top := ListBox.Top + ListBox.Height + ScaleY(8);
|
|
StaticText.Top := ListBox.Top + ListBox.Height + ScaleY(8);
|
|
|
|
+ StaticText.Anchors := [akLeft, akRight, akBottom];
|
|
StaticText.Caption := 'TNewStaticText';
|
|
StaticText.Caption := 'TNewStaticText';
|
|
StaticText.AutoSize := True;
|
|
StaticText.AutoSize := True;
|
|
StaticText.Parent := Page.Surface;
|
|
StaticText.Parent := Page.Surface;
|
|
|
|
|
|
ProgressBarLabel := TNewStaticText.Create(Page);
|
|
ProgressBarLabel := TNewStaticText.Create(Page);
|
|
ProgressBarLabel.Top := StaticText.Top + StaticText.Height + ScaleY(8);
|
|
ProgressBarLabel.Top := StaticText.Top + StaticText.Height + ScaleY(8);
|
|
|
|
+ ProgressBarLabel.Anchors := [akLeft, akBottom];
|
|
ProgressBarLabel.Caption := 'TNewProgressBar';
|
|
ProgressBarLabel.Caption := 'TNewProgressBar';
|
|
ProgressBarLabel.AutoSize := True;
|
|
ProgressBarLabel.AutoSize := True;
|
|
ProgressBarLabel.Parent := Page.Surface;
|
|
ProgressBarLabel.Parent := Page.Surface;
|
|
@@ -211,6 +234,7 @@ begin
|
|
ProgressBar.Top := ProgressBarLabel.Top;
|
|
ProgressBar.Top := ProgressBarLabel.Top;
|
|
ProgressBar.Width := Page.SurfaceWidth - ProgressBar.Left;
|
|
ProgressBar.Width := Page.SurfaceWidth - ProgressBar.Left;
|
|
ProgressBar.Height := ProgressBarLabel.Height + ScaleY(8);
|
|
ProgressBar.Height := ProgressBarLabel.Height + ScaleY(8);
|
|
|
|
+ ProgressBar.Anchors := [akLeft, akRight, akBottom];
|
|
ProgressBar.Parent := Page.Surface;
|
|
ProgressBar.Parent := Page.Surface;
|
|
ProgressBar.Position := 25;
|
|
ProgressBar.Position := 25;
|
|
|
|
|
|
@@ -219,6 +243,7 @@ begin
|
|
ProgressBar2.Top := ProgressBar.Top + ProgressBar.Height + ScaleY(4);
|
|
ProgressBar2.Top := ProgressBar.Top + ProgressBar.Height + ScaleY(4);
|
|
ProgressBar2.Width := Page.SurfaceWidth - ProgressBar.Left;
|
|
ProgressBar2.Width := Page.SurfaceWidth - ProgressBar.Left;
|
|
ProgressBar2.Height := ProgressBarLabel.Height + ScaleY(8);
|
|
ProgressBar2.Height := ProgressBarLabel.Height + ScaleY(8);
|
|
|
|
+ ProgressBar2.Anchors := [akLeft, akRight, akBottom];
|
|
ProgressBar2.Parent := Page.Surface;
|
|
ProgressBar2.Parent := Page.Surface;
|
|
ProgressBar2.Position := 50;
|
|
ProgressBar2.Position := 50;
|
|
{ Note: TNewProgressBar.State property only has an effect on Windows Vista and newer }
|
|
{ Note: TNewProgressBar.State property only has an effect on Windows Vista and newer }
|
|
@@ -229,6 +254,7 @@ begin
|
|
ProgressBar3.Top := ProgressBar2.Top + ProgressBar2.Height + ScaleY(4);
|
|
ProgressBar3.Top := ProgressBar2.Top + ProgressBar2.Height + ScaleY(4);
|
|
ProgressBar3.Width := Page.SurfaceWidth - ProgressBar.Left;
|
|
ProgressBar3.Width := Page.SurfaceWidth - ProgressBar.Left;
|
|
ProgressBar3.Height := ProgressBarLabel.Height + ScaleY(8);
|
|
ProgressBar3.Height := ProgressBarLabel.Height + ScaleY(8);
|
|
|
|
+ ProgressBar3.Anchors := [akLeft, akRight, akBottom];
|
|
ProgressBar3.Parent := Page.Surface;
|
|
ProgressBar3.Parent := Page.Surface;
|
|
{ Note: TNewProgressBar.Style property only has an effect on Windows XP and newer }
|
|
{ Note: TNewProgressBar.Style property only has an effect on Windows XP and newer }
|
|
ProgressBar3.Style := npbstMarquee;
|
|
ProgressBar3.Style := npbstMarquee;
|
|
@@ -239,7 +265,8 @@ begin
|
|
|
|
|
|
CheckListBox := TNewCheckListBox.Create(Page);
|
|
CheckListBox := TNewCheckListBox.Create(Page);
|
|
CheckListBox.Width := Page.SurfaceWidth;
|
|
CheckListBox.Width := Page.SurfaceWidth;
|
|
- CheckListBox.Height := ScaleY(137);
|
|
|
|
|
|
+ CheckListBox.Height := ScaleY(97);
|
|
|
|
+ CheckListBox.Anchors := [akLeft, akTop, akRight, akBottom];
|
|
CheckListBox.Flat := True;
|
|
CheckListBox.Flat := True;
|
|
CheckListBox.Parent := Page.Surface;
|
|
CheckListBox.Parent := Page.Surface;
|
|
CheckListBox.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
|
|
CheckListBox.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
|
|
@@ -254,7 +281,8 @@ begin
|
|
CheckListBox2 := TNewCheckListBox.Create(Page);
|
|
CheckListBox2 := TNewCheckListBox.Create(Page);
|
|
CheckListBox2.Top := CheckListBox.Top + CheckListBox.Height + ScaleY(8);
|
|
CheckListBox2.Top := CheckListBox.Top + CheckListBox.Height + ScaleY(8);
|
|
CheckListBox2.Width := Page.SurfaceWidth;
|
|
CheckListBox2.Width := Page.SurfaceWidth;
|
|
- CheckListBox2.Height := ScaleY(67);
|
|
|
|
|
|
+ CheckListBox2.Height := ScaleY(97);
|
|
|
|
+ CheckListBox2.Anchors := [akLeft, akRight, akBottom];
|
|
CheckListBox2.BorderStyle := bsNone;
|
|
CheckListBox2.BorderStyle := bsNone;
|
|
CheckListBox2.ParentColor := True;
|
|
CheckListBox2.ParentColor := True;
|
|
CheckListBox2.MinItemHeight := WizardForm.TasksList.MinItemHeight;
|
|
CheckListBox2.MinItemHeight := WizardForm.TasksList.MinItemHeight;
|
|
@@ -272,6 +300,7 @@ begin
|
|
FolderTreeView := TFolderTreeView.Create(Page);
|
|
FolderTreeView := TFolderTreeView.Create(Page);
|
|
FolderTreeView.Width := Page.SurfaceWidth;
|
|
FolderTreeView.Width := Page.SurfaceWidth;
|
|
FolderTreeView.Height := Page.SurfaceHeight;
|
|
FolderTreeView.Height := Page.SurfaceHeight;
|
|
|
|
+ FolderTreeView.Anchors := [akLeft, akTop, akRight, akBottom];
|
|
FolderTreeView.Parent := Page.Surface;
|
|
FolderTreeView.Parent := Page.Surface;
|
|
FolderTreeView.Directory := ExpandConstant('{src}');
|
|
FolderTreeView.Directory := ExpandConstant('{src}');
|
|
|
|
|
|
@@ -306,6 +335,7 @@ begin
|
|
BitmapImage3.Left := 3*BitmapImage.Width + 20;
|
|
BitmapImage3.Left := 3*BitmapImage.Width + 20;
|
|
BitmapImage3.Height := 4*BitmapImage.Height;
|
|
BitmapImage3.Height := 4*BitmapImage.Height;
|
|
BitmapImage3.Width := 4*BitmapImage.Width;
|
|
BitmapImage3.Width := 4*BitmapImage.Width;
|
|
|
|
+ BitmapImage3.Anchors := [akLeft, akTop, akRight, akBottom];
|
|
BitmapImage3.Cursor := crHand;
|
|
BitmapImage3.Cursor := crHand;
|
|
BitmapImage3.OnClick := @BitmapImageOnClick;
|
|
BitmapImage3.OnClick := @BitmapImageOnClick;
|
|
BitmapImage3.Parent := Page.Surface;
|
|
BitmapImage3.Parent := Page.Surface;
|
|
@@ -317,6 +347,7 @@ begin
|
|
RichEditViewer := TRichEditViewer.Create(Page);
|
|
RichEditViewer := TRichEditViewer.Create(Page);
|
|
RichEditViewer.Width := Page.SurfaceWidth;
|
|
RichEditViewer.Width := Page.SurfaceWidth;
|
|
RichEditViewer.Height := Page.SurfaceHeight;
|
|
RichEditViewer.Height := Page.SurfaceHeight;
|
|
|
|
+ RichEditViewer.Anchors := [akLeft, akTop, akRight, akBottom];
|
|
RichEditViewer.BevelKind := bkFlat;
|
|
RichEditViewer.BevelKind := bkFlat;
|
|
RichEditViewer.BorderStyle := bsNone;
|
|
RichEditViewer.BorderStyle := bsNone;
|
|
RichEditViewer.Parent := Page.Surface;
|
|
RichEditViewer.Parent := Page.Surface;
|
|
@@ -348,6 +379,7 @@ begin
|
|
AboutButton.Top := CancelButton.Top;
|
|
AboutButton.Top := CancelButton.Top;
|
|
AboutButton.Width := CancelButton.Width;
|
|
AboutButton.Width := CancelButton.Width;
|
|
AboutButton.Height := CancelButton.Height;
|
|
AboutButton.Height := CancelButton.Height;
|
|
|
|
+ AboutButton.Anchors := [akLeft, akBottom];
|
|
AboutButton.Caption := '&About...';
|
|
AboutButton.Caption := '&About...';
|
|
AboutButton.OnClick := @AboutButtonOnClick;
|
|
AboutButton.OnClick := @AboutButtonOnClick;
|
|
AboutButton.Parent := ParentForm;
|
|
AboutButton.Parent := ParentForm;
|
|
@@ -362,6 +394,7 @@ begin
|
|
URLLabel.Font.Color := clHotLight
|
|
URLLabel.Font.Color := clHotLight
|
|
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
|
|
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
|
|
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
|
|
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
|
|
|
|
+ URLLabel.Anchors := [akLeft, akBottom];
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure InitializeWizard();
|
|
procedure InitializeWizard();
|