FIX: Graph Custom Control: LabelText May Overlap (82874)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Professional Toolkit for Microsoft Visual Basic programming system for Windows

This article was previously published under Q82874

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.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:kbbug kbfix KB82874