VB Panel Custom Control Caption Not Dimmed when Disabled

ID Number: Q80868

1.00

WINDOWS

buglist1.00

Summary:

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.

Microsoft has confirmed this to be a problem in Microsoft Professional

Toolkit for Microsoft Visual Basic programming system version 1.0 for

Windows. We are researching this problem and will post new information

here as it becomes available.

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. Run Visual Basic, or select New Project from the File menu

(ALT F, N). Form1 will be 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"

(without the quotation marks). This button will be used to

disable/enable the panel, which will in turn disable/enable

Command1 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 F5 to run the program.

With the panel disabled, Command1 will produce the message box when

clicked. If you click on Command2, Command1 will then be disabled as

expected. The panel control is disabled but its caption is not

dimmed.

Additional reference words: 1.00 gray grey grayed greyed