Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - tooltip allday-event
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

tooltip allday-event

 Post Reply Post Reply
Author
Message Reverse Sort Order
dentor View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2005
Location: France
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote dentor Quote  Post ReplyReply Direct Link To This Post Topic: tooltip allday-event
    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  
 
Back to Top
tjbobersen View Drop Down
Newbie
Newbie


Joined: 01 August 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tjbobersen Quote  Post ReplyReply Direct Link To This Post 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).
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.