473,395 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Disabling Manual Checking/Unchecking of CheckedListBox Items

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
1 4049
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mel | last post by:
Anyone know why this program doesn't do the checking of list of units in a CheckedListBox of a Course detail Happy debugging... and thank you! ^_ foreach (Units u in AllMethods.GetAllUnits()) ...
4
by: Matthew | last post by:
Hi, I am using a checkedlistbox on a windows form and binding it to a collection of classes. clbAliases is the checkedlistbox control selectedplace is a class with property placealiases.This...
3
by: Trapulo | last post by:
I've some problem checking items in a checkedlistbox by code: For jj As Int32 = 0 To cbTimeOptions.Items.Count - 1 ' cut: logic to set maycheck variable cbTimeOptions.SetItemChecked(jj,...
2
by: Manuel Canas | last post by:
Hi there, I'm having this dilema with a checkedlistbox. I have an array of items in there, what I want to accomplish is the following; The user could check all the items in the...
2
by: Brian Mitchell | last post by:
Is it possible to gray out individual items in the CheckedListBox? I have an option at the top of the list that simply says 'All', and when the user clicks that item I want the rest of the items in...
0
by: Terry Olsen | last post by:
Dim dirs() as string = Directory.GetDirectories(MyPath) CheckedListBox.DataSource = dirs CheckedListBox.Update For I as Integer = 0 To CheckedListBox.Items.Count - 1...
1
by: Phil Galey | last post by:
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...
8
by: ameen.abdullah | last post by:
Hi Guys, I have a checked list box on my form.. the purpose of this checkbox is to indicate that the option is enabled or disabled.. I just want to ask if there is a way to disable these check...
6
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.