Microsoft KB Archive/221723

= FIX: Container Click Not Fired When Clicking Disabled Control =

Article ID: 221723

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q221723



SYMPTOMS
The Click event of a container or pageframe does not fire when clicking on a disabled control contained within the container or pageframe. The Click event of the form fires instead.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



Steps to Reproduce Behavior
  Create a form and place the following code in the Click event: WAIT WINDOW "Form Click"   Add a container control to the form with the following in the control's Click event: WAIT WINDOW "Container Click"   Add a command button to the container with the following in the button's Click event: WAIT WINDOW "Command button Click"  Set the Enabled property of the command button to .F. Run the form and click the command button inside the container.

To see this behavior with a pageframe, follow these steps:   Create a form and place the following in the Click event: WAIT WINDOW "Form Click" </li>  Add a pageframe control to the form. Select the control and place the following in the page1 Click event: WAIT WINDOW "Page1 Click" </li>  Add a command button to page1 with the following in the button's Click event: WAIT WINDOW "Command button Click" </li> Set the Enabled property of the command button to .F.</li> Run the form and click the command button on page one of the pageframe.

Note that the form's Click event fires instead of the Click event of the container object when the disabled button is clicked. Similar behavior occurs with the pageframe. Instead of activating the page or pageframe's Click event, the form's Click event is called when the disabled button is clicked.

The behavior is different in Visual FoxPro 3.0b and 5.0x. In these versions, the Click event of the container occurs when clicking the disabled button inside of it. In the case of a pageframe, the Click event of the page fires.</li></ol>

Keywords: kbbug kbfix kboop kbcontainer kbctrl kbvs600sp3fix KB221723

-

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

© Microsoft Corporation. All rights reserved.