BUG: Multiline Text Box Contents Not Gray When Enabled=False (78892)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Visual Basic Standard Edition for Windows 1.0

This article was previously published under Q78892

SYMPTOMS

When the MultiLine property of a text box is True (-1) and the Enabled property is False (0), text inside the text box displays incorrectly as black instead of gray.

WORKAROUND

To work around the problem, set the ForeColor property of the text box to gray when the Enabled property is set to False (-1) as shown in the example below.
'*** In the global module: ***
Global Const WINDOW_TEXT = &H80000008    ' from CONSTANT.TXT
Global Const GRAY_TEXT = &H80000011      ' from CONSTANT.TXT

' *** In the form: ***
' to disable a multi-line text box
text1.Enabled = 0                    ' disable
text1.ForeColor = GRAY_TEXT          ' gray

' to enable a multi-line text box
text1.Enabled = -1                   ' enable
text1.ForeColor = WINDOW_TEXT        ' black
				

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Modification Type:MajorLast Reviewed:12/12/2003
Keywords:kbbug KB78892