Flags Property
Description
A combination of flags from the XTPCalendarGetItemText and XTPCalendarGetItemTextEx enumerations that have been set, which specify when the GetItemText event is to be fired.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property Flags() As Long
Remarks
The Flags property is a combination of flags from the XTPCalendarGetItemText and XTPCalendarGetItemTextEx enumerations that have been set. -1 indicates that all flags have been set. Flags are set using the SetFlag method.
The SetFlag method uses 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 some Flags from the XTPCalendarGetItemText and XTPCalendarGetItemTextEx enumerations have been set using the SetFlag method.
The SetFlag method can be used to set any combination of the XTPCalendarGetItemText and XTPCalendarGetItemTextEx (only use with Office 2007 theme) flags. GetItemText will only get fired for the text strings that are specified using the SetFlag method.
If you would like the GetItemText event to be fired for all flags in the XTPCalendarGetItemText and XTPCalendarGetItemTextEx enumerations, then you can simply set AskItemTextFlags to -1. This will cause the GetItemText event to fire before each text string is drawn in the calendar.
This allows all of the strings in the calendar to easily be customized. For example, the day header text and time scale text can be customized. The Text property of the Params parameter contains the text that is about to be drawn. The Text property can be set to any customized text.
The ViewDay, ViewEvent, and WeekDay properties of the Params parameter contain the current view, event, and day of the week the text to be drawn belongs to. Note that some of these properties might be NULL.
See Also
- CalendarFlagsSet Object
- AskItemTextFlags Property
- GetItemText Event
- XTPCalendarGetItemText Enumeration
- XTPCalendarGetItemTextEx Enumeration
- IsFlagSet Method
- ResetFlag Method
- SetFlag Method
- CalendarGetItemTextParams Object
Example
Using the GetItemText Event to Customize Text
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.