Einzelnen Beitrag anzeigen

MarkusL.

Registriert seit: 7. Okt 2017
18 Beiträge
 
#8

AW: [InnoSetup] Benutzername eingeben

  Alt 25. Mai 2018, 21:36
Zeige doch mal Deine Quelldatei, so schwer scheint es ja nicht zu sein wenn ich mir mein Beispiel-Code Anschaue.
Code:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[ Code ]
var
  MyEdit: TNewEdit;
  MyPage: TWizardPage;

procedure MyEditChange(Sender: TObject);
begin
  // enable the next button if the edit box is not empty; disable otherwise
  WizardForm.NextButton.Enabled := MyEdit.Text <> '';
end;

procedure InitializeWizard;
begin
  MyPage := CreateCustomPage(wpWelcome, 'Caption', 'Description');

  MyEdit := TNewEdit.Create(WizardForm);
  MyEdit.Parent := MyPage.Surface;
  MyEdit.Left := 0;
  MyEdit.Top := 0;
  MyEdit.Width := 150;
  MyEdit.OnChange := @MyEditChange;
 
 
    // Next function is used for proper working of Graphical Installer powered installer
    #ifdef GRAPHICAL_INSTALLER_PROJECT
    InitGraphicalInstaller();
    #endif
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  // if the currently turned wizard page is the one with the edit box, enable
  // the next button if the edit box is not empty; disable otherwise
  if CurPageID = MyPage.ID then
    WizardForm.NextButton.Enabled := MyEdit.Text <> '';
 
    // Next function is used for proper working of Graphical Installer powered installer
    #ifdef GRAPHICAL_INSTALLER_PROJECT
    PageChangedGraphicalInstaller(CurPageID);
    #endif
end;
  Mit Zitat antworten Zitat