|
-
Aug 4th, 2002, 05:32 PM
#1
Thread Starter
Lively Member
Listview Scrolling & Highlight
How can I keep the first row in my listview highlighted even when I am typing in a textbox? that is, when the textbox has the focus, the first row turns gray.
And how do I stop the listview from scrolling when I type in the textbox to search the listview? I would like when the text is found, it always at the top.
-
Aug 4th, 2002, 05:46 PM
#2
Frenzied Member
Post some code of yours... so that it can be altered to meet your requirement....
-
Aug 4th, 2002, 06:13 PM
#3
Thread Starter
Lively Member
Listview Scrolling & Highlight
This loads the listview. FullRowSelect is on.
First row is grayed out when listview loses focus.
Private Sub LoadListView()
Dim Items as Listitems
Do Until rst.EOF
'Add List Items
Set Items = lsv.ListItems.Add(, , rst!fieldname)
Items.SubItems(1) = rst!fieldname
Items.SubItems(2) = rst!fieldname
Items.SubItems(3) = rst!fieldname
Items.SubItems(4) = rst!fieldname
rst.MoveNext
Loop
lsv.SelectedItem.EnsureVisible
End Sub
This searches listview.
But I would like when text is found, the selected row is always at the top
Set itmFound = lsv.FindItem(txtGetText, , , lvwPartial)
If Not itmFound Is Nothing Then
itmFound.Selected = True
itmFound.EnsureVisible
itmFound = lsvZip.SelectedItem
End If
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
|