I could've sworn there was a way to enable a full row select in the VB ListView? Or am I just going crazy? I can't seem to find the property to set...
Any help would be appreciated..
Dan
Printable View
I could've sworn there was a way to enable a full row select in the VB ListView? Or am I just going crazy? I can't seem to find the property to set...
Any help would be appreciated..
Dan
right click on the control. It's n there
Wow, that's weird. I just got home for lunch and get your reply and sure enough, there is an option that says "Full Row Select". However, I swear it wasn't there at work, but I'll double check when I get back to work today.
Is it possible that an older version of the control does not have that option?
Any help would be appreciated..
Dan
It didn't know you could do that either. Wow. I always coded it using SendMessage (but then, I've been accused of being API Happy...):DVB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const LVM_FIRST = &H1000 Private Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54 Private Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55 Private Const LVS_EX_FULLROWSELECT = &H20 Private Sub SetFullRowSelection(ByVal hWndListView, ByVal bFullRow As Boolean) SendMessage hWndListView, VM_SETEXTENDEDLISTVIEWSTYLE, _ LVS_EX_FULLROWSELECT, ByVal CLng(bFullRow)) End Sub 'This is an example of how you can use this routine: ' enable full row selecting SetFullRowSelection ListView1.hwnd, True ' disable full row selecting SetFullRowSelection ListView1.hwnd, False
Well sure enough, I just got back to work and took a look at the ListView properties by right clicking on it.
There is no "Full row select" checkbox, as there was at home. Also, it seems like there are much fewer options. Here are the only checkboxes provided, in the order they appear:
- HideColumnHeaders
- HideSelection
- LabelWrap
- MultiSelect
- Enabled
Why the difference? Here is some info about my work and home computers:
Work:
- WinNT 4
- Visual Studio 6 /sp4
Home
- WinXP
- Visual Studio 6 /sp6
Any ideas? It must be a different version of the ListView but I didn't know they upgraded it..
Different version of mscomctl.ocx? Check the versions on both the ocx files, and see if one is different. It may have different options on NT4, but I wouldn't think so.
Notice the sp4 at work and sp6 at home.. there's your answer.
Install the newest service pack at work.
I don't think that's the problem. I have SP4 right now, and I do have the checkbox for FullRowSelect. I am on Windows 2000 Pro with VB6 SP4. How do you have SP6? Is it out?Quote:
Originally posted by Arc
Notice the sp4 at work and sp6 at home.. there's your answer.
Install the newest service pack at work.
The one with less options comes from 'Microsoft Windows Common Controls 5.0' and the one with more comes from 'Microsoft Windows Common Controls 6.0' They have all the same controls but the 5.0 one's controls have less features (with all the controls not just the Listview).
DOH!!!
I can't believe I missed such an obvious thing.. Yes, it was the diffrence between the 5.0 and 6.0 of the Common Controls.
Thanks a bunch!
Regarding SP6, I tried to find it on Microsoft.com but could only see SP5, so I may be mistaken.. I will take another look when I get home. Maybe I got it from my MSDN subsription? Anyway, here a link to SP5 if you need it:
http://msdn.microsoft.com/vstudio/do...p5/default.asp
Thanks, but I found that already when I went searching for SP6. :D It's downloading as I type.Quote:
Originally posted by dbassettt74
Anyway, here a link to SP5 if you need it:
http://msdn.microsoft.com/vstudio/do...p5/default.asp