I have an application written in WinForms and it contains a single TextBox. With the TestComplete spy, I can spot the TextBox and its properties but during runtime, this control, in contrast to all the other controls, can't be spotted by its name or any of its other properties. Why is that and how can I fix it (either on the application side or the testing side)?
This is how the control is defined:
this.myTxtBx.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.myTxtBx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.myTxtBx.Location = new System.Drawing.Point(74, 25);
this.myTxtBx.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.myTxtBx.Name = "myTxtBox";
this.myTxtBx.Size = new System.Drawing.Size(91, 20);
this.myTxtBx.TabIndex = 1;
this.myTxtBx.TextChanged += new
System.EventHandler(this.myTxtBox_TextChanged);