ComponentOne True DBInput Pro 8.0
UseStyles Property (TDBCalendar)

The UseStyles property is used to define which holiday styles should be used in the TDBCalendar control. When registering a holiday style to HolidayStylesCollection, do not forget to specify the key string which is used by this property. Also, using the key string is a lot simpler than trying to remember which kind of style was added to which element in the HolidayStyles collection.

Syntax

object.UseStyles= string

Design time / Runtime : Read and Write.

Values

Zero-length string ("") is the default

Remarks

Since multiple holidays can be displayed in the control, use the comma separator (",") character to determine different holiday styles to use.

There may be times when a keyword is not defined with the holiday style, in this case use the element number (with curly braces) to specify which holidays to use. All collections in the calendar controls begin from element 1 (zero). Refer to the following example:

' Use both the national and Company holiday.

Calendar.UseStyles = "NH|{1}"

The priority for the HolidayStyle objects defined in this property will be determined by the order specified. For example:

Calendar.UseStyles = "NH|CH"

With the code above, the "CH" holiday style will take precedence over the "NH".

 

 


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

Product Support Forum  |  Documentation Feedback