VCL.Controls Sample

From RAD Studio Code Examples
Jump to: navigation, search

This sample demonstrates how to create and use custom VCL components. The application proves that you can easily modify the implementation for controls that already exist on the palette.

Location

You can find the Controls sample project at:

Description

The application creates and installs the C++ version of the visual components that already exist in the Samples category on the Tool Palette, plus some new ones.

These are the new components that this sample application adds to the Tool Palette:

  • TCTrayIcon
  • TPerformanceGraph
  • TCSpinButton
  • TCSpinEdit
  • TCColorGrid
  • TCGauge
  • TCDirectoryOutline
  • TCCalendar
  • TPie

How to Use the Sample

To run the example, complete the following steps:

  1. Navigate to the location given above.
  2. Load bcbsmp.bpl.
  3. Load dclbcbsmp.bpl.(By convention, dcl is the prefix for component designer packages.)
  4. Build bcbsmp.bpl.
  5. Install dclbcbsmp.bpl to install the components.
Note: In order to be able to install this project, go to Component > Install Packages and deselect Embarcadero Sample Controls Design Time Package.

Files

File Contains

ccalendr

The TCCalendar class

cdiroutl

The TCDirectoryOutline class

cgauges

The TCGauge class and other helper classes

cgrid

The TCColorGrid class

cspin

The TCSpinButton and TCSpinEdit classes

perfgrap

The TPerformanceGraph class

pies

The TPie class and TAngle helper class

trayicon

The TCTrayIcon class

piereg

The code for registering the TPie component and its property editor

smpreg

The code for registering the rest of the components

Classes

  • TCCalendar implements a month calendar; it is a version of TCalendar.
  • TCDirectoryOutline implements a directory hierarchy; it is a version of TDirectoryOutline.
  • TBltBitmap is a helper class for TCGauge.
  • TCGauge implements a measurement tool; it is a version of TGauge.
  • TCColorGrid implements a grid that allows the user to select a foreground color and a background color.
  • TCSpinButton implements a spin button; it is a version of TSpinButton.
  • TCSpinEdit implements a spin edit; it is a version of TSpinEdit.
  • TPerformanceGraph implements a performance graph.
  • TAngles is a helper class for TPie.
  • TPie implements a pie component.
  • TCTrayIcon implements a tray icon; it is a version of TTrayIcon.

Uses

See Also

Personal tools
Assistance