FIX: Panel Custom Control Caption Not Dimmed When Disabled

ID: Q80868


The information in this article applies to:
  • Microsoft Visual Basic Standard Edition 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 query words: buglist1.00 buglist2.00 fixlist3.00 1.00 2.00 3.00 gray grey grayed greyed

Keywords :
Version : WINDOWS:2.0; :1.0
Platform : WINDOWS
Issue type :


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