Articles in this section
Category / Section

How to set tooltip for each DateValue in WinForms MonthCalendarAdv?

3 mins read

Tooltip

In WinForms MonthCalendarAdv, ToolTip can be assigned to any date value by handling DateHover event.


The DateHover event handler is raised when mouse hover on date value of MonthCalendarAdv


ToolTip appearance can be customized by using its BackColor, BorderColor, ForeColor, Header, Fooder, Body and Separator properties.


The style of the ToolTip can be specified by using its ToolTipStyle property and it has three styles. They are

  • Balloon
  • Normal
  • Office2013

C#

//This event triggers once mouse hover on date
this.monthCalendarAdv1.DateHover += new Syncfusion.Windows.Forms.Tools.DateHoverEventHandler(monthCalendarAdv1_DateHover);
void monthCalendarAdv1_DateHover(object sender, Syncfusion.Windows.Forms.Tools.DateHoverEventArgs e)
{
    e.ToolTip.Body.Text = e.DateValue.ToString();
    e.ToolTipStyle = Syncfusion.Windows.Forms.Tools.ToolTipStyle.Ballon;
}

VB

AddHandler monthCalendarAdv1.DateHover, AddressOf monthCalendarAdv1_DateHover
'This event triggers once mouse hover on date
Private Sub monthCalendarAdv1_DateHover(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Tools.DateHoverEventArgs)
 e.ToolTip.Body.Text = e.DateValue.ToString()
 e.ToolTipStyle = Syncfusion.Windows.Forms.Tools.ToolTipStyle.Ballon
End Sub

The following screenshot displays the Balloon style ToolTip in MonthCalendarAdv.

Balloon style tooltip in MonthCalendarAdv

Figure 1:Balloon style ToolTip in MonthCalendarAdv

Samples:

C#: https://www.syncfusion.com/downloads/support/directtrac/135929/MonthCalendar_ToolTip-732052511.zip

VB: https://www.syncfusion.com/downloads/support/directtrac/135929/MonthCalendar_ToolTip_VB-2109516116.zip


Conclusion

I hope you enjoyed learning about how to set tooltip for each DateValue in WinForms MonthCalendarAdv.

You can refer to our  WinForms MonthCalendar feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms MonthCalendar documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied