473,416 Members | 1,751 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,416 software developers and data experts.

Wierd behavior of combo boxes on tab control

Tom
I have some very strange issues with combo boxes on a tab control.
Here's the scenario: I have a Windows Forms form that has a tab control
on it, with two (2) tabs. Tab 2 happens to have a number of text and
combo boxes on it (in panels on the tab). These combos were originally
simple drop down lists - i.e. you had to select from the list and
couldn't enter anything of your own. At that time everything worked
fine.

Now, the users decided that they wanted to be able to enter text into 6
of these combo boxes, and not be forced to select only from the list.
No problem, I thought, I simply switched the combo boxes from
DropDownList to DropDown (the commit/update logic didn't have to be
changed, thank goodness). When I load the boxes initially, I simply
read the database, load the items into the combo box collection, then
take whatever is specifed for this database record and set that in the
combo box Text field. That worked fine, EXCEPT for this one wierd
occurance: When you switch to that tab, ALL of these six combo boxes I
switched over to DropDown have their text selected! All are highlighted
and if I write a keypress event for one of these combo boxes, it shows
the selectedlength to be that of the length of the text - i.e. it is as
though a .SelectAll was done on each of these combo boxes; yet I never
do that anywhere in my code! I can un-select them by tabbing thru each
combo box - but then if I switch back to tab 1 and then back to tab 2,
lo and behold, every one of these combo boxes are reselected again!

I have banged my head against a wall trying to figure out why it is
doing this, but to no avail. I've went thru the code and don't see
anything that would account for this. I know my users are going to
complain if I put this into production acting like this. Anyone got any
ideas as to what .NET is doing and how to fix it? I don't know if this
is something stupid I am doing and just not seeing, or whether this is
an issue with the control and/or .NET framework.

Any advice/thoughts appreciated. BTW, this is being done in VS 2003,
..NET Framework 1.1, and Windows Forms.

Thanks in advance.

Tom

--

Jul 13 '06 #1
0 1574

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: FZ | last post by:
Hi Gang, I was wondering if a generous person might be able to walk me through what I believe is a pretty simple task. I actually have significant Access experience, but I haven't done it in...
1
by: Robert Neville | last post by:
The solution to my dilemma seems straight-forward, yet my mind has not been forthcoming with a direct route. My Project form has a tab control with multiple sub-forms; these distinct sub-forms...
2
by: givlerj | last post by:
I need some help. Here is a little background, I support a MS Access 2k DB (SQL Server 2k backend) that has courses and students. The problem form lets the user pick a course from a drop down and...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
8
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
10
by: themightypea | last post by:
Hi, I'm attempting to create a continuos form which allow the user to edit various fields for each item. Unfortunately, the data I need is spread over multiple tables so binding the control to the...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.