473,383 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

MS Please help.. Urgent problem with ListBox or TabControl

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
5 2176
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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andrew | last post by:
I'm having a major problem with a databound listbox in C#. In the constructor for the form I am trying to pre-select some of the items based in information in the database. When I step through the...
7
by: Colleyville Alan | last post by:
I have an app in which users are displayed a list of mutual fund from which they can choose. There is a listbox embedded in a two-tabbed notebook control. When the form is initally opened, the...
3
by: cdj | last post by:
Hi all, I've got a tabControl, initially with one tabPage, along with two buttons, one to add another tabPage, and one to delete the current (selected) tabPage. On each tabPage, when it is...
0
by: Diego F. | last post by:
I hope you can help me with that. I need to pass messages (strings) from a web service to a windows forms application. The application just has a ListBox to receive the messages and it's only a...
0
by: Hrvoje Voda | last post by:
I put a listBox control onto TabControl. When I press another tab on that TabControl all checked values in listBox are unchecked? Why? Do I have to "save" it somehow? Hrcko
4
by: Moe Sizlak | last post by:
Hi There, I am trying to return the value of a listbox control that is included as a user control, I can return the name of the control but I can't access the integer value of the selected item,...
8
by: ChrisK | last post by:
Hi, I'm beginner with VB.net and i have a trouble... At work, they decided to program with tabcontrol...and i'mm in charge of this ! There is my problem. I've a form with one tabcontrol (TBC1...
0
by: =?Utf-8?B?YW1iZXI=?= | last post by:
Hello! I have a form that contains a tabcontrol, that is populated based on which record a user selects in a listbox on the form. I just added code to 'mytab.validating' so if the user tries to...
11
by: Andrus | last post by:
1. Run code 2. Resize window Observed: Listbox flashes during resize. How to remove this flashing ? Andrus.
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.