LMD-RichPack 2022 What's New
property Transparent: Boolean; |
Allow to turns on native transparent background mode. This mode does not work well with the border, so, it's a good idea to set BorderStyle to bsNone. |
property SpellChecking: Boolean; |
Provies the ability to check spelling in the edit text. This is native RichEdit feature, so spell checking setting (if any) is provided by Windows. |
procedure InsertTable(ARowCount, ARow); |
Inserts a table into the cursor position consisting of ARowCount identical rows. The structure of rows, including the number of columns, column widths, borders and colors, is specified by the ARow parameter. "TLMDInsertRow "TLMDInsertCell "TLMDInsertCellBorder |
property TextDocument: ITextDocument; |
WinAPI Text Object Model (TOM) interface for advanced use. Provided "as is". Please look for more info in the corresponding Microsoft documentation. |
property TextDocument2: ITextDocument2; |
WinAPI Text Object Model 2 (TOM2) interface for advanced use. Provided "as is". Please look for more info in the corresponding Microsoft documentation. |
TLMDRichEdit.PreviewDialog; TLMDRichEdit.PagePropertiesDialog; TLMDRichEdit.Print; |
The behavior of these printing related methods was changed to use LMD PrintPack functionality. |
TLMDRichEdit.PrinterSetupDialog; |
New method, which allows to show printer setup dialog. As the previous APis also rely on LMD PrintPack functionality. |
property ScrollPosition: TPoint; |
Allows to obtain the current scroll position of the edit control in pixel. |
property ShowURLHint: Boolean; |
When set to True and the cursor is over a link, display a tooltip with the target link address. |
property LinkOptions: TLMDRichLinkOptions; |
Allows to prevent default hyper-text action in case of using the custom OnLinkClick event handler. Enum members: "loGotoBookmark "loGotoItem |
TLMDTextAttributes is used as a type of the following TLMDRichEdit control properties:
"DefAttributes
"SelAttributes
"WordAttributes
property Bold: Boolean; |
The property allows to mark the corresponding text fragment with the bold style. Other srtyle flags, like Italic, Underline or Strikeout are not affected. |
property Italic: Boolean; |
The property allows to mark the corresponding text fragment with the italic style. Other srtyle flags, like Bold, Underline or Strikeout are not affected. |
property Underline: Boolean; |
The property allows to mark the corresponding text fragment with the underline style. Other srtyle flags, like Bold, Italic or Strikeout are not affected. |
property Strikeout: Boolean; |
The property allows to mark the corresponding text fragment with the strikeout style. Other srtyle flags, like Bold, Italic or Underline are not affected. |
TLMDParaAttributes is used as a type of the TLMDRichEdit.Paragraph property.
property ConsistentAttributes: TLMDConsistentParaAttributes; |
Indicates which of the corresponding properties of the TLMDParaAttributes object are consistent throughout the text of the current paragraph in the rich edit object. The enumeration provides the following values: "cpaAlignment "cpaNumbering "cpaFirstIndent "cpaLeftIndent "cpaRightIndent "cpaTabStops |
TLMDInsertRow record type is used as the ARow parameter in TLMDRichEdit.InsertTable method to specify inserting table row structure. The following code gives an idea of how to use the TLMDInsertRow type:
procedure TForm1.Button1Click(Sender: TObject);
var
rw: TLMDInsertRow;
begin
rw.Alignment := raCenter;
rw.Height := 500;
rw.AddCell(1500, caTop);
rw.AddCell;
rw.AddCell;
LMDRichEdit1.InsertTable(5, rw);
end;
Note: Microsoft does not provide the documentation of the corresponding WinAPI data structs. So, the following descriptions is taken from the RTF format syntax description.
procedure Reset; |
Clears all property settings and cells. |
procedure ClearCells; |
Clear cells. |
function AddCell: TLMDInsertCel; function AddCell(AWidth: Integer; AAlignment: TLMDCellAlignment): TLMDInsertCell; |
Adds a new cell. The cell is added to the end of the Cells list. The second method overload allows to specify new cell width and alignment via the corresponding method parameters. |
property Indent: Integer; |
Position of the leftmost edge of the table with respect to the left edge of its column. |
property Height: Integer; |
Height of a table row in twips. When 0, the height is sufficient for all the text in the line; when positive, the height is guaranteed to be at least the specified height; when negative, the absolute value of the height is used, regardless of the height of the text in the line. |
property Alignment: TLMDRowAlignment; |
Row alignment: "raLeft: Left-justifies a table row with respect to its containing document. "raRight: Right-justifies a table row with respect to its containing document. "raCenter: Centers a table row with respect to its containing document. |
property KeepTogether: Boolean; |
Table row keep together. This row cannot be split by a page break. This property is assumed to be off unless the control word is present. |
property KeepOnTheSamePage: Boolean; |
Keep row on same page as following row. |
property WrapText: Boolean; |
Wrap text to right/left (depending on Alignment). |
property CellsMargin: Integer; |
Half the space between the cells of a table row in twips. |
property CellsRTLOrder: Boolean; |
Cells in this table row will have right-to-left precedence. |
property CellCount: Integer; |
Count of cells in this row descriptor. Cells can be added using Add methods diocumented above. |
property Cells[Index]: TLMDInsertCell; |
The Cells property provides access to individual cells, added previously using Add method. |
TLMDInsertCell class is used to describe a cell (or column) in a TLMDInsertRow row descriptor. Cells can be added using TLMDInsertRow.Add overloaded methods, and enumerated using the corresponding CellCount and Cells[] properties.
Note: Microsoft does not provide the documentation of the corresponding WinAPI data structs. So, the following descriptions is taken from the RTF format syntax description.
property Width: Integer; |
Defines the right boundary of a table cell, including its half of the space between cells. |
property Alignment: TLMDCellAlignment; |
Vertical alignment of the cell text: "caTop: Text is top-aligned in cell (the default). "caBottom: Text is bottom-aligned in cell. "caCenter: Text is centered vertically in cell. |
property FirstVertMergeCell: Boolean; |
Top cell for vertical merge. |
property FirstHorzMergeCell: Boolean; |
Merge with cell above. |
property MergeVertWithAbove: Boolean; |
Start set of horizontally merged cells. |
property MergeHorzWithAbove: Boolean; |
Merge with the previous cell. |
property RTLText: Boolean; |
Display text top to bottom, right to left. |
property Shading: Word; |
The shading of a table cell in hundredths of a percent. This control should be included in RTF along with cell border information. |
property Border: TLMDInsertCellBorder; |
Provides cell border subproperties: "Left: Left cell border thickness. "Top: Top cell border thickness. "Right: Right cell border thickness. "Bottom: Bottom cell border thickness. "LeftColor: Left table cell border color. "TopColor: Top table cell border color. "RightColor: Right cell border color. "BottomColor: Bottom cell border color. |
property BackgroundColor: TColor; |
Cell background color. |
property ForegroundColor: TColor ; |
Cell foreground (text) color. |
LMDRichGetPrinter(AEdit); LMDRichGetPrinter(ACombo); |
Provide access to the TLMDPrinter object, used by the corresponding rich edit or rich combo box. If the custom callback function is not specified via LMDGetPrinterProc global variable, automatically created single global printer object is used. |
var LMDGetPrinterProc: TLMDGetPrinterProc; |
Provides the ability to specify custom callback function to determine the TLMDPrinter object, which should be used for rich edit or rich combo box instead of the default single printer object. |
Following is an example of providing a custom printer object using LMDGetPrinterProc callback. The example callback function returns the custom printer component LMDPrinter1, placed on the Form1 at design-time:
procedure TForm1.FormCreate(Sender: TObject);
begin
LMDGetPrinterProc := function(AEditOrCombo: TControl): TLMDPrinter
begin
Result := LMDPrinter1;
end;
end;