BUG: Multiline Text Box Contents Not Gray When Enabled=FalseLast reviewed: June 21, 1995Article 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
SYMPTOMSWhen 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.
WORKAROUNDTo 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 STATUSMicrosoft 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |