Event XbpCombobox():measureItem Foundation

Compute dimensions of an owner-drawn combobox item.

Syntax
:measureItem := {| nItem, aDims, self | ... }
:measureItem( nItem, aDims ) --> self
xbeP_MeasureItem (1048648)
Parameters
<nItem>
Parameter <nItem> specifies the index/ordinal number of the combobox item whose dimensions are to be measured. If xbeP_MeasureItem is generated for the edit component of the combobox, <nItem> contains the value -1.
<aDims> := {nWidth, nHeight}
<aDims> is an array containing the item's dimensions.
Return

This method returns the object executing the method (self).

Description

The xbeP_MeasureItem event is generated by the Xbase++ runtime system to determine the item dimensions in an owner-drawn combobox. In addition, xbeP_MeasureItem is used to determine the dimensions of the edit component of a combobox object. In this case, parameter <nItem>contains the value -1.

For a full discussion of the arguments and behaviour of xbeP_MeasureItem, see the documentation on the base class' implementation XbpListbox:measureItem().

The width of the edit component of the combo box is defined by the system and cannot be changed. Consequently, the value in element nWidth of parameter<aDims> is ignored if <nItem> is -1. In addition, the height of a combo box item is limited to 255 pixels.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.