JVCL Help:TJvCustomRichEdit.SelAttributes

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Describes the rich text characteristics of the selected text in the rich edit control.


Pascal

 propertySelAttributes: TJvTextAttributes;


Description

Use SelAttributes to discover or set the font characteristics of the currently selected text. If no text is selected, SelAttributes represents the attributes of the cursor position.
When inserting new text, the font characteristics of the new text will match SelAttributes.
SelAttributes is a TJvTextAttributes object, that works the same as the VCL's TTextAttributes object, and introduces some more properties. See TJvTextAttributes for an overview of these new properties.


See Also

TJvCustomRichEdit.DefAttributes, TJvCustomRichEdit.WordAttributes, TJvTextAttributes


About

Notes

SelAttributes is available only at runtime.
Example: function TForm1.CurrText: TJvTextAttributes;
begin

 if JvRichEdit1.SelLength > 0 then
Result := JvRichEdit1.SelAttributes
else
Result := JvRichEdit1.WordAttributes;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin

 CurrText.Style := CurrText.Style + [fsBold];
end;


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page