How to select entire row in ListView ? 
Author Message
 How to select entire row in ListView ?



Quote:
> How to select entire row in ListView ?

Try this bit of code out:

Option Explicit

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 LVS_EX_FULLROWSELECT = &H20
Private Const LVM_FIRST = &H1000
Private Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54
Private Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55

Public Sub ListView_SetFullRow( _
   lvToSet As ListView, _
   bFullRow As Boolean)

    Debug.Assert lvToSet.View = lvwReport

    Dim exStyle As Long

    exStyle = SendMessage(lvToSet.hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, _
                          ByVal 0)

    If bFullRow Then
        exStyle = exStyle Or LVS_EX_FULLROWSELECT
    Else
        exStyle = exStyle And Not LVS_EX_FULLROWSELECT
    End If

    SendMessage lvToSet.hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, _
                LVS_EX_FULLROWSELECT, ByVal exStyle

End Sub

--

http://www.*-*-*.com/
Sample code, message forum, and utilities..



Mon, 29 Apr 2002 03:00:00 GMT  
 How to select entire row in ListView ?
How to select entire row in ListView ?

Thank you.



Tue, 30 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to select entire row in Listview

2. How to select entire row in ListView ? - FullRowSelect

3. How to select entire row in ListView ?

4. How to select entire row in listview control (VB5)

5. Select entire row in ListView

6. Selecting entire row in Listview?

7. Listview - Selecting an entire row?

8. Listview: Selecting entire row

9. How to select the entire row in a listview using VB6- mscomctl32.ocx

10. Listview : how to Select the Entire Row ??

11. Select an entire row in the ListView-control

12. ListView - Hilight/Select entire Row???

 

 
Powered by phpBB® Forum Software