|
-
May 7th, 2008, 10:56 PM
#1
Thread Starter
Member
Problem with procedure to put print button on InfoBefore page
I need to put a functional print button on the InfoBefore page created by the Inno Setup wizard. I learned that the following procedure works if you are putting the print button on the License page, but can't figure out how to adapt this code so I can do same thing on the InfoBefore page. I thought I could just substitute InfoBefore wherever License appears, and this appears to work except for an Identifier error on the PrintButton.Parent statement because there is no WizaredForm.InfoBeforeAcceptedRadio.Parent prperty class. I tried many other ways to modify this statement but none work.
Can anyone tell me how to modify these properties in below code so this will work on the InfoBefore page?? Here is my email: [email protected].
Code:
procedure InitializeWizard();
var
PrintButton: TButton;
begin
PrintButton := TButton.Create(WizardForm.LicensePage);
PrintButton.Caption := '&Print';
PrintButton.Left := WizardForm.LicenseMemo.Left +
WizardForm.LicenseMemo.Width -
PrintButton.Width;
PrintButton.Top := WizardForm.LicenseMemo.Top +
WizardForm.LicenseMemo.Height + 16;
PrintButton.OnClick := @PrintButtonClick;
PrintButton.Parent := WizardForm.LicenseAcceptedRadio.Parent;
end;
-
May 8th, 2008, 01:55 AM
#2
Re: Problem with procedure to put print button on InfoBefore page
If that function does not appear in that screen, why not create your own screen with the Inno Setup Form Designer. That way you can have total control.
http://isfd.kaju74.de/
-
May 8th, 2008, 11:02 AM
#3
Thread Starter
Member
Re: Problem with procedure to put print button on InfoBefore page
Thanks for reply, randem. Are you saying it isn't possible to place a print button on the InfoBefore page? I understand I could use the Form Designer to build a new, separate page with the print button on it for the information that was in the InfoBefore page, but that would seem kind of hokey to the user, and I really wanted to keep it clean by havin the print button on the page where the info is reviewed.
I tried using the code in the procedure below, in which I tried to adapt the code that I know works for a License to the InfoBefore page. This code compiles OK with Inno Setup, which indicates that the syntax is OK. However, no print button appears in the executable. It may be that the positioning of the button in the InforBeforeMemo is not correct. I don't know how else to adapt the PrintButton.Parent statement other than as I have in this code, because there is no corresponding object property to LicenseAcceptedRadio for LicenseMemo. Any ideas?
Code:
procedure InitializeWizard();
var
PrintButton: TButton;
begin
PrintButton := TButton.Create(WizardForm.InfoBeforePage);
PrintButton.Caption := '&Print';
PrintButton.Left := WizardForm.InfoBeforeMemo.Left +
WizardForm.InfoBeforeMemo.Width -
PrintButton.Width;
PrintButton.Top := WizardForm.InfoBeforeMemo.Top +
WizardForm.InfoBeforeMemo.Height + 16;
PrintButton.OnClick := @PrintButtonClick;
PrintButton.Parent := WizardForm.InfoBeforeMemo.Parent;
end;
-
May 9th, 2008, 05:01 PM
#4
Thread Starter
Member
Re: Problem with procedure to put print button on InfoBefore page
Randem,
I went to the URL you referred me to and tried to use one of th GUI based script generators to place a print button on the InfoBefore page. Couldn't do it with the GUI tool, but after a lot of trial and error I was able to use the below listed procedure in my InnoSetup script to place a functioning print button on the InfoBefore page....but could never position it next to the Back Next Cancel buttons at the bottom where I wanted to. Am currently having to settle for the Print button appearing at top right above the Memo area. Any suggestions?
Code:
procedure InitializeWizard();
var
PrintButton: TButton;
begin
PrintButton := TButton.Create(WizardForm.InfoBeforePage);
PrintButton.Caption := '&Print';
PrintButton.Height := 20
PrintButton.Left := WizardForm.InfoBeforePage.Left + WizardForm.InfoBeforePage.Width - 20 - PrintButton.Width;
PrintButton.Top := WizardForm.InfoBeforeMemo.Top - 25
PrintButton.OnClick := @PrintButtonClick;
PrintButton.Parent := WizardForm.InfoBeforeMemo.Parent;
end;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|