Results 1 to 2 of 2

Thread: checked listbox control

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    checked listbox control

    There are two of these controls in my windows application.
    checking the items in the first one should cause the items in the second control to populate.
    At present I use the mouse_leave event on the first control to trigger the event to populate the second control.
    Is this the proper event I should use? I do not think the selectedIndex event is the correct one for this purpose either. Any suggestions please?
    Thanks

  2. #2
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: checked listbox control

    Use ItemCheck event like this:
    vb.net Code:
    1. Private Sub CheckedListBox1_ItemCheck( _
    2.     ByVal sender As Object, _
    3.     ByVal e As System.Windows.Forms.ItemCheckEventArgs _
    4. ) Handles CheckedListBox1.ItemCheck
    5.  
    6.     If e.NewValue = CheckState.Checked Then
    7.         MessageBox.Show("Item checked !")
    8.     Else
    9.         MessageBox.Show("Item Un-checked !")
    10.     End If
    11. End Sub

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