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

Last reviewed: June 21, 1995
Article ID: Q78892
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 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 reference words: buglist1.00 buglist2.00 buglist3.00 1.00 2.00
3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsStd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.