473,395 Members | 1,441 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 4048
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.