M
Matt Michael
Hi,
I'm having a problem working with a listview in an application I'm writing.
Currently, whenever the selectedindex changed event fires, it loads up a
htmledit control, and other labels on the form, with the current information
associated with the listview item. Whenever I click on each item, it works
fine, but it seems that whenever I use the up/down arrows(important) to
scroll through the list, it loses focus, and goes to the htmledit control
whenever the index changes. Is there any way to make it so the listview
does not lose focus.. allowing the up and down arrows to work, all the while
refreshing the data on the form? Thanks in advance
-Matt
Sample code:
Private Sub lvMessages_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles lvMessages.SelectedIndexChanged
If lvMessages.SelectedItems.Count > 0 Then
....get message..
If msg.Tables("Message").Rows.Count > 0 Then
...display fields
...enable appropriate buttons
deMessage.LoadDocument(body)
End If
Else
....empty message fields..
...disable buttons
End If
End Sub
I'm having a problem working with a listview in an application I'm writing.
Currently, whenever the selectedindex changed event fires, it loads up a
htmledit control, and other labels on the form, with the current information
associated with the listview item. Whenever I click on each item, it works
fine, but it seems that whenever I use the up/down arrows(important) to
scroll through the list, it loses focus, and goes to the htmledit control
whenever the index changes. Is there any way to make it so the listview
does not lose focus.. allowing the up and down arrows to work, all the while
refreshing the data on the form? Thanks in advance
-Matt
Sample code:
Private Sub lvMessages_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles lvMessages.SelectedIndexChanged
If lvMessages.SelectedItems.Count > 0 Then
....get message..
If msg.Tables("Message").Rows.Count > 0 Then
...display fields
...enable appropriate buttons
deMessage.LoadDocument(body)
End If
Else
....empty message fields..
...disable buttons
End If
End Sub