|
@@ -77,10 +77,23 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+procedure TaskDialogButtonOnClick(Sender: TObject);
|
|
|
+begin
|
|
|
+ //TaskDialogMsgBox isn't a class but showing it anyway since it fits with the theme
|
|
|
+ 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?',
|
|
|
+ mbInformation,
|
|
|
+ MB_YESNOCANCEL, ['I choose A'#13#10'A will be chosen.', 'I choose B'#13#10'B will be chosen.'],
|
|
|
+ IDYES, False) of
|
|
|
+ IDYES: MsgBox('You chose A.', mbInformation, MB_OK);
|
|
|
+ IDNO: MsgBox('You chose B.', mbInformation, MB_OK);
|
|
|
+ end;
|
|
|
+end;
|
|
|
+
|
|
|
procedure CreateTheWizardPages;
|
|
|
var
|
|
|
Page: TWizardPage;
|
|
|
- Button, FormButton: TNewButton;
|
|
|
+ Button, FormButton, TaskDialogButton: TNewButton;
|
|
|
Panel: TPanel;
|
|
|
CheckBox: TNewCheckBox;
|
|
|
Edit: TNewEdit;
|
|
@@ -153,6 +166,15 @@ begin
|
|
|
FormButton.OnClick := @FormButtonOnClick;
|
|
|
FormButton.Parent := Page.Surface;
|
|
|
|
|
|
+ TaskDialogButton := TNewButton.Create(Page);
|
|
|
+ TaskDialogButton.Top := FormButton.Top;
|
|
|
+ TaskDialogButton.Left := FormButton.Left + FormButton.Width + ScaleX(8);
|
|
|
+ TaskDialogButton.Width := ScaleX(110);
|
|
|
+ TaskDialogButton.Height := ScaleY(23);
|
|
|
+ TaskDialogButton.Caption := 'TaskDialogMsgBox';
|
|
|
+ TaskDialogButton.OnClick := @TaskDialogButtonOnClick;
|
|
|
+ TaskDialogButton.Parent := Page.Surface;
|
|
|
+
|
|
|
{ TComboBox and others }
|
|
|
|
|
|
Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TComboBox and others');
|