FIX: Panel Custom Control Caption Not Dimmed When Disabled

Last reviewed: October 30, 1997
Article ID: Q80868
1.00 2.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows, version 2.0 - Microsoft Professional Toolkit for Microsoft Visual Basic programming

  system for Windows, version 1.0

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

  1. 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.

  2. 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.

  3. Place a panel control (Panel3D1) on the form.

  4. Draw a command button (Command1) within the boundaries of the panel control. Make sure the caption of the panel control is still visible.

  5. 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.

  6. Add the following code to the Command1_Click event procedure:

       Sub Command1_Click ()
          MsgBox "You clicked the button!"
       End Sub
    
    

  7. 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 = "Disable panel"
             Else
                Command2.Caption = "Enable panel"
          End If
       End Sub
    
    

  8. Press the F5 key to run the program.

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 reference words: buglist1.00 buglist2.00 fixlist3.00 1.00 2.00
3.00 gray grey grayed greyed
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus
Solution Type : kbfix


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: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.