ComponentOne List 8.0 for ActiveX
ColContaining Method

 

True DBList Reference> TDBList Methods> ColContaining Method

ColContaining Method

The ColContaining method returns the ColIndex value of the control column containing the specified coordinate.

Syntax

TDBList.ColContaining(coordinate)

Arguments

coordinate is a single that defines a horizontal coordinate (X value) in twips.

Return Value

An integer corresponding to the index of the column beneath the specified X coordinate.

Remarks

Method applies to TDBList control.

This value ranges from 0 to Columns.Count - 1.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a control column.

If coordinate is outside of the control's data area, this method returns -1.

The ColContaining method returns the ColIndex of the column indicated, not the visible column position. For example, if coordinate falls within the first visible column, but two columns have been scrolled off the left side of the control, the ColContaining method returns 2, not 0 (assuming that the user did not move any columns previously).

Note: You must convert the coordinate argument to twips, even if the container's ScaleMode (Visual Basic) setting specifies a different unit of measurement.

See Also

TDBList and TDBCombo Controls

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback