Back to Home
Visual Graph Home
TriSun Software Inc. Home

Visual Graph Site Menu
What is Visual Graph?
50 Technical Features
Getting Started
Abundant Graphic Libraries
File Format
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 - Change Element's Shape

The following example demonstrates how to change the element's shape.

1. Run ide.exe, draw 3 rectangles like this:

Change Elements's Shape 1

We name them as A, C, B from left to right by changing their Name property.

2. Now, select these 3 rectangles, right-click them and execute Merge element to merge them.
We try to stretch this merged element by mouse, its shape will be changed, like this:

Change Elements's Shape 2

By default, the element will keep the ratio of its inner elements when changing its shape.

3. If we want to stretch it like the following shape, that is, do not change A, just only move B to stretch C, how to do?

Change Elements's Shape 3

Please right-click this element and execute Edit element (by default, Visual Graph IDE will open a new document that named .element1 for editing its inner elements), and then click Functions tab at left, double-click OnResize, write the following script:

A.SetBounds( Left, Top, A.Width, Height )
B.SetBounds( Right - B.Width, Top, B.Width, Height )
C.SetBounds( A.Right, Top + Height / 2 - C.Height / 2, Width - A.Width - B.Width, C.Height )

Now, switch to the original document (noname), just stretch the merged element by mouse, the script will be executed in the Design mode.

Sitemap | Legal Notices | Privacy Policy | Contact Us | About Us
Copyright© 2001-2024 TriSun Software Inc. All rights reserved.