A more functional CheckedListBox?

K

kilik3000

I have a requirement to create what is basically a checked list box.
Unfortunately neither the CheckedListBox or a DataGridView do exactly
what I need.

The reason for this is that I need the ability to enable/disable
individual checkboxes in the list. This feature is not there at all
on the CheckedListBox and I could not figure out a way to do it with
the data grid view. When I say 'disabled' I mean grayed out and not
responding to user interaction.

So my next thought was to have a panel control that I would
programmatically add check box controls to. I only have to do this
once (at load time) so I figured this would be simple enough.

I have two issue so far. 1) I need vertical scrolling but with the
'AutoScroll' property set to true I'm getting a horizontal scroll bar
which I don't need and don't want 2) I'd like to set the border style
and border color of the panel, however this does not seem to be
possible.

Any thoughts on how to get the table layout panel to work the way I
want? Has anyone else to do this in winforms?

Any ideas will be much appreciated.

-Thx
 
J

Jared

Private Sub CheckedListBox1_ItemCheck(ByVal sender As Object, ByVal e As
System.Windows.Forms.ItemCheckEventArgs) Handles CheckedListBox1.ItemCheck

If e.Index = 1 Then If e.CurrentValue = CheckState.Unchecked Then e.NewValue
= CheckState.Unchecked

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top