FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Add icon ready page (https://fileforums.com/showthread.php?t=98179)

buttignol 01-09-2016 09:18

Add icon ready page
 
1 Attachment(s)
Friends adding the menu icon in the start ready page

I do not know how to add the function UpdateReadyMemo

Could someone for an example of how to add

Example below as I use

IconCB := TNewCheckBox.Create(WizardForm);
with IconCB do begin
Parent := WizardForm.SelectTasksPage;
SetBounds(0,215,300,20);
Caption := ExpandConstant('{cm:CreateDesktopIcon}');
Checked:=True;
end;

Attachment 15174

Thank you

JRD! 01-09-2016 12:29

If you want just "Create a desktop icon" in the Ready Memo with your personal IconCB:
Code:

[Tasks]
//Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:Icons}";
Name: "groupicon"  ; Description: "{cm:CreateGroupIcon}";  GroupDescription: "{cm:Icons}";

[CustomMessages]
Icons=Icons:
CreateDesktopIcon=Create a desktop icon
CreateGroupIcon=Create a startmenu icon

[#Code]
var
  IconCB: TNewCheckBox;

function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
  MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
  S1, S2: String;
begin
  S1 := '';
  S2 := '';
  S1 := S1 + MemoDirInfo + NewLine + NewLine;
  if IconCB.Checked then
  S2 := #32#32#32#32#32#32#32#32#32+CustomMessage('CreateDesktopIcon');
  S1 := S1 + MemoTasksInfo + NewLine + S2 + NewLine;
  Result := S1;
end;

If you want show your personal IconCB in the memo add this code:

Code:

[#Code]
Procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpReady then IconCB.Show else IconCB.Hide;
end;

For IconCB creation:

Code:

Procedure InitializeWizard();
begin
  IconCB := TNewCheckBox.Create(WizardForm);
  with IconCB do
  begin
    Parent := WizardForm.ReadyMemo;
    SetBounds(25,150,150,15);
    Caption:=CustomMessage('CreateDesktopIcon');
    Checked:=True;
  end;
end;

I have not quite understood your request ...

buttignol 01-09-2016 15:45

2 Attachment(s)
Thank JRD! but it is to appear "Create an icon on the Desktop" on UpdateReadyMemo

Example: Image

Attachment 15179

Create an icon on the Desktop. together with Start Menu folder destination and additional tasks

JRD! 01-09-2016 16:42

1 Attachment(s)
Just add:

Code:

[CustomMessages]
Icons=Icons:

[#Code]
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
  MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
  S1, S2: String;
begin
  S1 := '';
  S2 := '';
  S1 := S1 + MemoDirInfo + NewLine + NewLine;
  if IconCB.Checked then
  S2 := #32#32#32#32#32#32+CustomMessage('Icons')+ NewLine + #32#32#32#32#32#32#32#32#32+CustomMessage('CreateDesktopIcon');
  S1 := S1 + MemoTasksInfo + NewLine + S2 + NewLine;
  Result := S1;
end;


JRD! 01-09-2016 16:45

http://img4.hostingpics.net/pics/690609723.jpg

buttignol 01-09-2016 16:57

Resolved That's what I wanted

Thank JRD! for their work to help

JRD! 01-09-2016 17:03

You're welcome.


All times are GMT -7. The time now is 12:01.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com