Links
EControl Syntax Editor SDK
TComplexRender Class

Special helper class to render formatted list items.

TComplexRender = class;

ecComplRend

This class is used to render formatted items in TAutoCompletePopup component and to render formatted hint text of syntax memo. 

It allows:

  1. Images.
  2. Columns with aligning.
  3. Styles.

 

Text macros which can be used to format items: 

/I#/- image, where # - image index 

/S#/- style changing, where # - style number. Number 0 means no style (i.e. default font is used), number 1 is style with index 0 in Styles collection. Style is applied to all text up to the end of item (line) or to the next entry of /S#/ macro. 

/T/ - columns separators. Specifies column break and alignment in the next column (text after macro). If this macro is at the start of item it specifies only alignment of the first column. 

/T/ - left aligned column 

/TR/- right aligned column 

/TC/- center aligned column 

/X/ - tag defined at runtime using OnGetCustomElem event. 

 

Mapping of items. 

It is possible to order and hide lines (items) using index mapping. 

To manage it use methods: AddIndex, ClearIndex, ReleaseIndex.

Topic 
Description 
The methods of the TComplexRender class are listed here. 
The properties of the TComplexRender class are listed here. 
The events of the TComplexRender class are listed here. 
 
Method 
 
protected 
 
virtual 
 
Property 
 
read only 
 
Event 
TComplexRender Events 
Description 
Occurs when custom tag is detected in formatting string. 
TComplexRender Methods 
Description 
Calls OnGetCustomElem event and adds formatting element to the item. 
Adds item to visible items list. 
Creates or clears index mapping. All items are invisible. Visible items should be added by AddIndex method. 
Creates and initializes a TComplexRender instance. 
Returns number of custom tags /X/ (defined at runtime) in the item string. 
Destroys an instance of TComplexRender. 
Returns height of the item. 
Returns width of visible item. 
Returns item index of visible item with number Index. 
Parses item string and creates corresponding description object. 
Parses all items and updates column widths. 
Removes mapping of items. All items are visible in the original order. 
Calculates width of columns. 
Returns number of visible items. 
TComplexRender Properties 
Description 
Specifies Canvas where items are drawn. 
Specifies additional space between columns. 
Font 
Specifies default font. 
List of mapped indexes. 
Specifies whether items should be parsed to get formatting data. 
Returns Height of all visible items. 
Specifies image list. 
Specifies items. 
Returns maximum height list of visible items. 
Specifies styles collection. 
Returns width of all visible items. 
Specifies whether columns widths should be calculated. 
Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!