FIX: Click Event Of Straight Line Not Firing

ID: Q140566

3.00 WINDOWS kbprg kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

When a horizontal or vertical line object is on a form and there is code in the Click event of the line, the code will not execute if the line Width property of a vertical line or Height property of a horizontal line is set to 0.

WORKAROUND

For a verticle line, set the line object's Width property to at least 1 and the BorderWidth property to at least 2. If the BorderWidth property is less than 2, the vertical line will not be displayed correctly. For a horizontal line, set the Height property to at least 1 and the BorderWidth property to at least 1 (the default).

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.

MORE INFORMATION

The problem (the vertical line has to have a BorderWidth value of at least 2 to display correctly), does not appear for diagonal lines. This is why setting the line width or height corrects the problem. The line is actually being angled slightly. This angling is not visibly apparent even in large displays or form sizes. However because the borderwidth has been increased a hairline thickness is not possible. This characteristic is more noticable with vertical rather than horizontal lines because of the way the monitor displays graphics.

Steps to Reproduce Problem

1. Create a form.

2. Put a vertical line object control on the form.

3. Put a horizontal line object control on the form.

4. In the Click events of the line objects, place this code:

   wait window "click"

5. Run the form.

6. Click the lines. You will notice that the wait window does not appear

   for either line.

Steps to Work Around the Problem

1. Change the Width property of the vertical line control to 1 and the

   BorderWidth property to 2.

2. Change the Width property of the horizontal line to 1.

3. Run the form.

4. Click the lines. Notice that the wait window appears for each line. The

   click events of the lines are firing.

KBCategory: kbprg kbbuglist kbfixlist KBSubcategory: FxotherGeneral VFoxWin buglist3.00 fixlist5.00 Additional reference words: 3.00 line click
Keywords          : kbVFp kbVFp500fix buglist3.00 FxotherGeneral kbbuglist kbfixlist
Version           : 3.00
Platform          : WINDOWS
Solution Type     : kbfix


Last Reviewed: November 1, 1997
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.