1

I want to create a new About button at the bottom left corner of all the pages like wpWelcome, wpSelectTasks, wpInstalling etc; that will show some message if it is clicked. Message should close if user presses "OK". The button should show the full word "About" not like "Abou..." I have checked CodeClasses.iss file in Inno Setup, but I could not understand which piece of code I should copy, which should not.

I have already seen these two post:

But they are not what I exactly want.

So please anyone help.

Community
  • 1
  • 1
Kushal
  • 547
  • 6
  • 26

1 Answers1

6

Here is a simplified, inlined version of the minimum code necessary to do what you've asked for:

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[Code]
procedure AboutButtonOnClick(Sender: TObject);
begin
  MsgBox('This is the about message!', mbInformation, mb_Ok);
end;

procedure InitializeWizard;
var
  AboutButton: TNewButton;
begin
  { create an instance of the button and assign it to the local variable AboutButton }
  AboutButton := TNewButton.Create(WizardForm);
  { set the parent to the just created button control }
  AboutButton.Parent := WizardForm;
  { adjust the position to the created button control; it gets the horizontal indent }
  { by the right indent of the Cancel button; the vertical position as well as width }
  { and height are the same as the Cancel button has }
  AboutButton.Left := WizardForm.ClientWidth - WizardForm.CancelButton.Left -
    WizardForm.CancelButton.Width;
  AboutButton.Top := WizardForm.CancelButton.Top;
  AboutButton.Width := WizardForm.CancelButton.Width;
  AboutButton.Height := WizardForm.CancelButton.Height;
  { set its caption }
  AboutButton.Caption := '&About';
  { and assign the AboutButtonOnClick method to the OnClick event of the button }
  AboutButton.OnClick := @AboutButtonOnClick;
end;
Martin Prikryl
  • 167,268
  • 50
  • 405
  • 846
TLama
  • 73,451
  • 17
  • 201
  • 368
  • P.S. that button caption was *About...*, not only *Abou...*. So it was complete, even more than that :) It's just my passion for ellipses... – TLama Jun 16 '15 at 12:45
  • WOW! That is exactly what i wanted. Thanks. – Kushal Jun 16 '15 at 12:50