Calendar Tooltip Text Mystery |
Post Reply |
Author | |
cannones
Groupie Joined: 14 April 2010 Location: Australia Status: Offline Points: 16 |
Post Options
Thanks(0)
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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 |
|
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 |