SetBoldDate

Description

Displays the specified date in bold.

Applies to

MonthCalendar control

Syntax

controlname.SetBoldDate ( d, onoff {, rt } )

Argument

Description

controlname

The name of the MonthCalendar control in which you want to clear the bold dates

d

The date to be set in bold

onoff

A boolean specifying whether the date is to be set to bold. Values are:

  • true – Set the date to bold

  • false – Clear the date’s bold setting

rt (optional)

A value of the MonthCalRepeatType enumerated variable. Values are:

  • Once! – Set or clear the bold setting for the specified date (default)

  • Monthly! – Using the day portion of the specified date, set or clear the bold setting for this day in all months

  • Yearly! – Using the day and month portion of the specified date, set or clear the bold setting for this date in all years

Returns

Integer. Returns 0 for success and one of the following negative values for failure:

Usage

You can use the SetBoldDate function to specify that a selected date, such as an anniversary date, displays in bold. If a specific date has been set to bold, you can clear the bold setting by passing false as the second parameter. ClearBoldDates clears all such settings.

Examples

Example 1

This example sets the date January 5, 2005 to bold in the control mcVacation:

integer li_return

Date d

d = date("January 5, 2005")


li_return = mcVacation.SetBoldDate( d, true)

Example 2

This example sets the fifth day of every month to bold in the control mcVacation:

integer li_return

Date d

d = date("January 5, 2005")


li_return = mcVacation.SetBoldDate( d, true, Monthly!)

Example 3

This example sets the date January 5 to bold for all years in the control mcVacation:

integer li_return

Date d

d = date("January 5, 2005")


li_return = mcVacation.SetBoldDate( d, true, Yearly!)

Example 4

This example clears the bold setting for the fifth day of every month in the control mcVacation:

integer li_return

Date d

d = date("January 5, 2005")


li_return = mcVacation.SetBoldDate( d, false, Monthly!)

See also