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.
Unfortunately, activation email could not send to your email. Please try again.

CheckedListbox on a TabControl

Thread ID:

Created:

Updated:

Platform:

Replies:

1480 Nov 2,2002 10:30 AM Mar 18,2003 07:26 AM Windows Forms 2
loading
Tags: FAQ
Éric Moreau
Asked On November 2, 2002 10:30 AM

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?

hossein shahrian
Replied On March 17, 2003 07:48 AM

> 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?

Administrator [Syncfusion]
Replied On March 18, 2003 07:26 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;