ItemHeight: Integer;
The ItemHeight property determines a height of component elements.
The height of elements is specified in pixels. The property is set to -1 by default, and the elements height is calculated automatically depending on the font and operating system settings used in the component.
Executing the example requires a form, the Button1 button on the form, and the ListView component named ListView1. Two columns and several elements are created for 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;
After executing the example checkboxes of every element are set to the second column of the ListView1 component on clicking the button. The elements height is set to 16.
See also: