VB Graph Control Displays Maximum of 80 Characters Per Title
ID: Q81450
|
The information in this article applies to:
-
Microsoft Visual Basic Professional Edition for Windows, versions 2.0, 3.0
-
Microsoft Professional Toolkit for Microsoft Visual Basic programming system for Windows, version 1.0
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, "i") + "*"
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, "i") + "*"
Debug.Print Len(Graph1.BottomTitle)
Graph1.DrawMode = 2 ' Update Graph.
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 :
Version : WINDOWS:2.0,3.0; :1.0
Platform : WINDOWS
Issue type :
|