SftBox/OCX 4.5

SftBoxItems.HitTestV Method

Softel vdm, Inc.

Returns the item found at given coordinates.

Syntax       

VB.NET

object.HitTestV(ByVal x As Single, ByVal y As Single, ByRef ItemIndex As Object, ByRef Main As Object)

VB

object.HitTestV(ByVal x As Single, ByVal y As Single, ItemIndex As Variant, Main As Variant)

C#.NET

void object.HitTestV(float x, float y, out object ItemIndex, out object Main);

VC++

HRESULT object->HitTestV(float x, float y, const _variant_t&* ItemIndex, const _variant_t&* Main);

C

HRESULT object->raw_HitTestV(float x, float y, VARIANT* ItemIndex, VARIANT* Main);

Delphi

procedure object.HitTestV(x : Single, y : Single, out ItemIndex : OleVariant, out Main : OleVariant);

object

A SftBoxItems object.

x

The x coordinate of the location for which the item index is to be returned. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

y

The y coordinate of the location for which the item index is to be returned. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

ItemIndex

Returns the zero-based index of the item at the given location x and y. -1 is returned if no item is present.

Main

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

Comments

The HitTestV method returns the item found at given coordinates.

The Items.HitTest and Items.HitTestPix methods are synonyms, but may use different coordinate systems. The Items.HitTestV method is used with Internet Explorer/VBScript.

If an item is found at the coordinates (x, y), the zero-based index of the item is returned.

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

The Items.HitTestCell method can be used to determine the cell found at given coordinates.


Feedback / comments / error reports for this topic
© 2008 - Softel vdm, Inc. - www.softelvdm.com