Print Page | Close Window

tooltip allday-event

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=9262
Printed Date: 14 July 2025 at 3:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: tooltip allday-event
Posted By: tjbobersen
Subject: tooltip allday-event
Date Posted: 09 January 2008 at 3:00am
Is it correct that there is no tooltip for allday events?

I only get tooltips moving the mouse over events with specified time (either dayview or monthview or weekview).



Replies:
Posted By: dentor
Date Posted: 02 February 2008 at 7:32am
Hello,
 
You can have tooltips for all case of positions in the Calendar Control.
 
Personally, I use 3 types of tooltip in the Calendar Control:
  • Event, Show the Time and the Subject
  • All day Event, I only show the Subject
  • No Event, useful to show the time of the cursor position
You can set tooltip in the MouseMove Event :
 
 
Private Sub Calendar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim HitTest As CalendarHitTestInfo
    
    Set HitTest = Calendar.ActiveView.HitTest
    If Not HitTest.ViewEvent Is Nothing Then
        If HitTest.ViewEvent.Event.AllDayEvent Then
            Calendar.ToolTipText = HitTest.ViewEvent.Event.Subject
        Else
            Calendar.ToolTipText = ExtractTime(HitTest.ViewEvent.Event.StartTime) & "-" & ExtractTime(HitTest.ViewEvent.Event.EndTime) & " " & HitTest.ViewEvent.Event.Subject
        End If
    Else
        Calendar.ToolTipText = ExtractTime(HitTest.HitDateTime)
    End If
End Sub

 
' *** A function to extract the time from the date event
Private Function ExtractTime(Dt As Date) As String
    ExtractTime = Format(Dt, "hh:nn")
End Function
 
Hope it will help you  
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net