Yes, when the checked list box is on a tab this helps.
In this specific case the checked list box is on the main form, and in
one case simply within a group box on the main form, and it is not
visible until the user makes a selection that will display information.
I have noticed that this works, except for the first time when the
selections are made before the control is drawn for the first time.
Would you expect this same solution to work in that case as well?
Also, is there no mechanism to permit the checked list box to determine
the entries that are to be selected automatically from the data source?
Must one always make a pass through the entries and manually set which
entries are to be selected and which are not?
-ken
> See if any of these threads help (long link):
>
[quoted text clipped - 26 lines]
>>
>>-ken
Claes.Bergefall - 08 Sep 2005 09:44 GMT
> Yes, when the checked list box is on a tab this helps.
>
[quoted text clipped - 4 lines]
> made before the control is drawn for the first time. Would you expect this
> same solution to work in that case as well?
Probably not. The bindingcontext problems only appears with
the tab control afaik.
> Also, is there no mechanism to permit the checked list box to determine
> the entries that are to be selected automatically from the data source?
> Must one always make a pass through the entries and manually set which
> entries are to be selected and which are not?
As far as I know you need to select them manually.
Personally I'm not a big fan on data binding so I tend not to use
it much. There's to much weird stuff going on in the background
for my liking.
You might be better off not using databinding with the CheckedListBox
class. It doesn't really seem ready for that yet. I you check the
docs for CheckedListBox.DataSource you will notice it says "not intended
to be used directly from your code". Same goes for DisplayMember and
ValueMember
/claes