By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,966 Members | 812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,966 IT Pros & Developers. It's quick & easy.

Disabling Manual Checking/Unchecking of CheckedListBox Items

P: n/a
In VB.NET, is there a way to make it so the user can select items in a
CheckedListBox, but is NOT able to check them? Even if I set Locked = True,
the user is still able to both select and check items. The Locked property
appears to be a dummy switch.

Setting the CheckOnClick property to False gets me half way home, as it
requires the user to click a second time in order to toggle the checkbox of
the selected item; however, I need to completely disallow the user from
manually changing the state of the item checkboxes ... it's to be done
programmatically only.

Is this possible with the CheckedListBox control in VB.NET? Thanks.

Phil
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Phil

Add code to the BeforeCheck event, and set e.Cancel = True.

HTH

Charles
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message
news:ux**************@TK2MSFTNGP10.phx.gbl...
In VB.NET, is there a way to make it so the user can select items in a
CheckedListBox, but is NOT able to check them? Even if I set Locked = True, the user is still able to both select and check items. The Locked property appears to be a dummy switch.

Setting the CheckOnClick property to False gets me half way home, as it
requires the user to click a second time in order to toggle the checkbox of the selected item; however, I need to completely disallow the user from
manually changing the state of the item checkboxes ... it's to be done
programmatically only.

Is this possible with the CheckedListBox control in VB.NET? Thanks.

Phil

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.