Results 1 to 3 of 3

Thread: [RESOLVED] Question for listbox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2010
    Posts
    93

    Resolved [RESOLVED] Question for listbox

    Hi everyone, I have a listbox in my form that gets its values from a data table by data binding. My question is, when the data (row) is loaded it also selects the first line automatically. I do not want this because I want the listbox to select an item only when the user clicks on it. Otherwise, the iteme should ony be listed. Is there a way to manage this?

  2. #2
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Re: Question for listbox

    This should do the job:

    Code:
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            ListBox1.SelectedIndex = -1
        End Sub
    RATE MY POST

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2010
    Posts
    93

    Re: Question for listbox

    thanks a lot; it did the job...

Posting Permissions

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



Click Here to Expand Forum to Full Width