473,327 Members | 2,090 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,327 software developers and data experts.

Unselectable Combobox in Tabcontrol

I have a minor, but somewhat frustrating, problem. In a program
I'm working on, I've got a tabcontrol that contains several other
controls, a few of which are comboboxes. In the IDE, one of the
comboboxes cannot be selected by clicking on it. If I click on
this combobox, the tabcontrol itself is selected. I can select
the combobox by choosing it from the list of controls in the
Properties window or by dragging a rectangle around it.

I've deleted the control and recreated it a few times. That only
solves this problem temporarily. At some point it returns.

This problem does not seem to have any effect when my program is
running. It just affects the IDE.

Does anyone have any ideas as to how to fix this problem?

I'm running MSVB.net 2003 7.1.3088 with .Net Framework version
1.1.4322 SP1.

Thanks for any help.
--
Greg
----
greg -at- spencersoft -dot- com
Nov 21 '05 #1
8 2900
Gregory,

Did you take the first step and have a look in the designer generated code
if it is maybe still there as an orphan. If not you can as well than have a
look at the RESX file. (Make all files showable in top of project solution).

I hope this helps,

Cor
Nov 21 '05 #2
In article <#g*************@TK2MSFTNGP09.phx.gbl>, Cor Ligthert
[MVP] <no************@planet.nl> declared...
Gregory,

Did you take the first step and have a look in the designer generated code
if it is maybe still there as an orphan. If not you can as well than have a
look at the RESX file. (Make all files showable in top of project solution).


Yeah, I had looked at the generated source code before. Other
than the attributes that I expected to be different, everything
looked the same as the other combo boxes.

I hadn't previously looked at the RESX file, but again,
everything looks the same as the other combo boxes, except the
expected differences.

Thanks,
--
Greg
----
greg -at- spencersoft -dot- com
Nov 21 '05 #3
In article <MP************************@newsgroups.comcast.net >,
Gregory A Greenman <se*@sig.below> declared...
In article <#g*************@TK2MSFTNGP09.phx.gbl>, Cor Ligthert
[MVP] <no************@planet.nl> declared...
Gregory,

Did you take the first step and have a look in the designer generated code
if it is maybe still there as an orphan. If not you can as well than have a
look at the RESX file. (Make all files showable in top of project solution).


Yeah, I had looked at the generated source code before. Other
than the attributes that I expected to be different, everything
looked the same as the other combo boxes.

I hadn't previously looked at the RESX file, but again,
everything looks the same as the other combo boxes, except the
expected differences.

Just to expound on this answer...

The control that I'm having a problem with is named cmbEdition.
Another combobox on the same tab page is named cmbOwner. Here's
all the generated code for the two:

--------------
#Region " Windows Form Designer generated code "
....
Friend WithEvents cmbOwner As System.Windows.Forms.ComboBox
....
Friend WithEvents cmbEdition As System.Windows.Forms.ComboBox
....

<System.Diagnostics.DebuggerStepThrough()> Private _
Sub InitializeComponent()
....
Me.cmbOwner = New System.Windows.Forms.ComboBox
....
Me.cmbEdition = New System.Windows.Forms.ComboBox
....
'
'cmbOwner
'
Me.cmbOwner.BackColor = System.Drawing.Color.FromArgb _
(CType(192, Byte), CType(255, Byte), CType(255, Byte))
Me.cmbOwner.DataSource = Me.ds.Owners
Me.cmbOwner.DisplayMember = "Description"
Me.cmbOwner.DropDownStyle = _
System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbOwner.Location = New System.Drawing.Point(512, 32)
Me.cmbOwner.Name = "cmbOwner"
Me.cmbOwner.Size = New System.Drawing.Size(128, 21)
Me.cmbOwner.TabIndex = 9
Me.cmbOwner.ValueMember = "ID"
....
'
'TabPage5
'
Me.TabPage5.Controls.Add(Me.cmbEdition)
....
Me.TabPage5.Controls.Add(Me.cmbOwner)
....
'
'cmbEdition
'
Me.cmbEdition.BackColor = System.Drawing.Color.FromArgb _
(CType(192, Byte), CType(255, Byte), CType(255, Byte))
Me.cmbEdition.Items.AddRange(New Object() _
{"First Edition", "First Edition/First Printing", _
"Stated First Edition", "First Printing", _
"First American Printing", "First American Edition"})
Me.cmbEdition.Location = New System.Drawing.Point(512, 104)
Me.cmbEdition.Name = "cmbEdition"
Me.cmbEdition.Size = New System.Drawing.Size(128, 21)
Me.cmbEdition.TabIndex = 49
....
End Sub
#End Region
--------------

And here's the contents of the ResX file for the two:
--------------
<data name="cmbOwner.DefaultModifiers"
type="System.CodeDom.MemberAttributes, System, Version=
1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Assembly</value>
</data>
<data name="cmbOwner.Locked" type="System.Boolean,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cmbOwner.Modifiers"
type="System.CodeDom.MemberAttributes, System, Version=
1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Assembly</value>
</data>
....
<data name="cmbEdition.DefaultModifiers"
type="System.CodeDom.MemberAttributes, System, Version=
1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Assembly</value>
</data>
<data name="cmbEdition.Locked" type="System.Boolean,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cmbEdition.Modifiers"
type="System.CodeDom.MemberAttributes, System, Version=
1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Assembly</value>
</data>
--------------

