Can you set the time interval before ControlTipText is displayed?

C

Chrisso

Hi there,

I am implementing the "hack" of placing the selected value of a list
box into its ControlTipText in order for long values to be displayed
when necessary as my list box cannot get any bigger:

Private Sub lbxDisplay_DblClick(Cancel As Integer)
Fill_Display_ControlTipText
End Sub

Private Sub Fill_Display_ControlTipText()
Dim ctlDisplay As Control, var As Variant
Set ctlDisplay = Me.lbxDisplay
Debug.Print ctlDisplay.ItemsSelected.Count
For Each var In ctlDisplay.ItemsSelected
Debug.Print ctlDisplay.ItemData(var)
Me.lbxDisplay.ControlTipText = ctlDisplay.ItemData(var)
Next
End Sub

This works OK and does the job but I would like to change the default
time interval before the ControlTipText is displayed - does anyone
know if this is possible? I cant see any info on it anywhere.

My other problem is that the code above works fine on the DblClick
event but I really need it to work on the Click event but during the
Click event it seems ctlDisplay.ItemsSelected is always 0? This seems
weird to me -any ideas how I can get to the selected items at other
events as the same problem happens with AfterUpdate and MouseUp too?

Thanks in advance for any advice,
Chrisso
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top