We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

CheckedListbox on a TabControl

I have a CheckedListbox on a tabControl. When I select items in the listbox and I go to another tab, selected items are lost when I come back to the first tab. Any workaround to this?

2 Replies

HS hossein shahrian March 17, 2003 12:48 PM UTC

> I have a CheckedListbox on a tabControl. When I select items in the listbox and I go to another tab, selected items are lost when I come back to the first tab. > > Any workaround to this?


AD Administrator Syncfusion Team March 18, 2003 12:26 PM UTC

Yup, I've run into this as well. In Usenet posts, MS has acknowledged this bug. The problem is essentially that any time the visibility changes on a CheckedListBox, it loses its previous selections. Naturally this happens all the time in tab controls when changing tabs. I think your best bet would be to listen to the events when the checked state of an item changes in the CheckedListBox and maintain a collection of checked items (separately from the CheckedListBox). If the CheckedListBox is hidden, it will lose its selections, but when it is shown again, you can restore the selection from your own collection. Something along those lines should work, I believe that's how we solved it in the past.

Loader.
Up arrow icon