DPSwitchView

Definition

This is a method of the SAPCalendar.Calendar library. It allows an application user to change the active view of the calendar during runtime.

Use

It is used in the interchangeable appointment view of the calendar to change from the current active view to any other view.

This method is used to switch between the week view, month detail view or month overview view of the date picker calendar.

Structure

The DPSwitchView function has the following characteristics:

Name

DPSwitchView

Signature

Function DPSwitchView(ViewType as DatePickerViewType)

Parameters

ViewType as DatePickerViewType

The DatePickerViewType can contain the following enum values:

2 – For week view

4 – For month detail view

6 – For month overview

Example

Assume that the application user is in week view of the interchangeable appointment view of the calendar. Now, the user wants to change the to month detail view. The following code describes how this is done:

‘Define the variable

Public enum DatePickerviewType

DPWeekView=2

DPMonthViewDetial=4

DPMonthOverView=6

End enum

Dim viewType as DatePickerViewType

‘Assign value to the variable

viewType = DatePickerViewType.DPMonthViewDetial

pObjCalendar.DPSwitchView viewType

This function changes the current interchangeable week view to month detail view.