ComponentOne List 8.0 for ActiveX
CellContaining Method (TDBCombo)

 

TDBCombo Reference> TDBCombo Methods> CellContaining Method (TDBCombo)

CellContaining Method (TDBCombo)

The CellContaining method combines the ColContaining and RowContaining methods into one call. If the coordinate pair specified by x and y points to a data cell, this method returns True, and the rowindex and colindex arguments receive zero-based indexes that identify the cell.

Syntax

object.CellContaining(x, y, rowindex, colindex)

Arguments

x and y are singles that define a coordinate pair in twips.

rowindex is a long that receives the zero-based index of the row beneath the specified Y coordinate.

colindex is an integer that receives the zero-based index of the column beneath the specified X coordinate.

Return Value

A boolean that indicates whether a data cell is beneath the specified coordinate pair.

Remarks

Method applies to TDBList and TDBCombo controls.

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 cell.

If the specified coordinate is outside of the control's data area, this method returns False. You can use the PointAt method to determine what kind of control element, if any, is beneath the specified coordinate.

Note: You must convert the x and y arguments 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