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
SetFlagmethod accepts any combination of flags from theXTPCalendarGetItemTextandXTPCalendarGetItemTextExenumerations to specify for which calendar text strings theGetItemTextevent will be fired. - The
GetItemTextevent occurs when each calendar text string is about to be drawn, if any of the flags from theXTPCalendarGetItemText/XTPCalendarGetItemTextExenumerations have been set usingSetFlag. - The
XTPCalendarGetItemTextExflags are only used with the Office 2007 theme. - If you want the
GetItemTextevent to fire for all flags in theXTPCalendarGetItemTextandXTPCalendarGetItemTextExenumerations, setAskItemTextFlagsto-1. This causes theGetItemTextevent 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
SetFlagmethod accepts any combination of flags from theCalendarBeforeDrawThemeObjectenumeration to specify for which Office 2007 calendar objects theBeforeDrawThemeObjectevent will be fired. - The
BeforeDrawThemeObjectevent occurs when each Office 2007 theme component of the calendar is about to be drawn, if any of the flags from theCalendarBeforeDrawThemeObjectenumeration have been set usingSetFlag. - The
SetFlagmethod can be used to set any combination of theCalendarBeforeDrawThemeObjectflags (only use with the Office 2007 theme). - If you want the
BeforeDrawThemeObjectevent to fire for all flags in theCalendarBeforeDrawThemeObjectenumeration, setBeforeDrawThemeObjectFlagsto-1. This causes theBeforeDrawThemeObjectevent 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
- CalendarFlagsSet Members
- AskItemTextFlags Property
- GetItemText Event
- BeforeDrawThemeObject Event
- BeforeDrawThemeObjectFlags Property
- XTPCalendarGetItemText Enumeration
- XTPCalendarGetItemTextEx Enumeration
- CalendarBeforeDrawThemeObject Enumeration
- Using the GetItemText Event to Customize Text (Example)
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.