Back to Home Visual Graph Home TriSun Software Inc. Home Visual Graph Site Menu Home What is Visual Graph? Screenshots 50 Technical Features Getting Started Abundant Graphic Libraries File Format FAQ Online Demo (IE Only) Common Applications Visual Graph Getting Started Use VG Component in Delphi 6 Use VG Component in VB6 Use Graphic Library Change Element's Shape Customize Property Make Graphic Button Get the Selected Elements Dynamically Create Graph Movable Label Link Point Access Properties Use Line Vertexes Call Windows API Functions Call Visual Graph Functions Callback Control Event in Script Drag Graph in Run Mode Detail Report Make and Use Dialog Box |
Visual Graph Getting Started - Dynamically Create GraphEach graph has the corresponding description string, so we can use SaveToBuffer() to save a graph to memory by string, also can use LoadFromBuffer() to generate a graph by string.1. Create a new file in Visual Graph IDE, and then click Table -> New table... menu item to create a table with 2 columns and 3 rows. Now, please fill this table as below:
2. Click Program -> Command line... menu item, input the following script in the Command line window and press <Enter>: d=AddUnit( 0, "circle" );d.loadfrombuffer(text2.text) Please note that text2 is the 2nd cell in first row. Now, a circle will appear in current sheet according to text2.text like this: 3. Input the following script in the Command line window and press <Enter>: d=AddUnit( 0, "line" );d.loadfrombuffer(text4.text) Please note that text4 is the 2nd cell in second row. Now, a graph will appear in current sheet according to text4.text like this: 4. Input the following script in the Command line window and press <Enter>: d = AddUnit( 0, "traffic lights" ); d.LoadFromBuffer( text6.text ) Please note that text6 is the 2nd cell in third row. Now, the traffic lights will appear in current sheet according to text6.text like this: 5. Refer to this example, we can save graph's description string in file or database, once we need one, just simply call LoadFromBuffer() to generate it by using its description string. |
Sitemap |
Legal Notices |
Privacy Policy |
Contact Us |
About Us
Copyright© 2001-2025 TriSun Software Inc. All rights reserved.