Home All Groups Group Topic Archive Search About

CheckListBox on a TabControl... wierd behaviour

Author
26 Nov 2004 12:29 PM
dev guy
hi

I have a tabcontrol with few pages. 2 of the tab pages have one checklistbox
each, when I flip through the tab pages, the checkboxlist loses the check
states.

I thought, the tab control may not be painting them properly. but that is
not the case. the check states are lost by the checklistbox control.

anly clue?

warm regards

Author
26 Nov 2004 3:41 PM
Nigel Armstrong
Hi

Wierd - and not reproducible (by me) anyway!

Two tab pages, items on each. Check some items, swap between pages,
everything looks fine...any other information that you might have missed out?

Nigel Armstrong

Show quote
"dev guy" wrote:

> hi
>
> I have a tabcontrol with few pages. 2 of the tab pages have one checklistbox
> each, when I flip through the tab pages, the checkboxlist loses the check
> states.
>
> I thought, the tab control may not be painting them properly. but that is
> not the case. the check states are lost by the checklistbox control.
>
> anly clue?
>
> warm regards
>
>
>
Author
26 Nov 2004 4:00 PM
Gerald Hernandez
Are you altering the contents of the listbox while the tab is not displayed?
Are you loading data into the listbox during any tab event?
I have seen cases where the checkedlistbox was not rendered correctly when
using tab pages a number of times. However, the underlying data was always
still correct. So I have not seen the particular behaviour you describe.
This leads me to believe possibly something else is happening.

Gerald

Show quote
"Nigel Armstrong" <NigelArmstr***@discussions.microsoft.com> wrote in
message news:2DDDBF63-D625-41AF-A8BE-6DF52FF9FF8B@microsoft.com...
> Hi
>
> Wierd - and not reproducible (by me) anyway!
>
> Two tab pages, items on each. Check some items, swap between pages,
> everything looks fine...any other information that you might have missed
out?
>
> Nigel Armstrong
>
> "dev guy" wrote:
>
> > hi
> >
> > I have a tabcontrol with few pages. 2 of the tab pages have one
checklistbox
> > each, when I flip through the tab pages, the checkboxlist loses the
check
> > states.
> >
> > I thought, the tab control may not be painting them properly. but that
is
> > not the case. the check states are lost by the checklistbox control.
> >
> > anly clue?
> >
> > warm regards
> >
> >
> >
Author
27 Nov 2004 5:16 AM
dev guy
hi

No, nothing being done on the tab events.
the checkboxlist is being initialized in the form load only and left as it
is.

-- haresh


Show quote
"dev guy" <i***@emantratech.com> wrote in message
news:uhON8O70EHA.2884@TK2MSFTNGP11.phx.gbl...
> hi
>
> I have a tabcontrol with few pages. 2 of the tab pages have one
checklistbox
> each, when I flip through the tab pages, the checkboxlist loses the check
> states.
>
> I thought, the tab control may not be painting them properly. but that is
> not the case. the check states are lost by the checklistbox control.
>
> anly clue?
>
> warm regards
>
>
Author
27 Nov 2004 3:16 PM
Gerald Hernandez
Are you using data binding?
Take a look at this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;327896

Does that explain it?

Gerald

Show quote
"dev guy" <i***@emantratech.com> wrote in message
news:OeJO$BE1EHA.2568@TK2MSFTNGP10.phx.gbl...
> hi
>
> No, nothing being done on the tab events.
> the checkboxlist is being initialized in the form load only and left as it
> is.
>
> -- haresh
>
>
> "dev guy" <i***@emantratech.com> wrote in message
> news:uhON8O70EHA.2884@TK2MSFTNGP11.phx.gbl...
> > hi
> >
> > I have a tabcontrol with few pages. 2 of the tab pages have one
> checklistbox
> > each, when I flip through the tab pages, the checkboxlist loses the
check
> > states.
> >
> > I thought, the tab control may not be painting them properly. but that
is
> > not the case. the check states are lost by the checklistbox control.
> >
> > anly clue?
> >
> > warm regards
> >
> >
>
>
Author
29 Nov 2004 8:36 AM
Claes Bergefall
And if you must use databinding there is a workaround.
In your event handler for the form load event add the
following:

MyTabPage.BindingContext = MyTabPage.BindingContext

where MyTabPage is the tab page that contains your
checkedlistbox

More here:
http://groups.google.se/groups?as_q=CheckedListBox&as_ugroup=*dotnet*&as_uauthors=Claes%20Bergefall&lr=&hl=sv

    /claes


Show quote
"Gerald Hernandez" <Cablewizard@spam_remove@Yahoo.com> wrote in message
news:#EKOdRJ1EHA.2876@TK2MSFTNGP12.phx.gbl...
> Are you using data binding?
> Take a look at this:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;327896
>
> Does that explain it?
>
> Gerald
>
> "dev guy" <i***@emantratech.com> wrote in message
> news:OeJO$BE1EHA.2568@TK2MSFTNGP10.phx.gbl...
> > hi
> >
> > No, nothing being done on the tab events.
> > the checkboxlist is being initialized in the form load only and left as
it
> > is.
> >
> > -- haresh
> >
> >
> > "dev guy" <i***@emantratech.com> wrote in message
> > news:uhON8O70EHA.2884@TK2MSFTNGP11.phx.gbl...
> > > hi
> > >
> > > I have a tabcontrol with few pages. 2 of the tab pages have one
> > checklistbox
> > > each, when I flip through the tab pages, the checkboxlist loses the
> check
> > > states.
> > >
> > > I thought, the tab control may not be painting them properly. but that
> is
> > > not the case. the check states are lost by the checklistbox control.
> > >
> > > anly clue?
> > >
> > > warm regards
> > >
> > >
> >
> >
>
>

AddThis Social Bookmark Button