Skip to main content

SchedulerControl.ToolTipController Property

Gets or sets the tooltip controller component that controls the appearance, position and the content of the hints displayed by the Scheduler control.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

Declaration

[DefaultValue(null)]
public ToolTipController ToolTipController { get; set; }

Property Value

Type Default Description
ToolTipController null

The ToolTipController component which controls the appearance and behavior of the hints displayed by the Scheduler control.

Remarks

By default, hints are displayed when an end-user hovers the mouse pointer over the visual element of a Scheduler control whose contents is truncated. To provide centralized management over the appearance and behavior of the hints displayed by DevExpress controls or their elements, use the ToolTipController component. Use the ToolTipController property to assign it to the Scheduler control.

Example

The following example demonstrates how to control the tooltip appearance and a tooltip message which is displayed for each appointment.

Drop a ToolTipController component from Toolbox onto a form, assign it to the SchedulerControl.ToolTipController property, and adjust tooltip controller settings as your need dictates. You can also handle the ToolTipController.BeforeShow event to specify tooltip text and appearance.

tooltip

The code below demonstrates the ToolTipController.BeforeShow event handler.

Font font14 = new Font("Times New Roman", 14);
Font font8 = new Font("Comic Sans MS", 8);

private void toolTipController1_BeforeShow(object sender, ToolTipControllerShowEventArgs e) {
    ToolTipController controller = sender as ToolTipController;
    AppointmentViewInfo aptViewInfo = controller.ActiveObject as AppointmentViewInfo;
    if (aptViewInfo == null) return;

    if (toolTipController1.ToolTipType == ToolTipType.Standard) {
        e.IconType = ToolTipIconType.Information;
        e.ToolTip = aptViewInfo.Description;
    }

    if (toolTipController1.ToolTipType == ToolTipType.SuperTip) {
        SuperToolTip SuperTip = new SuperToolTip();
        SuperToolTipSetupArgs args = new SuperToolTipSetupArgs();
        args.Title.Text = "Info";
        args.Title.Font = font14;
        args.Contents.Text = aptViewInfo.Description;
        args.Contents.Image = resImage;
        args.ShowFooterSeparator = true;
        args.Footer.Font = font8;
        args.Footer.Text = "SuperTip";
        SuperTip.Setup(args);
        e.SuperTip = SuperTip;
    }
}
See Also