Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBoxItems.HitTestCellPix Method

Returns the cell found at given coordinates in pixels.

Syntax

VB.NETobject.HitTestCellPix(ByVal xPix As Integer, ByVal yPix As Integer, ByRef ItemIndex As Integer, ByRef ColNum As Short, ByRef Main As Boolean)
VBobject.HitTestCellPix(ByVal xPix As Long, ByVal yPix As Long, ItemIndex As Long, ColNum As Integer, Main As Boolean)
C#.NETvoid object.HitTestCellPix(int xPix, int yPix, out int ItemIndex, out short ColNum, out bool Main);
VC++HRESULT object->HitTestCellPix(long xPix, long yPix, long* ItemIndex, short* ColNum, VARIANT_BOOL* Main);
CHRESULT object->raw_HitTestCellPix(long xPix, long yPix, long* ItemIndex, short* ColNum, VARIANT_BOOL* Main);

object

A SftBoxItems object.

xPix

The x coordinate of the location for which the item index and column number is to be returned. The units used are pixels.

yPix

The y coordinate of the location for which the item index is to be returned. The units used are pixels.

ItemIndex

Returns the zero-based index of the item found at the specified coordinates. -1 is returned if no item is found.

ColNum

Returns the zero-based column number of the column found at the specified coordinates. -1 is returned if no item is found.

Main

Returns True if the coordinates describe a point in the static or edit control portion. False is returned if the coordinates and the cell are located in the drop down portion.

Comments

The HitTestCellPix method returns the cell found at given coordinates in pixels.

The Items.HitTestCell and HitTestCellPix methods are synonyms, but may use different coordinate systems. The Items.HitTestCellV method is used with Internet Explorer/VBScript.

If a cell is found at the coordinates (xPix, yPix), the zero-based index and the zero-based column number of the cell is returned.

The HitTestCellPix method could be used during an OLEDragOver event to determine which item is currently the target of the drag & drop operation.

The Items.HitTest method can be used to determine the item found at given coordinates.

See Also SftBoxItems Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.