Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CheckedListBox Enabling scrollbar when checkedListBox disabled

Posted on 2008-06-13
5
Medium Priority
?
1,345 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 400 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses

876 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