|
-
May 11th, 2005, 05:56 AM
#1
Thread Starter
Fanatic Member
ListView Column [RESOLVED]
I want to return the column from a ListView the user has selected from a right mouse click event.
Does anyone know how to do this?
Cheers
Last edited by Mindcrime; May 11th, 2005 at 08:42 AM.
Mindcrime : )
ICQ 24003332
VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8
-
May 11th, 2005, 07:59 AM
#2
"It's cold gin time again ..."
Check out my website here.
-
May 11th, 2005, 08:03 AM
#3
Re: ListView Column
When you add the items under the columns, set their tags to the columns owners..then use a HitTest:
VB Code:
Private Sub ListView1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
Dim lvi As ListItem
Set lvi = ListView.HitTest(x, y)
MsgBox lvi.Tag
Set lvi = Nothing
End If
End Sub
That's about the only way I know of.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
May 11th, 2005, 08:43 AM
#4
Thread Starter
Fanatic Member
Re: ListView Column [RESOLVED]
Thanks BruceG, works a treat.
...now to get that column width.
Mindcrime : )
ICQ 24003332
VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8
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
|