VCL.Graphex Sample

From RAD Studio Code Examples
Jump to: navigation, search

Language:

This sample demonstrates how to create a simple graphical editor.

Contents

Location

You can find the Graphex sample project at:

Description

The application creates a simple graphic editor that provides basic graphic functionality: drawing shapes (lines, rectangles, ellipses, round rectangles), changing the type, width, and color of lines and hatches. It also provides basic File actions: creating, saving and opening an image, and Edit actions: copying, cutting, and pasting.

How to Use the Sample

  1. Navigate to Start > Programs > Embarcadero RAD Studio > Samples and open graphex.dproj.
  2. Press F9 or choose Run > Run.

Files

File Contains

BMPDlg

The class for the form that is displayed when the user chooses File > New from the graphic editor.

GraphWin

The class for the main form that represents the editor itself.

Classes

  • TNewBMPForm is the class for the form that is displayed when you want to create a new image. You can use this form to choose the size of the new canvas.
  • TForm1 is the class for the main form. It contains toolbars, a menu bar, and a TImage component as the drawing surface. It also contains dialog components for displaying open, save, and color dialogs. The toolbars are actually panels with customized TSpeedButton components.

Implementation

Uses

See Also

Personal tools