CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Jul 2011

    Scroll Listview items by text box

    At first I am totally new in VB 2008. In my project I Three textboxes and a listview. I can find the items of listview by 1st textbox change event. The codes are as given below:-

    Private Sub sealv_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sealv.TextChanged
    	        Dim i As Integer
    	        For i = 0 To LV1.Items.Count - 1
    	            LV1.Items(i).BackColor = Color.White
    	        With LV1
    	            lst = .FindItemWithText(sealv.Text, True, 0, True)
    	            If Not lst Is Nothing Then
    	                .Items.Item(lst.Index).BackColor = Color.YellowGreen
    	                For i = 0 To LV1.Items.Count - 1
    	                    LV1.Items(i).BackColor = Color.White
    	                .Items.Item(0).BackColor = Color.YellowGreen
    	            End If
    	        End With
    	        lst = Nothing
    	    End Sub
    Now, I want to learn the followings:-
    1) How to scroll the listview items by textbox keyDown and KeyUp event.
    2) And I want to get the listview focused item in the 2nd and 3rd textbox by 1st textbox keypress event( Enter press on keyboard).

    Please help me regarding the above.
    Last edited by pathllk; February 3rd, 2012 at 12:34 PM. Reason: Edit cODE

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

By using this site, you agree to the Privacy Policy