Link to home
Start Free TrialLog in
Avatar of RishadanPort
RishadanPort

asked on

CheckedListBox Enabling scrollbar when checkedListBox disabled

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.
Avatar of CartoonHead
CartoonHead

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...
another way is to manage the checklistbox's ItemCheck event, like this:

private void CheckedListBox1_ItemCheck(Object sender, ItemCheckEventArgs e)
{
     e.NewValue = e.CurrentValue;
}
Avatar of RishadanPort

ASKER

i don't see how this enables scrolling while the checklistbox.Enable feature is set to false.
ASKER CERTIFIED SOLUTION
Avatar of CartoonHead
CartoonHead

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ah I see thanks.