|
-
Sep 15th, 2000, 10:31 PM
#1
Thread Starter
Junior Member
Is there way to capture what cell of ListView the mouse is on and then display the tooltip displaying the data of that
cell. Actually you can strech the cell to see the data but since data is too long i want to use tool tip to display the whole string.
Thanks!
-
Sep 16th, 2000, 02:03 AM
#2
Use the ListView's ToolTipText and SelectedItem properties to display the item that the mouse is over (but, it has to be selected).
Code:
Private Sub ListView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
ListView1.ToolTipText = ListView1.SelectedItem
End Sub
-
Jan 9th, 2002, 07:37 PM
#3
Hyperactive Member
I needed to only display the tooltip if the mouse was over the selected item, though, so as to simulate normal tooltip behavior.
This is what I came up with...
In item in a ListView (lvwList type) appears to be approximately 210 units high.
Code:
Private Sub ListView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If (y > (ListView1.SelectedItem.Index * 210 + 60) And (ListView1SelectedItem.Index * 210 + 270) Then
ListView1.ToolTipText = ListView1.SelectedItem
Else
ListView1.ToolTipText = ""
End If
End Sub
The 60 is an offset to account for the header row.
Achichincle
VB6 (VSEE SP5, W2KPro)
ASP
HTML
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|