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 - Make Graphic Button

Now, we explain how to make a graphic button like below, left picture is not pressed, right is pressed.

Make Graphic Button 1            Make Graphic Button 2

Please follow these steps to make it.

1. Draw a pentagram by polygon basic element and set its background color as gray (change BackColor property), and then duplicate it, place the clone at its upper left as above, set clone's BackColor as red. At last, set red pentagram Left and Top properties as 10, and set gray one Left and Top properties as 16 both.

2. Select red pentagram, and then double-click OnLButtonDown event in the Functions view at left to write the follow script:

Sender.MoveBy( 16, 16 )

3. As above, write the following script in red pentagram's OnLButtonUp event:

Sender.MoveBy( -16, -16 )

4. Rename current sheet as StarButton (change its Name property).

5. Save current file as c:\libtest.tbl.

6. Select Libraries tab and click File -> Open library... menu item, choose libtest.tbl, now you can find StarButton element under libtest group in the Libraries view:

Make Graphic Button 3

7. Create a new file and draw a StarButton on it, and then click Program ->Run menu item to test this button.

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