|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CheckListBox on a TabControl... wierd behaviourhi
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 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 > > > 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 > > > > > > 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 > > 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 > > > > > > 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 > > > > > > > > > > > > |
|||||||||||||||||||||||