Microsoft KB Archive/81450

= VB Graph Control Displays Maximum of 80 Characters Per Title =

Article ID: 81450

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Windows 2000 Readiness Analyzer

-



This article was previously published under Q81450



SUMMARY
The Graph custom control has an 80 character maximum limit on all displayed strings such as labels and legends. However, the combined length of the actual string may be longer than 80 characters.



MORE INFORMATION
The Graph custom control can display strings by using several different properties. For example, the BottomTitle and LeftTitle properties may be set from the Properties bar in the programming environment.

The following example sets the BottomTitle property of a Graph to 90 characters:

 Run Visual Basic for Windows, or from the File menu, choose New Project (press ALT, F, N) if Visual Basic for Windows is already running. Form1 is created by default. From the File menu, choose Add File. In the Files box, select the GRAPH.VBX custom control file. The Graph tool will appear in the toolbox. Select the Graph icon on the toolbox and place it on Form1, and expand it to the largest size possible. Double-click the Graph control to open the Code window for the Click event.  Add the following code to the Click event: Graph1.BottomTitle = String$(79, &quot;i&quot;) + &quot;*&quot; Debug.Print Len(Graph1.BottomTitle) Graph1.DrawMode = 2         ' Update Graph.  Run the program and click on the graph control. If your Graph is expanded to the largest possible size, you should be able to see the string of 80 characters.  Change the code as follows: Graph1.BottomTitle = String$(80, &quot;i&quot;) + &quot;*&quot; Debug.Print Len(Graph1.BottomTitle) Graph1.DrawMode = 2               ' Update Graph. </li></ol>

You should not be able to see the last character, the asterisk (*).

In this example, 80 characters at most will show on the screen even though you set the BottomTitle property to a larger character string. The actual BottomTitle property, however, contains more characters. Whether or not the actual strings are displayed also depends on other factors, such as the width and height of the control, or the strings that are placed in the other properties of the control.

Additional query words: 1.00 2.00 3.00

Keywords: KB81450

-

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

© Microsoft Corporation. All rights reserved.