1

I have the following lines in my installer setup

procedure CurPageChanged(CurPageID: Integer);
begin
  if IsAdmin then
    WizardForm.SelectDirBrowseLabel.Caption := 'Installation directory:'
  else
    WizardForm.SelectDirBrowseLabel.Caption := 'Restart installer as Administrator to install {#AppName} system wide.' #13#10 + #13#10 + 'Installation directory:';
end;

The problem is that the text on the new lines gets cut by the directory entry box so they are not visible.

enter image description here

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
mu7z
  • 466
  • 5
  • 14

1 Answers1

1

I'd add the info label below the edit box instead:

procedure InitializeWizard();
var
  InfoLabel: TNewStaticText;
begin
  InfoLabel := TNewStaticText.Create(WizardForm);
  InfoLabel.Parent := WizardForm.SelectDirPage;
  InfoLabel.Left := WizardForm.SelectDirLabel.Left;
  InfoLabel.Top := WizardForm.DirEdit.Top + WizardForm.DirEdit.Height + ScaleY(16);
  InfoLabel.Caption :=
    'Restart installer as Administrator to install {#AppName} system wide'
end;

enter image description here


Though would this be a better solution?
Make Inno Setup installer request privileges elevation only when needed

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992