Skip to main content

TdxDBBarCode Class

A data-aware barcode control.

Declaration

TdxDBBarCode = class(
    TdxCustomBarCode
)

Remarks

A barcode control is a non-interactive UI element designed to display a barcode or QR code from a source text string according to the selected barcode type and its settings.

VCL Editors: Bar Code Control Examples

Supported Barcode Types

To switch between 13 supported barcode types, use the Properties.BarCodeSymbologyClass property. To configure settings available for the selected barcode type, use the Properties.Symbology property.

UI Automation/Accessibility Support

The barcode control is mapped to a node in the UI Automation tree when the global UI Automation flag (dxUIAutomationEnabled) is enabled.

UI Automation Settings

The barcode control uses the Text property value as the default name of the corresponding UIA node.

Use Automation.Name and Automation.Description properties to explicitly specify the barcode name and to add optional information that are then used to clarify UI element purpose for users who rely on third-party assistive tools (such as Microsoft Narrator).

Refer to the TdxAutomationElementSettings class description for detailed information on all available options.

Main API Members

The list below outlines key members of the TdxBarCode class.

Appearance Settings

Style | StyleDisabled | StyleFocused | StyleHot | StyleReadOnly

Allow you to define individual appearance settings for different editor states.

Tip

To apply the same style settings to multiple editors, use a TcxEditStyleController component. If you need to apply the same style settings to all editors in your application, you can use a TcxDefaultEditStyleController component.

Styles
Provides access to individual styles applied to the editor in different states.
CopyToClipboard
Copies the generated barcode to the clipboard.
DataBinding
Allows you to bind the barcode control to data.

Editor Settings and Repository Items

ActiveProperties
Provides access to the current editor settings regardless of their source. This property set does not allow you to customize editor settings.
Properties
Allows you to customize editor settings directly if the editor does not have an assigned repository item.
RepositoryItem
Specifies a repository item as an external source of editor settings. A repository item has priority over other editor settings.

General-Purpose API Members

AutoSize
Specifies if the editor automatically adjusts its size to fit content.
Enabled
Specifies if the editor is enabled.
CanModify
Indicates if the editor is in read-only mode.
IsEditValidating | IsHiding | IsPosting
Allow you to identify the current operation in the editor.
ShowHint
Specifies if the standalone editor can display hints.
Width | Height
Allow you to explicitly define editor dimensions.

Repository Item Class

You can create a TcxEditRepositoryBarCodeItem component in an edit repository to store barcode settings, and share them between multiple barcode controls.

To see the TdxDBBarCode control in action, run the Data Editors and Controls demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Click the Barcode Control item in the sidebar to run the corresponding demo.

Download: Compiled VCL Demos

Compiled DevExpress demos ship with source code installed in the Public Documents folder (%PUBLIC%) for all users (default). You can find all project and source code files for the Data Editors and Controls demo in the following folder:

%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressEditors\

Tip

Project and source code files for all compiled DevExpress VCL Demos are maintained in a public repository hosted on GitHub:

View Example: DevExpress VCL Demos

Limitations and Considerations

The TdxDBBarCode component is available only as a standalone editor. You cannot use data-aware editors as in-place editors in container controls (Data Grid, Tree List, etc.).

See Also