Schedule / Schedule / Schedule View
In This Topic
    Schedule View
    In This Topic
     Structure and Navigation

    The schedule view consists of the following parts (exposed through the same name properties):

    • Navigator - lets the user change the currently viewed date range of the schedule.
    • HScrollBar - the horizontal scrollbar of the schedule view. Shown if the schedule is wider than the area of the schedule view.
    • VScrollBar - the vertical scrollbar of the schedule view. Shown if the schedule is taller than the area of the schedule view.
    • Schedule - the schedule shown in the schedule view.

    The schedule view exposes two useful public properties, which allows you navigate back and forth in time via code in the same way the user can navigate when clicking the navigator buttons:

    • ShowPreviousViewRange() - shows the previous range of the schedule view.
    • ShowNextViewRange() - shows the next range of the schedule view.
     Tools and Interactivity

    The Nevron Schedule View provides rich interactivity features, including:

    • Moving appointments - users can drag appointments to change their start and end time, as well as the group and group item they are associated with.
    • Resizing appointments - users can drag the start or the end of an appointment to change its duration.
    • Editing appointments - when an appointment is double clicked an appointment editor opens.
    • Snapping - if enabled makes the appointments snap to the ticks of the time ruler when moved or resized.

    You can enable or disable any of these interactivity features by setting a mask value to the schedule's Interactivity property. For example to enable only moving and editing of appointments, you can use the following line of code:

    Schedule interactivity
    Copy Code
    schedule.Interactivity = ENScheduleInteractivity.Move | ENScheduleInteractivity.Edit;
    

    If you want to customize the interactivity features of the schedule even further, you should modify its tools. Tools can be obtained by calling the GetTool(NSchema toolSchema) of the schedule's Interactor. When you get a tool, you can use its Enabled property to enable/disable it. The following example demonstrates how to disable the appointment edit tool, which shows an appointment editor when the user double clicks an appointment or an empty grid cell.

    Disabling a schedule tool
    Copy Code
    NTool tool = schedule.Interactor.GetTool(NAppointmentEditTool.NAppointmentEditToolSchema);
    tool.Enabled = false;
    

    Some tools contain properties, which lets you control their behavior. For example, if you want to make the right mouse button select appointments, you should change the MouseButtonEvent property of the click select tool as follows:

    Click select tool modification
    Copy Code
    NScheduleClickSelectTool clickSelectTool = (NScheduleClickSelectTool)schedule.Interactor.GetTool(
        NScheduleClickSelectTool.NScheduleClickSelectToolSchema);
    clickSelectTool.MouseButtonEvent = ENMouseButtonEvent.RightButtonDown;
    
    See Also