Skip to main content

TcxCustomImageProperties.GetGraphicClass(TObject,Integer,Boolean) Method

Determines the graphic class of the image assigned to the image editor which is used as the in-place editor.

Declaration

function GetGraphicClass(AItem: TObject; ARecordIndex: Integer; APastingFromClipboard: Boolean = False): TGraphicClass; virtual;

Parameters

Name Type
AItem TObject
ARecordIndex Integer
APastingFromClipboard Boolean

Returns

Type
TGraphicClass

Remarks

The GetGraphicClass function determines the graphic class of the graphical data assigned to the image editor, which is used as the in-place editor (in a grid control, for example). The ARecordIndex and AItem parameters represent the data record (its index) and the item in this record (a column or row) for which the image editor is displayed, respectively. This lets you set a specific graphic class for each data record and item.

Basically, the GetGraphicClass function returns the Properties.GraphicClass property’s value as the result. When this property is not set, the OnGetGraphicClass event is fired. Its AGraphicClass parameter is pre-initialized using the APastingFromClipboard parameter’s value that indicates the condition which the image is assigned to the editor for and is equal to True when the image is pasted from the clipboard (in this case the graphic class assumed to be a bitmap graphic), and False in all other cases.

Note

The resulting graphic class assigned to the image can be a non-registered graphic class (not a bitmap graphic, metafile graphic, icon or JPEG compressed image data).

See Also