Print Page | Close Window

Calendar Tooltip Text Mystery

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=18029
Printed Date: 08 July 2024 at 3:45pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Calendar Tooltip Text Mystery
Posted By: cannones
Subject: Calendar Tooltip Text Mystery
Date Posted: 09 March 2011 at 5:10pm
Hi All,

I am trying to display a custom tooltip when the mouse hovers an event. I have the code working but in the codejock docs it mentions an undocumented property called TooltipText which is inherited ??

I also checked the generated package file and there is no sign of the property ..

Those that have the codejock calendar control help can see what I am referring to by looking up the method EnableToolTips.

 Any Ideas How I need to reference this ..

Sam



Replies:
Posted By: SuperMario
Date Posted: 25 March 2011 at 9:24am
Actually this refer to the CanlendarControl.ToolTipText property.  It is language specific too, in VB6 the Calendar inherits this property, in C# it will not.  ToolTipText is a standard control's property, provided by VB framework.

Use methods CalendarControl.EnableToolTips to disable built-in Calendar tooltips, then catch MouseMove and using method CalendarControl.ActiveView.HitTest determine the current active items where cursor is currently placed. Then show some custom tooltip with this information displayed.

This idea is show in Calendar Visual Basic sample. Please look below for an implementation of MouseMove method -- it is pretty simple:
Private Sub CalendarControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  Dim HitTest As CalendarHitTestInfo
  Set HitTest = CalendarControl.ActiveView.HitTest
  
  If (Not HitTest.ViewEvent Is Nothing) Then
    Debug.Print "MouseMove. HitTest = "; HitTest.ViewEvent.Event.Subject
   
    If ToolTips_Mode = 1 Then
      CalendarControl.ToolTipText = "[" & HitTest.ViewEvent.Event.Id & "] " & HitTest.ViewEvent.Event.Subject
    Else
      CalendarControl.ToolTipText = ""
      Me.Refresh
    End If
  Else
    CalendarControl.ToolTipText = ""
    Me.Refresh
  End If
End Sub



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