|
-
August 13th, 1999, 11:27 AM
#1
ListView
Hello
My Name is eileen, can anyone help me how to highlight an entire row in a listview
-
August 14th, 1999, 09:30 PM
#2
Re: ListView
If you are using VB6 version of the control, there is a property setting that will allow you to highlight the entire row. I believe its called SelectEntireRow or HighlightEntireRow or something to that effect.
If your using VB5, I have yet to find a way.
[email protected]
-
August 15th, 1999, 03:32 PM
#3
Re: ListView
Hi
If you are using VB5 then you can use the following code to turn on/off full row highlighing in a ListView.
- Place the following into a BAS module (or into a form - just don't forget to change the 'Publics' as appropriate)
public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (byval hwnd as Long, byval Msg as Long, byval wParam as Long, byval lParam as Long) as Long
'
' ListView API Constants
'
public Const LVM_FIRST as Long = &H1000
public Const LVM_SETEXTENDEDLISTVIEWSTYLE as Long = LVM_FIRST + 54
public Const LVS_EX_FULLROWSELECT = &H20
'
' Show Full Row Select Routine - Call with :
'
' ShowFullRow ListView1.Hwnd, true
'
public Sub ShowFullRow(byval lLVHwnd as Long, byval bShowFullRow as Boolean)
'
SendMessageLong lLVHwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_FULLROWSELECT, bShowFullRow
'
End Sub
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb
-
August 16th, 1999, 06:44 AM
#4
Re: ListView
set a check mark on the FullRowSelect property in the properties dialog of the listview in VB 6.
Now, each time the user clicks on the row it will be selected. If you want to select it in code,set the selected property of the relevante Listitem to true.
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
|