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

ID: Q78892


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for Windows, versions 2.0, 3.0
  • Microsoft Visual Basic programming system for Windows, version 1.0


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.

Additional query words: buglist1.00 buglist2.00 buglist3.00 2.00 3.00

Keywords :
Version : WINDOWS:1.0,2.0,3.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 13, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.