By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,133 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,133 IT Pros & Developers. It's quick & easy.

MS Please help.. Urgent problem with ListBox or TabControl

P: n/a
I have a problem with a ListBox control that is on a TabControl, it seems to
be forgetting which items are selected in the list when I tab off the current
tab, here's my winform code... I even added a click event handler that resets
the selected items based on whats in the collection it is data bound to...
I'm baffled, pounding my head against the wall, it's not working... Please
help...

I tried posting the code but it was too long, email me and I will send it to
you if you'd like to help... TIA

Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Check to make sure on tab click your not clearing out values.
Check to make sure your not calling your load function to load the listbox
after the 1 time.

email me
ch*************@mn.rr.com

"Alien2_51" <da***************@monacocoach.removeme.com> wrote in message
news:9C**********************************@microsof t.com...
I have a problem with a ListBox control that is on a TabControl, it seems
to
be forgetting which items are selected in the list when I tab off the
current
tab, here's my winform code... I even added a click event handler that
resets
the selected items based on whats in the collection it is data bound to...
I'm baffled, pounding my head against the wall, it's not working... Please
help...

I tried posting the code but it was too long, email me and I will send it
to
you if you'd like to help... TIA

Nov 21 '05 #2

P: n/a
"Alien2_51" <da***************@monacocoach.removeme.com> schrieb:
I have a problem with a ListBox control that is on a TabControl, it seems
to
be forgetting which items are selected in the list when I tab off the
current
tab, here's my winform code... I even added a click event handler that
resets
the selected items based on whats in the collection it is data bound to...
I'm baffled, pounding my head against the wall, it's not working...


That's a problem I have heard about several times.

<URL:http://groups.google.de/groups?threadm=093701c3947d%247d3f0210%24a101280a% 40phx.gbl>

Maybe installing SP1 for .NET 1.1 will help (untested!).

This problem seems to be related to these problems/bugs:

PRB: Unexpected Events Are Raised When You Switch Between Tab Pages with a
ComboBox or a ListBox Control
<URL:http://support.microsoft.com/?scid=kb;EN-US;820633>

BUG: ComboBox Does Not Clear When You Set SelectedIndex to -1
<URL:http://support.microsoft.com/?scid=kb;EN-US;327244>

BUG: CheckedListBox Control Loses Check Marks When the Visible Property Is
Changed to FALSE and Then Back to TRUE
<URL:http://support.microsoft.com/?scid=kb;EN-US;327896>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

P: n/a
I added an event handler for the BindigContextChanged event, it is firing
when I click back to the tab page with the ListBox on it, this makes me think
I'm running into the problem described in KB:820633, I'm running the 1.1
framework version 1.1.4322 (sp1), I looked at your post in the google thread
you posted, is that pretty much what I'm going to have to do is remove the
ListBox from the TabControl...?
Thank you for your help...!~!~!

-Dan

"Herfried K. Wagner [MVP]" wrote:
"Alien2_51" <da***************@monacocoach.removeme.com> schrieb:
I have a problem with a ListBox control that is on a TabControl, it seems
to
be forgetting which items are selected in the list when I tab off the
current
tab, here's my winform code... I even added a click event handler that
resets
the selected items based on whats in the collection it is data bound to...
I'm baffled, pounding my head against the wall, it's not working...


That's a problem I have heard about several times.

<URL:http://groups.google.de/groups?threadm=093701c3947d%247d3f0210%24a101280a% 40phx.gbl>

Maybe installing SP1 for .NET 1.1 will help (untested!).

This problem seems to be related to these problems/bugs:

PRB: Unexpected Events Are Raised When You Switch Between Tab Pages with a
ComboBox or a ListBox Control
<URL:http://support.microsoft.com/?scid=kb;EN-US;820633>

BUG: ComboBox Does Not Clear When You Set SelectedIndex to -1
<URL:http://support.microsoft.com/?scid=kb;EN-US;327244>

BUG: CheckedListBox Control Loses Check Marks When the Visible Property Is
Changed to FALSE and Then Back to TRUE
<URL:http://support.microsoft.com/?scid=kb;EN-US;327896>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

P: n/a
Thanks for your reply, I appreciate your help… I emailed you my code, I'm
using CSLA objects as the data source for my winform applications… I looked
at Herfrieds post, it looks like the problem described in this KB article, I
added the BindingContextChanged event to my form like the KB article says to
do and sure enough that event is bieng raised… The article doesn'tseem to
indicate there is a problem, it states that the behaviour is by design...
http://support.microsoft.com/?scid=kb;EN-US;820633

What to do...? Don't use the TabControl...?
TIA....Dan

"Chris Calzaretta" wrote:
Check to make sure on tab click your not clearing out values.
Check to make sure your not calling your load function to load the listbox
after the 1 time.

email me
ch*************@mn.rr.com

"Alien2_51" <da***************@monacocoach.removeme.com> wrote in message
news:9C**********************************@microsof t.com...
I have a problem with a ListBox control that is on a TabControl, it seems
to
be forgetting which items are selected in the list when I tab off the
current
tab, here's my winform code... I even added a click event handler that
resets
the selected items based on whats in the collection it is data bound to...
I'm baffled, pounding my head against the wall, it's not working... Please
help...

I tried posting the code but it was too long, email me and I will send it
to
you if you'd like to help... TIA


Nov 21 '05 #5

P: n/a
I'm not sure what this does, but it fixed my problem, Thanks!!!

tabPage.BindingContext = myForm.BindingContext

"Alien2_51" wrote:
I added an event handler for the BindigContextChanged event, it is firing
when I click back to the tab page with the ListBox on it, this makes me think
I'm running into the problem described in KB:820633, I'm running the 1.1
framework version 1.1.4322 (sp1), I looked at your post in the google thread
you posted, is that pretty much what I'm going to have to do is remove the
ListBox from the TabControl...?
Thank you for your help...!~!~!

-Dan

"Herfried K. Wagner [MVP]" wrote:
"Alien2_51" <da***************@monacocoach.removeme.com> schrieb:
I have a problem with a ListBox control that is on a TabControl, it seems
to
be forgetting which items are selected in the list when I tab off the
current
tab, here's my winform code... I even added a click event handler that
resets
the selected items based on whats in the collection it is data bound to...
I'm baffled, pounding my head against the wall, it's not working...


That's a problem I have heard about several times.

<URL:http://groups.google.de/groups?threadm=093701c3947d%247d3f0210%24a101280a% 40phx.gbl>

Maybe installing SP1 for .NET 1.1 will help (untested!).

This problem seems to be related to these problems/bugs:

PRB: Unexpected Events Are Raised When You Switch Between Tab Pages with a
ComboBox or a ListBox Control
<URL:http://support.microsoft.com/?scid=kb;EN-US;820633>

BUG: ComboBox Does Not Clear When You Set SelectedIndex to -1
<URL:http://support.microsoft.com/?scid=kb;EN-US;327244>

BUG: CheckedListBox Control Loses Check Marks When the Visible Property Is
Changed to FALSE and Then Back to TRUE
<URL:http://support.microsoft.com/?scid=kb;EN-US;327896>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.