|
TCustomRichView.AddFmt |
Top Previous Next |
|
Adds a formatted string assembled from a Pascal format string and an array arguments, using the StyleNo-th text style and the ParaNo-th paragraph style to the end of document. procedure AddFmt(const FormatStr: String; const Args: array of const; StyleNo, ParaNo: Integer); AddFmt(FormatStr, Args, StyleNo, ParaNo) is equivalent to AddNL(Format(FormatStr,Args), StyleNo, ParaNo).
Note: TRichView allows empty text strings only in empty paragraphs (may be with list makers). See Valid documents.
Parameters: FormatStr – format string. See "Format function" in the Delphi help file for syntax. FormatStr must not contain CR, LF and TAB characters. To add several lines of text use AddTextNL. Args – arguments for format string. StyleNo is an index in the TextStyles collection of the linked RVStyle component, or rvsDefStyle constant. It defines font attributes for the text. If ParaNo=-1, the methods add the item to the end of the last paragraph. If ParaNo>=0, this item starts a new paragraph with the ParaNo-th style. (ParaNo is an index in the ParaStyles collection of the linked RVStyle component). It defines attributes for the new paragraph.
Method type:
Example: MyRichView.AddFmt('X=%d and Y=%d', [X,Y], 0, 0); See also methods:
See also properties of TRVStyle: See also: |