Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can you set the time interval before ControlTipText is displayed?

1 view
Skip to first unread message

Chrisso

unread,
Dec 22, 2007, 7:53:15 AM12/22/07
to
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

Minton M

unread,
Dec 27, 2007, 5:42:38 PM12/27/07
to

I researched this to death and I think the answer is no. It *may* be
possible in the deep, dark recesses of API land but I suspect this is
a highly suspect thing to do, and maybe a slight redesign of your GUI
would be easier.

0 new messages