2

I am using this code: Long descriptions on Inno Setup components. How to increase the separation between all the components of the component list?

Example:

enter image description here

And i want to see this:

enter image description here

Nico Z
  • 997
  • 10
  • 33
  • 1
    @MartinPrikryl I think he mean he wants to enter a new line after each component name in component list. – GTAVLover Jun 21 '17 at 13:06

1 Answers1

2

There's TNewCheckListBox.MinItemHeight property that you can use to make a line in the checklist box higher, effectively increasing the spacing.

But problem is that setting the property does not affect existing items. And at the time the InitializeWizard is called, the WizardForm.ComponentsList is populated already.

What you can do is to programmatically change each item caption to trigger re-measuring of the item. Simple appending of a space will do (you can even strip it after the fact, if you wish).

procedure InitializeWizard();
var
  I: Integer;
begin
  { Change line height }
  WizardForm.ComponentsList.MinItemHeight := ScaleY(26);

  { Trigger re-measuring of component items }
  for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do
  begin
    WizardForm.ComponentsList.ItemCaption[I] :=
      WizardForm.ComponentsList.ItemCaption[I] + ' ';
  end;
end;

enter image description here


Or you can completely give up on the built-in components mechanism and build your own components-like page using plain checkboxes. You can layout those any way you like.

For an example of implementing a custom components page, see

Or similar questions for creating custom task pages:

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