--
Greg
----
greg -at- spencersoft -dot- com
Nov 21 '05 #4
In article <MP************************@newsgroups.comcast.net >,
Gregory A Greenman <se*@sig.below> declared...
In article <MP************************@newsgroups.comcast.net >,
Gregory A Greenman <se*@sig.below> declared...
In article <#g*************@TK2MSFTNGP09.phx.gbl>, Cor Ligthert
[MVP] <no************@planet.nl> declared...
Gregory,

Did you take the first step and have a look in the designer generated code
if it is maybe still there as an orphan. If not you can as well than have a
look at the RESX file. (Make all files showable in top of project solution).


Yeah, I had looked at the generated source code before. Other
than the attributes that I expected to be different, everything
looked the same as the other combo boxes.

I hadn't previously looked at the RESX file, but again,
everything looks the same as the other combo boxes, except the
expected differences.

Just to expound on this answer...

The control that I'm having a problem with is named cmbEdition.
Another combobox on the same tab page is named cmbOwner. Here's
all the generated code for the two:

The only real difference between cmbOwner and cmbEdition is that
cmbOwner's DropDownStyle is DropDownList while cmbEdition is the
default of DropDown.

I wondered if that difference could be relevant, so I changed
cmbEdition to DropDownList and noted that the problem went away.
Doing some experimenting, I've found that this problem exists
with DropDowns, not DropDownLists. If I change a DropDown to a
DropDownList and then back again, it solves the problem until I
Exit VS and restart.

I just created a new Windows App project. I added a tab control
with two pages named A and B. I then added a combobox, left it as
a DropDown. I added a few items to its collection. Then I quit VS
and restarted. The combobox is not selectable. I repeated the
process without a tab control and the combobox is selectable.
Somehow or other VS has a bug with DropDown comboboxes in tab
controls.
--
Greg
----
greg -at- spencersoft -dot- com
Nov 21 '05 #5
Gregory
I have created a form
In that a tabcontrol
In that two tabpage with on both a combobox
the combobox on page 1 I have set to dropdownlist
that one I have filled with the 1,2,3,4
The other one with a,b,c,d

I have ended VS
I have started it again.
It works in my opinion as it should.

Cor
Nov 21 '05 #6
In article <e4**************@TK2MSFTNGP09.phx.gbl>, Cor Ligthert
[MVP] <no************@planet.nl> declared...
Gregory
I have created a form
In that a tabcontrol
In that two tabpage with on both a combobox
the combobox on page 1 I have set to dropdownlist
that one I have filled with the 1,2,3,4
The other one with a,b,c,d

I have ended VS
I have started it again.
It works in my opinion as it should.


Try it with the combobox on page 1 set to DropDown. I just
modified my test project to add a DropDown on page 2 and that one
worked fine.

Apparently, the problem requires a DropDown Combo on page 1 of a
tab control. DropDown combos work fine on subsequent pages and
DropDownLists work fine anywhere.

BTW, my version numbers are:

MS Development Environment 2003 Version 7.1.3088
MS Net Framework 1.1 Version 1.1.4322 SP1
--
Greg
----
greg -at- spencersoft -dot- com
Nov 21 '05 #7
I can confirm this behaviour. You can select the combobox by clicking on the
button but clicking on the edit box results in the TabControl being
selected.

I just tried the same thing with TabControlEX (my modified tabcontrol with a
custom designer), and clicking on the edit box will toggle between selecting
the combobox and selecting the tabcontrol. I also tried it with a new
control I am working on, which does not inherit TabControl but is a similar
control, and that does not exhibit this behaviour, so I can safely say that
this is a TabControl specific issue and not something to do with container
collection controls.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
Nov 21 '05 #8
In article <OW*************@tk2msftngp13.phx.gbl>, Mick Doherty
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100
#ntlworld.com]> declared...
I can confirm this behaviour. You can select the combobox by clicking on the
button but clicking on the edit box results in the TabControl being
selected.

I just tried the same thing with TabControlEX (my modified tabcontrol with a
custom designer), and clicking on the edit box will toggle between selecting
the combobox and selecting the tabcontrol. I also tried it with a new
control I am working on, which does not inherit TabControl but is a similar
control, and that does not exhibit this behaviour, so I can safely say that
this is a TabControl specific issue and not something to do with container
collection controls.


Thanks. I was beginning to wonder if I was seeing things.

I hadn't noticed that clicking on the button correctly selects
the combobox. That helps alot because using a selection rectangle
or choosing the control in the properties window is kind of a
nuisance.

--
Greg
----
greg -at- spencersoft -dot- com
Nov 21 '05 #9

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

Similar topics

9
by: Programatix | last post by:
Hi, I'm having problem with ComboBox. I'm trying to force the ComboBox select nothing by doing this, myCombo.SelectedText = "" myCombo.SelectedIndex = -1 but in vain, as the ComboBox will...
0
by: CalPARK InterNetStation | last post by:
Could anyone explain why the difference of behavior betweein Case1 and Case2 occurs? Microsoft Visual C#.NET 55607-652-0000007-18218 Windows Forms Application 1. put a TabControl on a Form...
0
by: eye5600 | last post by:
In the form designer, a ComboBox on a TabPage becomes unselectable via the mouse. (Any attempt to interact with the ComboBox via mouse selects the TabPage) I can select something else, and tab to...
0
by: Louise Harris | last post by:
I have a combobox on a tabcontol that needs to be populated when another control on the tabcontrol changes. I am using a dataset and dataadapter to load the combobox, but no data appears in the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.