Text in multiline TextBox disapears when using TabControl

Adagio

Well-known member
Joined
Dec 12, 2005
Messages
162
Programming Experience
Beginner
For the past 1½ year there hasn't been a problem, but last Friday I made a change to a program that is being used by a lot of people and sent out an update. The only change I made was to add a TabControl, and move all the controls from the form into the first tab-page (second tab-page still empty)

The two multiline TextBoxes I have on the form now has a problem: Unless there's focus on one of the TextBoxes, the content is "cleared" (well, the text is still there, but you can't see it)

I remember I had this problem myself on some other form (a form that is only being used on my computer at present time. This form also has a TabControl), but I haven't seen this problem for a while (and I don't remember doing anything special)

Does anyone here know what could be the cause of this problem?
 
The error also happens on one of my colleagues machines, where VS is installed. Should make it a bit easier to find the problem, but so far without any luck :(
 
I added this code:

TextBox1.Invalidate()

On TextBox1.MouseLeave and MouseEnter events

Initial results showed that this took care of the problem. Not the best solution to the problem though, but better than nothing
 
Back
Top