HeaderPane
Main
Hide
Share Link
Print

HitTest Method, SftDate Object

Determines the part of the field at a location.

Syntax

C#SftDateFieldHitConstants Area = object.HitTest(int xPos, int yPos, out object Date);
VB.NETArea = object.HitTest(ByVal xPos As Integer, ByVal yPos As Integer, ByRef Date As Object) As SftDateFieldHitConstants
C++enum SftDateFieldHitConstants Area = object->HitTest(long xPos, long yPos, VARIANT* Date);
CHRESULT object->raw_HitTest(long xPos, long yPos, VARIANT* Date, enum SftDateFieldHitConstants* Area);

object

A SftDate object.

xPos

The x coordinate in pixels, relative to the control's client area.

yPos

The y coordinate in pixels, relative to the control's client area.

Date

Returns Null; the parts of a date field control have no date of their own.

Area

Returns the part of the field at the location.

NameValueDescription
fieldHitSftDateNowhere0Outside the control
fieldHitSftDateText1Text
fieldHitSftDateSegment2A part of the date or time
fieldHitSftDateCheckBox3Check box
fieldHitSftDateClearButton4Clear button
fieldHitSftDateDropDownButton5Dropdown button
fieldHitSftDateUpButton6Up button
fieldHitSftDateDownButton7Down button

Comments

The HitTest method returns the part of the date field control at a location, for example to show a context menu or a tooltip for a part. p The dropdown is not part of the control; points in the dropdown return fieldHitSftDateNowhere. The location of a mouse event (MouseDown) can be passed directly, as its coordinates are pixels relative to the control.

See Also SftDate Object | Object Hierarchy | Hit Testing


Last Updated 11/29/2026 - (email)
© 2026 Softel vdm, Inc.