Skip to main content

TcxCustomRichEdit.SelAttributes2 Property

Specifies selected text settings.

Declaration

property SelAttributes2: TcxTextAttributes2 read; write;

Property Value

Type
TcxTextAttributes2

Remarks

If no text is selected, the SelAttributes2 property specifies text settings at the cursor position.

When inserting new text, the new text settings match the SelAttributes2 property.

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