FIX: Graph Custom Control: LabelText May Overlap

Last reviewed: October 30, 1997
Article ID: Q82874
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 you use the Graph custom control, the LabelText strings may overlap. Graph has complete control over the LabelText placement on the x-axis and the size of the font used to display these strings. Each string contained in the LabelText array can be up to 80 characters long. Therefore, depending on the size of the graph and the length of each LabelText string, the labels may overlap on the graph.

STATUS

Microsoft has confirmed this to be a bug in the the Graph custom control shipped with the products listed above. This problem was corrected in the Graph custom control shipped with Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default.

  2. From the File menu, choose Add File. In the Files box, select the GRAPH.VBX custom control file. The Graph tool appears in the toolbox.

  3. Add a Graph control (Graph1) to Form1.

  4. Change the following properties for Graph1:

       Property    Value
       --------------------------------------------
    
       Top         0
       Left        0
       Width       3500
       Height      2500
       LabelText   aaaaaaaaaaaaaaaaaaaa     (20 a's)
                   bbbbbbbbbbbbbbbbbbbb     (20 b's)
                   ccccccccccccccccccccccc  (20 c's)
                   dddddddddddddddddddd     (20 d's)
                   eeeeeeeeeeeeeeeee        (17 e's)
    
    
As you set the properties in step 3, Graph1 will continuously update. Due to the length of the LabelText strings, the labels will stagger themselves on the graph. They can only stagger for three layers before returning to the original level. When you enter the fourth and fifth string (the d's and e's), the labels will overlap with the first and second strings (the a's and b's).

If you reset the Graph1 Width property to 4000, the overlapping disappears.


Additional reference words: buglist1.00 buglist2.00 fixlist3.00 1.00 2.00
3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus APrgGrap
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.