TcxEditRepositoryBlobItem Class
A repository item that stores BLOB (Binary Large Object) editor settings.
Declaration
TcxEditRepositoryBlobItem = class(
TcxEditRepositoryItem
)
Remarks
A BLOB (Binary Large Object) editor can display an image or text in a drop-down window.
The TcxEditRepositoryBlobItem
class overrides the Properties property that allows you to access and customize BLOB editor settings.
Edit Repository Items and Standalone Editors
Edit repository items are useful when you need to share the same settings between multiple editors of the same type. To accomplish this goal, you can assign the same edit repository item to RepositoryItem properties of all target editors.
Edit Repository Items and Container Controls
A container control item (such as a toolbar edit item or a column (or any other data item) in a Data Grid, Vertical Grid, or Tree List control) can embed an in-place editor shipped with the ExpressEditors Library. An in-place editor exists (and, therefore, has its own WinAPI handle) only when the target container control item is being edited. Otherwise, the container control item displays a static editor image for resource usage optimization.
Create a BLOB Editor Repository Item at Design Time
To create a BLOB editor repository item at design time, double-click an edit repository component to invoke its collection editor.
The collection editor dialog allows you to manage repository items. Click the Add… button to invoke a repository item creation dialog.
Select the BlobEdit item and click the Ok button to create a barcode repository item.
Create a BLOB Editor Repository Item in Code
The following code example creates a BLOB editor repository item, customizes editor settings, and assigns the created repository item to two existing unbound blob editors:
uses cxEdit, cxEditRepositoryItems;
// ...
var
ABlobEditorRepositoryItem: TcxEditRepositoryBlobItem;
ARepositoryItem: TcxEditRepositoryItem;
begin
ARepositoryItem := cxEditRepository1.CreateItem(TcxEditRepositoryBlobItem);
ABlobEditorRepositoryItem := ARepositoryItem as TcxEditRepositoryBlobItem;
ABlobEditorRepositoryItem.Properties.BlobEditKind := bekMemo; // Enables the Memo mode
ABlobEditorRepositoryItem.Properties.BlobPaintStyle := bpsText; // Displays text when the editor is closed
ABlobEditorRepositoryItem.Properties.MemoMaxLength := 1000; // Limits the maximum text length
ABlobEditorRepositoryItem.Properties.MemoScrollBars := ssVertical; // Displays a vertical scrollbar
// Assigns the created repository item to two existing unbound blob editors
cxBlobEdit1.RepositoryItem := ABlobEditorRepositoryItem;
cxBlobEdit2.RepositoryItem := ABlobEditorRepositoryItem;
end;
BLOB Editor Repository Item Deletion
To delete all BLOB editor repository items in a TcxEditRepository component, call its RemoveItems procedure and pass a reference to the TcxEditRepositoryBlobItem
class as a parameter.
If you need to delete an individual BLOB editor repository item, release it directly in code (call the Free procedure in Delphi or use the delete
keyword in C++Builder).