ComponentOne True DBInput Pro 8.0
WeekdayFromPnt Method (TDBCalendar)

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 the calendar. The date information such as year, month day can be retrieved by invoking the DateFromPnt method.

Syntax

TDBCalendar.WeekdayFromPnt (X, Y)

Arguments

X and Y are single-precision integer expressions that correspond to the weekday beneath the specified coordinate (X, Y) pair. If either the X or the Y argument is outside of the calendar's day portion, the WeekdayFromPnt method returns -1. The possible values are:

1

Sunday

2

Monday

3

Tuesday

4

Wednesday

5

Thursday

6

Friday

7

Saturday

Return Value

Returns the weekday corresponding to the position indicated by coordinates. The WeekdayFromPnt method returns the number of the day containing the specified coordinate pair.

Remarks

You must convert the X and Y arguments to pixels even if the container's ScaleMode setting specifies a different unit of measurement.

X and Y arguments are applied using the top-left of the control as the origin (0,0).

If the trailing days are displayed (ShowTrailing property set to True), these days will also correspond to the position indicated by the specified coordinates. If not, this method will return -1.

 

 


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

Product Support Forum  |  Documentation Feedback