Solved

CheckedListBox Enabling scrollbar when checkedListBox disabled

Posted on 2008-06-13
5
1,264 Views
Last Modified: 2013-12-17
When you do this:

checkedListBox.Enable = false;
It also disables the scrollbar.

I am wondering if there is an easy way to enable scrolling when the checkedListBox is disabled.
My main purpose of doing checkedListBox.Enable = false, is so the user can not currently
check/uncheck items.
0
Comment
Question by:RishadanPort
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:CartoonHead
ID: 21782700
You can set  checkedListBox1.SelectionMode = SelectionMode.None; to disable selection while scrolling is still enabled.

You could also change the BG colour (if you wished)  to make it look disabled...
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 21783721
another way is to manage the checklistbox's ItemCheck event, like this:

private void CheckedListBox1_ItemCheck(Object sender, ItemCheckEventArgs e)
{
     e.NewValue = e.CurrentValue;
}
0
 
LVL 6

Author Comment

by:RishadanPort
ID: 21796532
i don't see how this enables scrolling while the checklistbox.Enable feature is set to false.
0
 
LVL 1

Accepted Solution

by:
CartoonHead earned 100 total points
ID: 21796863
You need to set checklistbox.Enabled = true then checkedListBox.SelectionMode = SelectionMode.None disables selection while the scroll bar is still active.
0
 
LVL 6

Author Comment

by:RishadanPort
ID: 21797178
Ah I see thanks.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now