I have a real brain teaser for y'all. I have a textbox on a form that is acting weird. When I enter data into the control, it works great. But when I delete all the data that is in their, it works fine, but as soon as I move the focus to a different control on the form, it puts that value that I deleted back into the control.
There are no events that fire that should be causing this behavior (that I can tell). Here is a snippet of the InitializeComponent method to show that nothing is going on:
this.txtCustomerNumber.Location = new System.Drawing.Point(168, 116);
this.txtCustomerNumber.Name = "txtCustomerNumber";
this.txtCustomerNumber.Size = new System.Drawing.Size(128, 20);
this.txtCustomerNumber.TabIndex = 15;
this.txtCustomerNumber.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.CheckEnterKeyPressed);
The "this.CheckEnterKeyPressed" is just like it sounds, it only checks if enter was pressed, then does some other processing.
If anyone has any suggestions, or hints how to find this "error", I would greatly appreciate it.
Thanks,
andegre
There are no events that fire that should be causing this behavior (that I can tell). Here is a snippet of the InitializeComponent method to show that nothing is going on:
this.txtCustomerNumber.Location = new System.Drawing.Point(168, 116);
this.txtCustomerNumber.Name = "txtCustomerNumber";
this.txtCustomerNumber.Size = new System.Drawing.Size(128, 20);
this.txtCustomerNumber.TabIndex = 15;
this.txtCustomerNumber.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.CheckEnterKeyPressed);
The "this.CheckEnterKeyPressed" is just like it sounds, it only checks if enter was pressed, then does some other processing.
If anyone has any suggestions, or hints how to find this "error", I would greatly appreciate it.
Thanks,
andegre