Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Custom Tooltips???
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Tooltips???

 Post Reply Post Reply
Author
Message
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Topic: Custom Tooltips???
    Posted: 14 December 2007 at 4:51am
Hi,
 
Is there any way that the CalendarControl tooltips can be customed to have the Office2007 theme and adjust the tooltip width?
 

P.S. I hope I get a response to this, even if it's a no it can't be done!!!
 
Back to Top
cjprb View Drop Down
Newbie
Newbie


Joined: 08 June 2007
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote cjprb Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2007 at 7:53am
I dont think you can atm.
 
I would also like that to be added to the next version.
 
Claus
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2007 at 5:45pm
No, with those tooltips its not possible.

However, as a workaround you can disable regular tooltips, catch events like MouseMove and using HitTest set required text to any kind of custom Tooltips components.

--
WBR,
Serge
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 4:33am

Yeah I thought as much... thanks for the confirmation that it can't be done by the control itself.

Managed to workaround it with the Mousemove and HitTest.
 

Back to Top
shady14u View Drop Down
Newbie
Newbie


Joined: 07 May 2007
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote shady14u Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 9:04am

I am looking to do this same exact thing... do you have an example or can you explain how you did this to make the custom tool tips with gradients and extra width?

 
Thanks in advance
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 11:34am

Put a label on your desktop i.e. lblTooltip and make it invisible.

Put a timer on the desktop i.e. tmrTooltip and set it to enabled = False and Interval 1000 (1 second)
 
The following code should get you a tooltip that appears 1 second after you scroll over an Event in the Calendar control. I wanted a delay before the tooltip appeared.
 
Private Sub CalendarControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 0 Then
        Dim HitTest As CalendarHitTestInfo
        Set HitTest = CalendarControl.ActiveView.HitTest
       
        CalendarControl.EnableToolTips False
        
        If Not HitTest.ViewEvent Is Nothing Then
            ' Set the caption of the Tooltip Label
            lblTooltip.Caption = Replace(HitTest.ViewEvent.Event.Subject & vbCrLf & HitTest.ViewEvent.Event.Body, "&", "&&")
             
             ' Check to see if the Tooltip goes beyond the Screen width
            If X + lblTooltip.Width > Screen.Width Then
                X = Screen.Width - lblTooltip.Width
            End If
                
            ' Position the Tooltip
            lblTooltip.Move X, Y + 1300
                
            ' Start the Timer for the Tooltip
            If lblTooltip.Visible <> True Then
                tmrTooltip.Enabled = True
            End If
        Else
            ' Hide the Tooltip
            tmrTooltip.Enabled = False
            lblTooltip.Visible = False
        End If
    Else
        ' Hide the Tooltip
        tmrTooltip.Enabled = False
        lblTooltip.Visible = False
    End If
End Sub
 
Private Sub tmrTooltip_Timer()
    ' Display the Tooltip & stop the Timer
    lblTooltip.Visible = True
    tmrTooltip.Enabled = False
End Sub
 
You may need to add additional code depending on how you use this in your app.
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 11:37am
Oh, I got the gradient by using a label control that has the ability to create the gradient within itself by giving the starting and finishing colours.
 
If you don't have that, then you could simply use a picturebox... and apply a gradient fill to it.
Back to Top
shady14u View Drop Down
Newbie
Newbie


Joined: 07 May 2007
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote shady14u Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 1:41pm
Worked great thank you very much!!
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.172 seconds.