Skip to main content

TcxCustomRichEdit.DefAttributes Property

Describes the rich text characteristics of the default font for the rich edit control.

Declaration

property DefAttributes: TTextAttributes read; write;

Property Value

Type
TTextAttributes

Remarks

Use the DefAttributes property to retrieve or set the default font characteristics that the rich edit control uses for newly inserted text. These are the text’s characteristics before any special attributes have been applied. Once any special attributes are applied to a portion of text, no text from that point on is considered to have the default attributes, even if the attributes match the DefAttributes property’s values.

For example, if a rich edit control has had no attributes applied, the entire text has the default attributes. Selecting a portion of text in the middle and applying a specific attribute (such as a font change) results in three sections: a first section with the default attributes, a middle section with the applied attribute, and a final section with a non-default set of attributes that match the default attributes. Changing the DefAttributes property affects only the first section.

When inserting new text, the font characteristics of the new text will match the font characteristics at the cursor’s position, or, if the typed text replaces a selection, the font characteristics of the selected text. New text will only have the default attributes when typed into the section of text that has the default attributes.

Note

The DefAttributes property’s values are available only at run time.

See Also