• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

Checkedlistbox problem #3

and 3rd part of my problem is this :

I would like to connect my CheckelListBOX1 with CheckBox1  ( I will have 3 CLBOXES and with every of them  will be connected with one Checkbox ) so that only that list box which Checkbox is checked is printed out.(of course if all 3 are checked --then all 3 CLBoxes are printed out.)

THX
0
spike12
Asked:
spike12
  • 2
1 Solution
 
Bob LearnedCommented:
Is this a continuation from another question?  If so, then do you have a URL for the previous questions.  Otherwise, this is a confusing description.

Bob
0
 
newbie22Commented:
I saw answer on question number 1 and I have connected it with Combobox1 it should work.
try somethning like this

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        Dim ii As Integer
        If CheckBox1.Checked Then
            Dim fnt As New Font("Arial", 5, FontStyle.Regular)
            For ii = 0 To CheckedListBox1.CheckedItems.Count - 1
                e.Graphics.DrawString(CheckedListBox1.CheckedItems.Item(ii), fnt, Brushes.Black, 1, 60 + ii * 10)
            Next
        Else
            Exit Sub
        End If


    End Sub
0
 
newbie22Commented:
not combo but checkbox1 --- sorry  :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now