Unfortunately, not all types of controls can be displayed in TSRichViewEdit.
TRichViewEdit handles children controls like any other Delphi component.
TSRichViewEdit displays scaled images of controls instead.
I highly recommend using SRVControls:
https://www.trichview.com/help-scaleric ... ntrols.htm
They are on "ScaleRichView" page of the component palette.
They can be inserted both in TRichViewEdit, TSRichViewEdit, and on a form.
Also, make sure that you use a True Type font (raster fonts like "MS Sans Serif", "Courier", "System" cannot be scaled properly)
Specifically, use TSRVLabel instead of TLabel
(this control has a small flaw, Autosize works only if Parent assigned, so insertion code is like this:
Code: Select all
var
lbl: TSRVLabel;
begin
lbl := TSRVLabel.Create(nil);
lbl.Visible := False; // we be changed to True automatically
lbl.Parent := Self;
lbl.Caption := 'Hello!';
lbl.ForegroundColor := clWindowText;
lbl.Offset := 0;
SRV.ActiveEditor.InsertControl( '', lbl, rvvaBaseline);
end;