Skip to content

SetFlag Method

Description

Specifies for which calendar text strings the GetItemText event will get fired, allowing custom text to be set.

Syntax

Public Sub SetFlag( _
    ByVal *nFlag* As Long _
)

Parameters

Remarks

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 get 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 get fired for all flags in the XTPCalendarGetItemText and XTPCalendarGetItemTextEx enumerations, 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

Example

Using the GetItemText Event to Customize Text


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