IntegralHeight Property

Purpose

Returns or sets a value indicating if the control displays partial items in a ListBox or ComboBox.

Syntax

object.IntegralHeight [= Boolean ]

object:ComboBox, ListBox Ocx

Description

The IntegralHeight property is False by default, the list doesn't resize itself even if the item is too tall to display completely. When set to True the list resizes itself to display only complete items.

If the number of items in a list exceeds what can be displayed, a scroll bar is automatically added to the control. You can prevent partial rows from being displayed by setting the IntegralHeight property to True.

Example

Local Int32 n

OpenW 1 : AutoRedraw = 1 : FontSize = 10

Debug FontSize

Text 10, 10, "IntegralHeight = True"

Ocx ListBox lb1 = "", 10, 30, 150, 200

Text 170, 10, "IntegralHeight = False"

Ocx ListBox lb2 = "", 170, 30, 150, 200

lb1.IntegralHeight = True

For n = 1 To 15 : lb1.AddItem "Item " & Format(n, "00") : lb2.AddItem "Item " & Format(n, "00") : Next n

Do : Sleep : Until Me Is Nothing

See Also

ListBox, ComboBox

{Created by Sjouke Hamstra; Last updated: 10/10/2014 by James Gaite}