Solved

CheckedListBox Enabling scrollbar when checkedListBox disabled

Posted on 2008-06-13
5
1,287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 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