LMD-RichPack 2022 What's New
In 2022 release, LMD RichPack has been updated to use RichEdit 4.1 (msftedit.dll), which is now a standard RichEdit version shippied with the OS starting from Windows XP. The minimal supported OS version for LMD VCL products is also Windows 7. New properties has been added:
"TextAttributes properties: Bold, Italic, Undeline, Strikeout.
"ParaAttributes properties: ConsistentAttributes. New RichEdit properties: ScrollPosition, ShowURLHint.
"TLMDRichEdit now support native rich edit's transparency via new Transparent property.
"New shortcuts like Ctrl+B, Ctrl+I, Ctrl+U, Ctrl+M and Ctrl+Shift+M has been added to TLMDRichEdit component for convenience and will work out of the box without any code.
"As well the access to the native rich edit spell checking has been provided via new SpellChecking property.
"TextDocument and TextDocument2 properties has been provided to provide access to TOM2 (Text Object Model) interfaces for advanced use cases.
"Font icons option has been added for toolbar generation wizard.
There no full tables support in TOM2 interfaces in RichEdit 4.1. So, we added a simple possibility to insert tables, which works like the following:
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;
Ruler drawing was improved. The ruller now looks somewhat similar to Win10 WordPad ruler:
TLMDRichEdit control component editor provides the ability to generate a toolbar at design-time. Right click the rich edit control and choose "Generate toolbar" context menu item.
Starting from 2022 release the font based icons, which provides modern look, can be used.
Font icons are high DPI friendly and can be easily recolored. As well the generated image list can be copy-pasted, recolored to appropriate neutral color and used as a DisabledImages in the toolbar.
TOM2 interfaces has been added to LMDRTFInt.pas unit. Interfaces are exposed "as is" via TextDocument and TextDocument2 properties, and provides fine grained control and advenced features for power users. TOM2 demo is provided among other new demos and highlights some TOM and TOM2 use cases:
var
doc: ITextDocument2;
rng: ITextRange2;
begin
doc := GetDocument;
doc.New;
doc.Freeze;
rng := EntireRange(doc);
rng.Font2.Size := 14;
rng.Text := 'Lorem ipsum';
doc.Unfreeze;
end;
A lot of new demos has been implemented in our new Demo Center which shows various LMD RichPack features: