ItemHeight: Integer;
The ItemHeight property determines height of the component elements.
The height of elements is specified in pixels. The "-1" value is set for the ItemHeight property by default, so the items height is calculated automatically depending on the font and operating system settings used in component.
Executing the example requires a form, a button named Button1 positioned on it and the ListView component named ListView1. Two columns and several elements were created for the ListView1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
c: ICheckBox;
i: Integer;
Begin
For i := 0 To ListView1.Items.Count - 1 Do
c := New CheckBox.Create;
c.Text := "Parameter " + i.ToString;
ListView1.InsertControl(c, 1, i);
End For;
ListView1.ItemHeight := 16;
End Sub Button1OnClick;
Checkboxes of every item are set to the second column of the ListView1 component by clicking the button after an example execution. The item height is set to "16".
See also: