defaultLineHeight

Type: Integer

Availability: Read or write at any time

The defaultLineHeight property of the ListBox class specifies the default height of lines in a list box, independent of the font. This property represents pixels and defaults to zero (0), indicating that the height of the line is determined by the font selected for the list box.

If the value of the property is greater than the height of the font in the list box, the value of the defaultLineHeight property is used to determine the list box line height. If the value is less than the height of the font, the list box line height is determined from the list box font.

The code fragment in the following example sets the height of the lines in a list box to two pixels higher than the font size.

if listbox1.defaultLineHeight = 0 then
    listbox1.defaultLineHeight := listbox1.getLineHeight() + 2;
endif;

If the value of the defaultLineHeight property is greater than zero (0), the ListBox class getLineHeight method returns that value. See also the Table class defaultRowHeight property.