Skip to content

GetItemText Event

Description

Occurs when each calendar defined text string is about to be drawn if some Flags have been set using the SetFlag method.

Syntax

Public Event GetItemText( _
    ByVal ItemParams As CalendarGetItemTextParams _
)

Parameters

  • ItemParams: A CalendarGetItemTextParams object that contains the text of a calendar item that is about to be drawn. The Text property is used to set a custom value.

Remarks

Occurs when each calendar text string is about to be drawn if some Flags have been set using the SetFlag method. The SetFlag method can be used to set any combination of the XTPCalendarGetItemText and XTPCalendarGetItemTextEx 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, 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

Example

Using the GetItemText Event to Customize Text


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