469,327 Members | 1,347 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

Tooltip delay and duration

Knut Ole
hi,
anyone know how to set the delay and duration of the tooltip controlled in Forms!Control.[ControlTip Text]?

thanks
Mar 14 '11 #1
4 10350
munkee
374 256MB
http://www.lebans.com/tooltip.htm

Should show what you are looking for
Mar 15 '11 #2
thanks for answer,
i've tried it already,
but i get error msg with access 2010,
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  
  3. ' Create an instance of our Tooltip class
  4. Set TTip = New clsToolTip
  5.  
  6. ' We must SetFocus to any control that can
  7. ' accept the focus in order to force Access to
  8. ' create the inplace editing Window.
  9. Me.txtCompanyName.SetFocus
  10.  
  11. With TTip
  12.     ' Creat the tooltip window
  13.     Call .Create(Me)
  14.  
  15.     ' Set the tooltip window to show for 5 secs
  16.     .DelayTime = 5000
  17.  
  18.     .SetToolTipTitle "CUSTOM TOOLTIPS", 0
  19.  
the Call .Create(Me) line has the following debug msg:
runtime err 91, object variable or With block variable not set.


however, im working on this:

Expand|Select|Wrap|Line Numbers
  1. Public Function TT(tDelay As Variant, tDuration As Variant, tText As String, tX As Single, tY As Single)
  2.  
  3. If ttLabel.Visible = False Then
  4.  
  5.     With ttLabel
  6.         .Visible = True
  7.         .Caption = tText
  8.         .Left = tX + 160
  9.         .Top = tY + 160
  10.     End With
  11.  
  12.  
  13.  
  14. Else
  15. End If
  16. End Function
  17.  
...but I need some way of turning the tooltip off (after mouse moved away from object, or delay)..

any ideas?
Mar 15 '11 #3
munkee
374 256MB
When I wish to create general "tool" tip like text appear I use the mouse move event of the button/label to turn it on.

I then use the mousemove event of the detail section of the form to remove the tip.

Might be worth looking in to.

Expand|Select|Wrap|Line Numbers
  1. Private Sub tippersondetect_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2. On Error GoTo brokentip
  3.  
  4.  
  5.         Me.tipname.Visible = True
  6.  
  7.  
  8. fixedtip:
  9.     Exit Sub
  10. brokentip:
  11.     MsgBox Err.Number & " - " & Err.Description
  12.     Resume fixedtip
  13. End Sub
  14.  
and to remove:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2. Me.tipname.Visible = False
  3. Me.tipdeptraisedby.Visible = False
  4. Me.tipdateoccurred.Visible = False
  5. Me.tipreference.Visible = False
  6. Me.tiplocations.Visible = False
  7. Me.tipeventdescript.Visible = False
  8. Me.tipeventcat.Visible = False
  9. Me.tipeventcause.Visible = False
  10. Me.tipdeptrespss.Visible = False
  11. Me.tipimmediateact.Visible = False
  12. Me.tipemailstexty.Visible = False
  13.  
  14. End Sub
Mar 16 '11 #4
looks promising, thanks! will get back with working code soon;)
Mar 16 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by Des L. Davis | last post: by
reply views Thread by David Krmpotic | last post: by
6 posts views Thread by lucifer | last post: by
9 posts views Thread by | last post: by
1 post views Thread by Mike Salter | last post: by
3 posts views Thread by Pascal Weill | last post: by
1 post views Thread by =?Utf-8?B?Q3JlYXRpbmcgZGVsYXkgZm9yIHRvb2x0aXA=?= | last post: by
5 posts views Thread by =?Utf-8?B?cGV0ZTE5Njk=?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by listenups61195 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.