Skip to content

CalendarFlagsSet Object

Description

CalendarFlagsSet is an interface used to get and set which calendar text strings will be custom drawn or to customize calendar parts before they are drawn.

For a list of all members defined in this module, see CalendarFlagsSet Members.

Remarks

Using GetItemText / AskItemTextFlags

The CalendarFlagsSet object is used as an interface to get and set which calendar text strings will be custom drawn. The AskItemTextFlags property is of type CalendarFlagsSet and is used to specify for which text components the GetItemText event will be fired.

AskItemTextFlags returns a CalendarFlagsSet object. The interface includes the SetFlag, IsFlagSet, and ResetFlag methods, which allow you to set, get, and reset the XTPCalendarGetItemText and XTPCalendarGetItemTextEx flags that specify for which text components the GetItemText event will be fired.

  • The SetFlag method accepts any combination of flags from the XTPCalendarGetItemText and XTPCalendarGetItemTextEx enumerations to specify for which calendar text strings the GetItemText event will be fired.
  • The GetItemText event occurs when each calendar text string is about to be drawn, if any of the flags from the XTPCalendarGetItemText / XTPCalendarGetItemTextEx enumerations have been set using SetFlag.
  • The XTPCalendarGetItemTextEx flags are only used with the Office 2007 theme.
  • If you want the GetItemText event to fire for all flags in the XTPCalendarGetItemText and XTPCalendarGetItemTextEx enumerations, set AskItemTextFlags to -1. This causes the GetItemText event to fire before each text string is drawn in the calendar.

When handling the GetItemText event, the Params.Text property contains the text that is about to be drawn and can be changed to any customized text. The Params.ViewDay, Params.ViewEvent, and Params.WeekDay properties contain the current view, event, and day-of-week the text belongs to; note that some of these properties may be NULL.

Using BeforeDrawThemeObject / BeforeDrawThemeObjectFlags

The BeforeDrawThemeObjectFlags property returns a CalendarFlagsSet object used as an interface to get and set which Office 2007 calendar objects will be custom drawn. The interface includes the SetFlag, IsFlagSet, and ResetFlag methods, which allow you to set, get, and reset the CalendarBeforeDrawThemeObject flags that specify for which Office 2007 calendar objects the BeforeDrawThemeObject event will be fired.

  • The SetFlag method accepts any combination of flags from the CalendarBeforeDrawThemeObject enumeration to specify for which Office 2007 calendar objects the BeforeDrawThemeObject event will be fired.
  • The BeforeDrawThemeObject event occurs when each Office 2007 theme component of the calendar is about to be drawn, if any of the flags from the CalendarBeforeDrawThemeObject enumeration have been set using SetFlag.
  • The SetFlag method can be used to set any combination of the CalendarBeforeDrawThemeObject flags (only use with the Office 2007 theme).
  • If you want the BeforeDrawThemeObject event to fire for all flags in the CalendarBeforeDrawThemeObject enumeration, set BeforeDrawThemeObjectFlags to -1. This causes the BeforeDrawThemeObject event to fire before each part of the calendar is drawn.

This mechanism allows all strings and parts of the calendar to be easily customized.

Methods (Interface)

See also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.