Skip to main content

TcxCustomRichEdit.DefAttributes2 Property

Specifies default text settings.

Declaration

property DefAttributes2: TcxTextAttributes2 read; write;

Property Value

Type
TcxTextAttributes2

Remarks

Specified settings are applied to the new input, or to the text sections with the default settings.

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 DefAttributes2 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 DefAttributes2 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 DefAttributes2 property’s values are available only at run time.

See Also