IListView.ItemHeight

Syntax

ItemHeight: Integer;

Description

The ItemHeight property determines a height of component elements.

Comments

The height of elements is specified in pixels. The -1 value is set for the ItemHeight property by default, so the elements height is calculated automatically depending on the font and operating system settings used in component.

Example

Executing the example requires a form, a button named Button1 on it and the ListView component named ListView1. Two columns and several elements were 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 by clicking the button. The elements height is set to 16.

See also:

IListView