tooltip allday-event |
Post Reply |
Author | |
tjbobersen
Newbie Joined: 01 August 2006 Status: Offline Points: 3 |
Post Options
Thanks(0)
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). |
|
dentor
Senior Member Joined: 30 November 2005 Location: France Status: Offline Points: 102 |
Post Options
Thanks(0)
|
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:
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
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |