Solved

CheckedListBox Enabling scrollbar when checkedListBox disabled

Posted on 2008-06-13
5
1,268 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

947 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

22 Experts available now in Live!

Get 1:1 Help Now