Tab key behaves differently on groupBoxs? Is this .NET Framework Bug?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H
I have a couple of groupBoxs in my windowsform, these gruopBoxs contains a couple of TextBoxs in them, when i use keyboard 'Tab' key to traverse those Textboxs , groupBox3.ContainsFoucs is not setting to true when iam going from groupBox2 togroupBox3

example
groupBox1
textbox
textbox

groupBox
textbox
textbox4
so when i use Tab key of keyboard to traverse these textboxs ie. when iam going from textbox2 to textbox
the groupBox2.ContainsFocus is not set to true even though it is getting the focus
but when i use mouse clicking from textbox2 to textbox3 iam getting the groupBox2.ContainsFocus is set to tru
Is this the .Net framework Magic?:-
 
Hi,
I tried your example, and it groupBox2_Enter eventhandler i showed a message
box with the (this.ContainsFocus)....then i tried tab button from text box
to another, and it showed the message.
Are you trying the same thing?

--
Rami Saad
Microsoft GTSC Developer support for Middle East


seash said:
Hi
I have a couple of groupBoxs in my windowsform, these gruopBoxs contains
a couple of TextBoxs in them, when i use keyboard 'Tab' key to traverse
those Textboxs , groupBox3.ContainsFoucs is not setting to true when iam
going from groupBox2 togroupBox3.
example :
groupBox1
textbox1
textbox2

groupBox2
textbox3
textbox4
so when i use Tab key of keyboard to traverse these textboxs ie. when iam
going from textbox2 to textbox3
the groupBox2.ContainsFocus is not set to true even though it is getting the focus.
but when i use mouse clicking from textbox2 to textbox3 iam getting the
groupBox2.ContainsFocus is set to true
 
Are you sure the textboxes in groupBox2 are actually contained inside the
GroupBox? It's possible to have a control *over* a GroupBox so that it
appears to be contained, but isn't.
 
Back
Top