Results 1 to 2 of 2

Thread: [RESOLVED] a very simple question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    118

    Resolved [RESOLVED] a very simple question

    i have 1 checkboxlist control.... is it possible for the user to click 1 box if they want to select every thing in the list?????

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: a very simple question

    What abut this one?
    vb Code:
    1. Private Sub CheckedListBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckedListBox1.SelectedValueChanged
    2.         CheckAll()
    3.     End Sub
    4.     Private Sub CheckAll()
    5.         Dim i As Long
    6.         For i = 0 To CheckedListBox1.Items.Count - 1
    7.             CheckedListBox1.SetItemCheckState(i, CheckState.Checked)
    8.         Next
    9.     End Sub
    Please mark you thread resolved using the Thread Tools as shown

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