Microsoft KB Archive/80868

= FIX: Panel Custom Control Caption Not Dimmed When Disabled =

Article ID: 80868

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Windows 2000 Readiness Analyzer

-



This article was previously published under Q80868



SYMPTOMS
When the 3-D Panel custom control is disabled by setting the Enabled property to False(0), the controls on the 3-D Panel (if any) are disabled but the caption displayed for the 3-D Panel control is not dimmed.



STATUS
Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.



MORE INFORMATION
Like the standard Frame and Picture controls in Visual Basic, the 3-D Panel can also be used to group other controls together. When these containers or parent controls are disabled by setting the Enabled property to False(0), the controls they contain, or the child controls, are also disabled. In addition, the caption on the frame is dimmed. However, the caption of the 3-D Panel custom control is not dimmed, even though the child controls on it are disabled.

Steps to Reproduce Problem
 Start Visual Basic, or choose New Project from the File menu (ALT F, N) if Visual Basic is already running. Form1 is created by default. From the File menu, choose Add File, and select the THREED.VBX custom control file. The 3-D Panel tool will appear in the Toolbox. Place a panel control (Panel3D1) on the form. Draw a command button (Command1) within the boundaries of the panel control. Make sure the caption of the panel control is still visible. Draw another command button (Command2) on the form outside the panel control, and change its Caption property to Disable panel. This button will be used to disable/enable the panel, which will in turn disable/enable the Command1 button on the panel control.  Add the following code to the Command1_Click event procedure: Sub Command1_Click MsgBox &quot;You clicked the button!&quot; End Sub </li>  Add the following code to the Command2_Click event procedure: Sub Command2_Click Panel3D1.Enabled = Not Panel3D1.Enabled 'Enable/Disable panel If Panel3D1.Enabled Then Command2..Caption = &quot;Disable panel&quot; Else Command2.Caption = &quot;Enable panel&quot; End If  End Sub </li> Press the F5 key to run the program.</li></ol>

With the panel disabled, the Command1 button will produce the message box when clicked. If you click the Command2 button, the Command1 button is disabled as expected. The panel control is disabled but its caption is not dimmed.

Additional query words: buglist1.00 buglist2.00 fixlist3.00 1.00 2.00 3.00 gray grey grayed greyed

Keywords: kbbug kbfix KB80868

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.