TLama

Untitled

Jul 31st, 2014
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.33 KB | None | 0 0
  1. [Setup]
  2. AppName=My Program
  3. AppVersion=1.5
  4. DisableWelcomePage=yes
  5. DefaultDirName={pf}\My Program
  6.  
  7. [Code]
  8. var
  9.   // variables that will hold references of your custom pages
  10.   MyPage1: TWizardPage;
  11.   MyPage2: TWizardPage;
  12.  
  13. procedure InitializeWizard;
  14. begin
  15.   // resize and move the next button
  16.   WizardForm.NextButton.Left := WizardForm.NextButton.Left - 50;
  17.   WizardForm.NextButton.Width := WizardForm.NextButton.Width + 50;
  18.   // store the reference of the first page
  19.   MyPage1 := CreateCustomPage(wpSelectDir, 'Page 1 Caption', 'Page 1 Description');
  20.   // store the reference of the second page
  21.   MyPage2 := CreateCustomPage(MyPage1.ID, 'Page 2 Caption', 'Page 2 Description');
  22. end;
  23.  
  24. procedure CurPageChanged(CurPageID: Integer);
  25. begin
  26.   case CurPageID of
  27.     MyPage1.ID:
  28.     begin
  29.       // this code executes for the first page, so let's setup the buttons however you want
  30.       WizardForm.BackButton.Visible := False;
  31.       WizardForm.NextButton.Caption := '&Next';
  32.       WizardForm.CancelButton.Caption := '&Abort';
  33.     end;
  34.     MyPage2.ID:
  35.     begin
  36.       // this code executes for the second page, so let's setup the buttons however you want
  37.       WizardForm.BackButton.Visible := False;
  38.       WizardForm.NextButton.Caption := '&Agree and Install';
  39.       WizardForm.CancelButton.Caption := '&Decline';
  40.     end;
  41.   end;
  42. end;
Advertisement
Add Comment
Please, Sign In to add comment