ListBox.addOnMeasureItem

Overview | Methods | Fields | This Package | All Packages

ListBox.addOnMeasureItem

Assigns a delegate to the measureItem event.

Syntax

public final void addOnMeasureItem( MeasureItemEventHandler value )

Parameters

value

The MeasureItemEventHandler delegate to be notified when the event occurs.

Remarks

Passing an event handler as a parameter to this method is equivalent to setting the measureItem event to that method in the Properties window. The measureItem event occurs when an owner-drawn list box is created and the sizes of the list items are determined. For a list box to be owner-drawn, its drawMode property must be set to DrawMode.OWNERDRAWFIXED or DrawMode.OWNERDRAWVARIABLE. It must also contain a Graphics object in which to paint the item.

See Also   removeOnMeasureItem