|
TCustomRichViewEdit.GetCurrentBreakInfo |
Top Previous Next |
|
Returns main properties for the item of break type at the position of caret. procedure GetCurrentBreakInfo(var AWidth: Byte; var AStyle: TRVBreakStyle; var AColor: TColor; var ATag: Integer); GetCurrentBreakInfo(...) is equivalent to TopLevelEditor.GetBreakInfo(TopLevelEditor.CurItemNo, ...). The item must be of break type (rvsBreak), otherwise the method raises ERichViewError exception. Type of item at the position of caret is returned by CurItemStyle. Output parameters: AWidth – line width (or rectangle height). AStyle – visual style of this break, see TRVBreakStyle for possible values. AColor – line color. If it is equal to clNone, Style.TextStyles[0].Color is used. ATag – tag of the item.If tags are pointers to dynamically allocated strings (rvoTagsArePChars in Options), this procedure returns a pointer to this string (you can convert the returned ATag to PChar), not to the copy of it, so you should not free it. Use SetCurrentTag or SetCurrentBreakInfo to change tag of item as an editing operation. This value can also be read using GetCurrentTag method.
This method must be called only when the document is formatted. Additional properties of item at the position of caret are returned by the methods GetCurrentItemExtraIntProperty and GetCurrentItemExtraStrProperty. See also methods:
See also properties: See also:
|