2
0

CodeClasses.iss 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. ; -- CodeClasses.iss --
  2. ;
  3. ; This script shows how to use the WizardForm object and the various VCL classes.
  4. [Setup]
  5. AppName=My Program
  6. AppVersion=1.5
  7. WizardStyle=modern
  8. CreateAppDir=no
  9. DisableProgramGroupPage=yes
  10. DefaultGroupName=My Program
  11. UninstallDisplayIcon={app}\MyProg.exe
  12. OutputDir=userdocs:Inno Setup Examples Output
  13. PrivilegesRequired=lowest
  14. ; Uncomment the following three lines to test the layout when scaling and rtl are active
  15. ;[LangOptions]
  16. ;RightToLeft=yes
  17. ;DialogFontSize=12
  18. [Files]
  19. Source: compiler:WizClassicSmallImage.bmp; Flags: dontcopy
  20. [Code]
  21. procedure ButtonOnClick(Sender: TObject);
  22. begin
  23. MsgBox('You clicked the button!', mbInformation, mb_Ok);
  24. end;
  25. procedure FormButtonOnClick(Sender: TObject);
  26. var
  27. Form: TSetupForm;
  28. Edit: TNewEdit;
  29. OKButton, CancelButton: TNewButton;
  30. W: Integer;
  31. begin
  32. Form := CreateCustomForm();
  33. try
  34. Form.ClientWidth := ScaleX(256);
  35. Form.ClientHeight := ScaleY(128);
  36. Form.Caption := 'TSetupForm';
  37. Edit := TNewEdit.Create(Form);
  38. Edit.Top := ScaleY(10);
  39. Edit.Left := ScaleX(10);
  40. Edit.Width := Form.ClientWidth - ScaleX(2 * 10);
  41. Edit.Height := ScaleY(23);
  42. Edit.Anchors := [akLeft, akTop, akRight];
  43. Edit.Text := 'TNewEdit';
  44. Edit.Parent := Form;
  45. OKButton := TNewButton.Create(Form);
  46. OKButton.Parent := Form;
  47. OKButton.Caption := 'OK';
  48. OKButton.Left := Form.ClientWidth - ScaleX(75 + 6 + 75 + 10);
  49. OKButton.Top := Form.ClientHeight - ScaleY(23 + 10);
  50. OKButton.Height := ScaleY(23);
  51. OKButton.Anchors := [akRight, akBottom]
  52. OKButton.ModalResult := mrOk;
  53. OKButton.Default := True;
  54. CancelButton := TNewButton.Create(Form);
  55. CancelButton.Parent := Form;
  56. CancelButton.Caption := 'Cancel';
  57. CancelButton.Left := Form.ClientWidth - ScaleX(75 + 10);
  58. CancelButton.Top := Form.ClientHeight - ScaleY(23 + 10);
  59. CancelButton.Height := ScaleY(23);
  60. CancelButton.Anchors := [akRight, akBottom]
  61. CancelButton.ModalResult := mrCancel;
  62. CancelButton.Cancel := True;
  63. W := Form.CalculateButtonWidth([OKButton.Caption, CancelButton.Caption]);
  64. OKButton.Width := W;
  65. CancelButton.Width := W;
  66. Form.ActiveControl := Edit;
  67. { Keep the form from sizing vertically since we don't have any controls which can size vertically }
  68. Form.KeepSizeY := True;
  69. { Center on WizardForm. Without this call it will still automatically center, but on the screen }
  70. Form.FlipSizeAndCenterIfNeeded(True, WizardForm, False);
  71. if Form.ShowModal() = mrOk then
  72. MsgBox('You clicked OK.', mbInformation, MB_OK);
  73. finally
  74. Form.Free();
  75. end;
  76. end;
  77. procedure TaskDialogButtonOnClick(Sender: TObject);
  78. begin
  79. { TaskDialogMsgBox isn't a class but showing it anyway since it fits with the theme }
  80. case TaskDialogMsgBox('Choose A or B',
  81. 'You can choose A or B.',
  82. mbInformation,
  83. MB_YESNOCANCEL, ['I choose &A'#13#10'A will be chosen.', 'I choose &B'#13#10'B will be chosen.'],
  84. IDYES) of
  85. IDYES: MsgBox('You chose A.', mbInformation, MB_OK);
  86. IDNO: MsgBox('You chose B.', mbInformation, MB_OK);
  87. end;
  88. end;
  89. procedure LinkLabelOnLinkClick(Sender: TObject; const Link: string; LinkType: TSysLinkType);
  90. var
  91. ErrorCode: Integer;
  92. begin
  93. if (LinkType = sltID) and (Link = 'jrsoftware') then
  94. ShellExecAsOriginalUser('open', 'https://jrsoftware.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
  95. else if LinkType = sltURL then
  96. ShellExecAsOriginalUser('open', Link, '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
  97. end;
  98. procedure CreateTheWizardPages;
  99. var
  100. Page: TWizardPage;
  101. Button, FormButton, TaskDialogButton: TNewButton;
  102. Panel: TPanel;
  103. CheckBox: TNewCheckBox;
  104. Edit: TNewEdit;
  105. PasswordEdit: TPasswordEdit;
  106. Memo: TNewMemo;
  107. ComboBox: TNewComboBox;
  108. ListBox: TNewListBox;
  109. StaticText, StaticText2, ProgressBarLabel: TNewStaticText;
  110. LinkLabel: TNewLinkLabel;
  111. ProgressBar, ProgressBar2, ProgressBar3: TNewProgressBar;
  112. CheckListBox, CheckListBox2: TNewCheckListBox;
  113. FolderTreeView: TFolderTreeView;
  114. BitmapImage, BitmapImage2, BitmapImage3: TBitmapImage;
  115. BitmapButton, BitmapButton2: TBitmapButton;
  116. BitmapFileName: String;
  117. RichEditViewer: TRichEditViewer;
  118. begin
  119. { TButton and others }
  120. Page := CreateCustomPage(wpWelcome, 'Custom wizard page controls', 'TButton and others');
  121. Button := TNewButton.Create(Page);
  122. Button.Caption := 'TNewButton';
  123. Button.Width := WizardForm.CalculateButtonWidth([Button.Caption]);
  124. Button.Height := ScaleY(23);
  125. Button.OnClick := @ButtonOnClick;
  126. Button.Parent := Page.Surface;
  127. Panel := TPanel.Create(Page);
  128. Panel.Width := Page.SurfaceWidth div 2 - ScaleX(8);
  129. Panel.Left := Page.SurfaceWidth - Panel.Width;
  130. Panel.Height := Button.Height * 2;
  131. Panel.Anchors := [akLeft, akTop, akRight];
  132. Panel.Caption := 'TPanel';
  133. Panel.Color := clWindow;
  134. Panel.BevelKind := bkFlat;
  135. Panel.BevelOuter := bvNone;
  136. Panel.ParentBackground := False;
  137. Panel.Parent := Page.Surface;
  138. CheckBox := TNewCheckBox.Create(Page);
  139. CheckBox.Top := Button.Top + Button.Height + ScaleY(8);
  140. CheckBox.Width := Page.SurfaceWidth div 2;
  141. CheckBox.Height := ScaleY(17);
  142. CheckBox.Caption := 'TNewCheckBox';
  143. CheckBox.Checked := True;
  144. CheckBox.Parent := Page.Surface;
  145. Edit := TNewEdit.Create(Page);
  146. Edit.Top := CheckBox.Top + CheckBox.Height + ScaleY(8);
  147. Edit.Width := Page.SurfaceWidth div 2 - ScaleX(8);
  148. Edit.Text := 'TNewEdit';
  149. Edit.Parent := Page.Surface;
  150. PasswordEdit := TPasswordEdit.Create(Page);
  151. PasswordEdit.Left := Page.SurfaceWidth - Edit.Width;
  152. PasswordEdit.Top := CheckBox.Top + CheckBox.Height + ScaleY(8);
  153. PasswordEdit.Width := Edit.Width;
  154. PasswordEdit.Anchors := [akLeft, akTop, akRight];
  155. PasswordEdit.Text := 'TPasswordEdit';
  156. PasswordEdit.Parent := Page.Surface;
  157. Memo := TNewMemo.Create(Page);
  158. Memo.Top := Edit.Top + Edit.Height + ScaleY(8);
  159. Memo.Width := Page.SurfaceWidth;
  160. Memo.Height := ScaleY(89);
  161. Memo.Anchors := [akLeft, akTop, akRight, akBottom];
  162. Memo.ScrollBars := ssVertical;
  163. Memo.Text := 'TNewMemo';
  164. Memo.Parent := Page.Surface;
  165. FormButton := TNewButton.Create(Page);
  166. FormButton.Caption := 'TSetupForm';
  167. FormButton.Top := Memo.Top + Memo.Height + ScaleY(8);
  168. FormButton.Width := WizardForm.CalculateButtonWidth([FormButton.Caption]);
  169. FormButton.Height := ScaleY(23);
  170. FormButton.Anchors := [akLeft, akBottom];
  171. FormButton.OnClick := @FormButtonOnClick;
  172. FormButton.Parent := Page.Surface;
  173. TaskDialogButton := TNewButton.Create(Page);
  174. TaskDialogButton.Caption := 'TaskDialogMsgBox';
  175. TaskDialogButton.Top := FormButton.Top;
  176. TaskDialogButton.Left := FormButton.Left + FormButton.Width + ScaleX(8);
  177. TaskDialogButton.Width := WizardForm.CalculateButtonWidth([TaskDialogButton.Caption]);
  178. TaskDialogButton.Height := ScaleY(23);
  179. TaskDialogButton.Anchors := [akLeft, akBottom];
  180. TaskDialogButton.OnClick := @TaskDialogButtonOnClick;
  181. TaskDialogButton.Parent := Page.Surface;
  182. { TComboBox and others }
  183. Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TComboBox and others');
  184. ComboBox := TNewComboBox.Create(Page);
  185. ComboBox.Width := Page.SurfaceWidth;
  186. ComboBox.Anchors := [akLeft, akTop, akRight];
  187. ComboBox.Parent := Page.Surface;
  188. ComboBox.Style := csDropDownList;
  189. ComboBox.Items.Add('TComboBox');
  190. ComboBox.ItemIndex := 0;
  191. ListBox := TNewListBox.Create(Page);
  192. ListBox.Top := ComboBox.Top + ComboBox.Height + ScaleY(8);
  193. ListBox.Width := Page.SurfaceWidth;
  194. ListBox.Height := ScaleY(97);
  195. ListBox.Anchors := [akLeft, akTop, akRight, akBottom];
  196. ListBox.Parent := Page.Surface;
  197. ListBox.Items.Add('TListBox');
  198. ListBox.ItemIndex := 0;
  199. StaticText := TNewStaticText.Create(Page);
  200. StaticText.Top := ListBox.Top + ListBox.Height + ScaleY(8);
  201. StaticText.Anchors := [akLeft, akRight, akBottom];
  202. StaticText.Caption := 'TNewStaticText';
  203. StaticText.Parent := Page.Surface;
  204. StaticText2 := TNewStaticText.Create(Page);
  205. StaticText2.AutoSize := False;
  206. StaticText2.Left := StaticText.Width + ScaleX(32);
  207. StaticText2.Top := StaticText.Top;
  208. StaticText2.Anchors := [akLeft, akRight, akBottom];
  209. StaticText2.WordWrap := True;
  210. StaticText2.Caption := 'TNewStaticText with more text and an adjusted label height so it''s multi-line.';
  211. StaticText2.Width := 2 * StaticText.Width;
  212. StaticText2.Parent := Page.Surface;
  213. StaticText2.AdjustHeight;
  214. LinkLabel := TNewLinkLabel.Create(Page);
  215. LinkLabel.AutoSize := False;
  216. LinkLabel.Left := StaticText2.Left;
  217. LinkLabel.Top := StaticText2.Top + StaticText2.Height + ScaleY(8);
  218. LinkLabel.Anchors := [akLeft, akRight, akBottom];
  219. LinkLabel.Caption := 'TNew<a id="jrsoftware">Link</a>Label with more text and an adjusted label height so it''s multi-line with a second <a id="jrsoftware">link</a> on the second line.';
  220. LinkLabel.Width := StaticText2.Width;
  221. LinkLabel.OnLinkClick := @LinkLabelOnLinkClick;
  222. LinkLabel.Parent := Page.Surface;
  223. LinkLabel.AdjustHeight;
  224. { TNewProgressBar }
  225. Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TNewProgressBar');
  226. ProgressBarLabel := TNewStaticText.Create(Page);
  227. ProgressBarLabel.Anchors := [akLeft, akTop];
  228. ProgressBarLabel.Caption := 'TNewProgressBar';
  229. ProgressBarLabel.Parent := Page.Surface;
  230. ProgressBar := TNewProgressBar.Create(Page);
  231. ProgressBar.Left := ProgressBarLabel.Width + ScaleX(8);
  232. ProgressBar.Top := ProgressBarLabel.Top;
  233. ProgressBar.Width := Page.SurfaceWidth - ProgressBar.Left;
  234. ProgressBar.Height := ProgressBarLabel.Height + ScaleY(8);
  235. ProgressBar.Anchors := [akLeft, akRight, akTop];
  236. ProgressBar.Parent := Page.Surface;
  237. ProgressBar.Position := 25;
  238. ProgressBar2 := TNewProgressBar.Create(Page);
  239. ProgressBar2.Left := ProgressBarLabel.Width + ScaleX(8);
  240. ProgressBar2.Top := ProgressBar.Top + ProgressBar.Height + ScaleY(4);
  241. ProgressBar2.Width := Page.SurfaceWidth - ProgressBar.Left;
  242. ProgressBar2.Height := ProgressBarLabel.Height + ScaleY(8);
  243. ProgressBar2.Anchors := [akLeft, akRight, akTop];
  244. ProgressBar2.Parent := Page.Surface;
  245. ProgressBar2.Position := 50;
  246. ProgressBar2.State := npbsError;
  247. ProgressBar3 := TNewProgressBar.Create(Page);
  248. ProgressBar3.Left := ProgressBarLabel.Width + ScaleX(8);
  249. ProgressBar3.Top := ProgressBar2.Top + ProgressBar2.Height + ScaleY(4);
  250. ProgressBar3.Width := Page.SurfaceWidth - ProgressBar.Left;
  251. ProgressBar3.Height := ProgressBarLabel.Height + ScaleY(8);
  252. ProgressBar3.Anchors := [akLeft, akRight, akTop];
  253. ProgressBar3.Parent := Page.Surface;
  254. ProgressBar3.Style := npbstMarquee;
  255. { TNewCheckListBox }
  256. Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TNewCheckListBox');
  257. CheckListBox := TNewCheckListBox.Create(Page);
  258. CheckListBox.Width := Page.SurfaceWidth;
  259. CheckListBox.Height := ScaleY(97);
  260. CheckListBox.Anchors := [akLeft, akTop, akRight, akBottom];
  261. CheckListBox.Flat := True;
  262. CheckListBox.Parent := Page.Surface;
  263. CheckListBox.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
  264. CheckListBox.AddRadioButton('TNewCheckListBox', '', 1, True, True, nil);
  265. CheckListBox.AddRadioButton('TNewCheckListBox', '', 1, False, True, nil);
  266. CheckListBox.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
  267. CheckListBox.AddCheckBox('TNewCheckListBox', '', 1, True, True, False, True, nil);
  268. CheckListBox.AddCheckBox('TNewCheckListBox', '123', 2, True, True, False, True, nil);
  269. CheckListBox.AddCheckBox('TNewCheckListBox', '456', 2, False, True, False, True, nil);
  270. CheckListBox.AddCheckBox('TNewCheckListBox', '', 1, False, True, False, True, nil);
  271. CheckListBox.ItemFontStyle[5] := [fsBold];
  272. CheckListBox.SubItemFontStyle[5] := [fsBold];
  273. CheckListBox.ItemFontStyle[6] := [fsBold, fsItalic];
  274. CheckListBox.SubItemFontStyle[6] := [fsBold, fsUnderline];
  275. CheckListBox2 := TNewCheckListBox.Create(Page);
  276. CheckListBox2.Top := CheckListBox.Top + CheckListBox.Height + ScaleY(8);
  277. CheckListBox2.Width := Page.SurfaceWidth;
  278. CheckListBox2.Height := ScaleY(97);
  279. CheckListBox2.Anchors := [akLeft, akRight, akBottom];
  280. CheckListBox2.BorderStyle := bsNone;
  281. CheckListBox2.ParentColor := True;
  282. CheckListBox2.MinItemHeight := WizardForm.TasksList.MinItemHeight;
  283. CheckListBox2.ShowLines := False;
  284. CheckListBox2.WantTabs := True;
  285. CheckListBox2.Parent := Page.Surface;
  286. CheckListBox2.AddGroup('TNewCheckListBox', '', 0, nil);
  287. CheckListBox2.AddRadioButton('TNewCheckListBox', '', 0, True, True, nil);
  288. CheckListBox2.AddRadioButton('TNewCheckListBox', '', 0, False, True, nil);
  289. { TFolderTreeView }
  290. Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TFolderTreeView');
  291. FolderTreeView := TFolderTreeView.Create(Page);
  292. FolderTreeView.Width := Page.SurfaceWidth;
  293. FolderTreeView.Height := Page.SurfaceHeight;
  294. FolderTreeView.Anchors := [akLeft, akTop, akRight, akBottom];
  295. FolderTreeView.Parent := Page.Surface;
  296. FolderTreeView.Directory := ExpandConstant('{src}');
  297. { TBitmapImage }
  298. Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TBitmapImage');
  299. BitmapFileName := ExpandConstant('{tmp}\WizClassicSmallImage.bmp');
  300. ExtractTemporaryFile(ExtractFileName(BitmapFileName));
  301. BitmapImage := TBitmapImage.Create(Page);
  302. BitmapImage.AutoSize := True;
  303. BitmapImage.Bitmap.LoadFromFile(BitmapFileName);
  304. BitmapImage.Parent := Page.Surface;
  305. BitmapImage2 := TBitmapImage.Create(Page);
  306. BitmapImage2.BackColor := clNone;
  307. BitmapImage2.Bitmap := BitmapImage.Bitmap;
  308. BitmapImage2.Center := True;
  309. BitmapImage2.Left := BitmapImage.Width + 10;
  310. BitmapImage2.Width := 2*BitmapImage.Width;
  311. BitmapImage2.Height := 2*BitmapImage.Height;
  312. BitmapImage2.Parent := Page.Surface;
  313. BitmapImage3 := TBitmapImage.Create(Page);
  314. BitmapImage3.Bitmap := BitmapImage.Bitmap;
  315. BitmapImage3.Stretch := True;
  316. BitmapImage3.Left := 3*BitmapImage.Width + 20;
  317. BitmapImage3.Width := 4*BitmapImage.Width;
  318. BitmapImage3.Height := 4*BitmapImage.Height;
  319. BitmapImage3.Anchors := [akLeft, akTop, akRight, akBottom];
  320. BitmapImage3.Parent := Page.Surface;
  321. { TBitmapButton - Always has a 2 pixel margin around the image, used to
  322. display a focus rectangle. Other changes compared to TBitmapImage are:
  323. • Has a Caption property which should always be set
  324. • Center defaults to True
  325. • BackColor defaults to clNone }
  326. Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TBitmapButton (Press Alt to see focus rectangle)');
  327. BitmapButton := TBitmapButton.Create(Page);
  328. BitmapButton.AutoSize := True;
  329. BitmapButton.Bitmap := BitmapImage.Bitmap;
  330. BitmapButton.Caption := 'Show Message'; { For accessibility }
  331. BitmapButton.Hint := 'TBitmapButton is an accessible version of TBitmapImage';
  332. BitmapButton.ShowHint := True;
  333. BitmapButton.Width := 2*BitmapButton.Width;
  334. BitmapButton.Cursor := crHand;
  335. BitmapButton.OnClick := @ButtonOnClick;
  336. BitmapButton.Parent := Page.Surface;
  337. BitmapButton2 := TBitmapButton.Create(Page);
  338. BitmapButton2.BackColor := $400000;
  339. BitmapButton2.Bitmap := BitmapImage.Bitmap;
  340. BitmapButton2.Caption := BitmapButton.Caption;
  341. BitmapButton2.Hint := BitmapButton.Hint;
  342. BitmapButton2.ShowHint := True;
  343. BitmapButton2.Left := BitmapButton.Width + 10;
  344. BitmapButton2.Width := 2*BitmapButton.Width;
  345. BitmapButton2.Height := 2*BitmapButton.Height;
  346. BitmapButton2.Cursor := crHand;
  347. BitmapButton2.OnClick := @ButtonOnClick;
  348. BitmapButton2.Parent := Page.Surface;
  349. { TRichViewer }
  350. Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TRichViewer');
  351. RichEditViewer := TRichEditViewer.Create(Page);
  352. RichEditViewer.Width := Page.SurfaceWidth;
  353. RichEditViewer.Height := Page.SurfaceHeight;
  354. RichEditViewer.Anchors := [akLeft, akTop, akRight, akBottom];
  355. RichEditViewer.BevelKind := bkFlat;
  356. RichEditViewer.BorderStyle := bsNone;
  357. RichEditViewer.Parent := Page.Surface;
  358. RichEditViewer.ScrollBars := ssVertical;
  359. RichEditViewer.UseRichEdit := True;
  360. RichEditViewer.RTFText := '{\rtf1\ansi\ansicpg1252\deff0\deflang1043{\fonttbl{\f0\fswiss\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue128;}\viewkind4\uc1\pard\f0\fs20 T\cf1 Rich\cf2 Edit\cf3 Viewer\cf0\par}';
  361. RichEditViewer.ReadOnly := True;
  362. end;
  363. procedure AboutButtonOnClick(Sender: TObject);
  364. begin
  365. MsgBox('This demo shows some features of the various form objects and control classes.', mbInformation, mb_Ok);
  366. end;
  367. procedure CreateAboutButtonAndURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton);
  368. var
  369. AboutButton: TNewButton;
  370. URLLabel: TNewLinkLabel;
  371. begin
  372. AboutButton := TNewButton.Create(ParentForm);
  373. AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width;
  374. AboutButton.Top := CancelButton.Top;
  375. AboutButton.Width := CancelButton.Width;
  376. AboutButton.Height := CancelButton.Height;
  377. AboutButton.Anchors := [akLeft, akBottom];
  378. AboutButton.Caption := '&About...';
  379. AboutButton.OnClick := @AboutButtonOnClick;
  380. AboutButton.Parent := ParentForm;
  381. URLLabel := TNewLinkLabel.Create(ParentForm);
  382. URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
  383. URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
  384. URLLabel.Anchors := [akLeft, akBottom];
  385. URLLabel.Caption := '<a href="https://jrsoftware.org">jrsoftware.org</a>';
  386. URLLabel.OnLinkClick := @LinkLabelOnLinkClick;
  387. URLLabel.UseVisualStyle := True;
  388. URLLabel.Parent := ParentForm;
  389. end;
  390. procedure InitializeWizard();
  391. begin
  392. { Custom wizard pages }
  393. CreateTheWizardPages;
  394. { Custom controls }
  395. CreateAboutButtonAndURLLabel(WizardForm, WizardForm.CancelButton);
  396. { Custom beveled label }
  397. WizardForm.BeveledLabel.Caption := ' Bevel ';
  398. end;
  399. procedure InitializeUninstallProgressForm();
  400. begin
  401. { Custom controls }
  402. CreateAboutButtonAndURLLabel(UninstallProgressForm, UninstallProgressForm.CancelButton);
  403. end;