TDBAdvMemo Font and Size

My TDBAdvMemo field do only show systemfonts if Font.size > 8.
If i set Font.size to 8 all Font.Name can be used but the Cursor in the MemoField to edit the Text has a size of 10. So you can not position the cursor in the memo Text correct.
What to do, to use Font.Name like "Times New Roman" in a Memofield.

I cannot see an issue with font name selection when font size is 8.
memofont

Also, it is a requirement in T(DB)AdvMemo to use a monospaced font (like most syntax highlighting editors do).
Times New Roman is not a monospaced font.

I have to use 8pt Size to set a non monospaced Font.
But the problem is that you cant position the cursor in such a memo because the positioning of the Cursor is monospaced and you cant position to the char you want to edit.
As I thought, a TAdvMemobox is not well suited for writing in proportional font.
What other component could be used for this that is also a DB component?

TDBAdvRichEditor

I changed the TDBAdvMemo to TDBAdvRichEditor and got some errors that i dont understand why?

In this Line:
DataGridToPDF.Options.PageSize := psA4;
i got the error incompatible types TTMSFNCPDFLibPageSize and TPageSize

if i comment this line out i got a StreamError. Ungültiges Stream-Format.
procedure TReader.ReadSignature;
var
Signature: UInt32;
begin
Read(Signature, SizeOf(Signature));
if Signature <> FilerSignature then
ReadError(@SInvalidImage);
end;

I cant see what this has todo with the TDBAdvRichEditor

Prefix psA4 with its applicable namespace, i.e. AdvPDFLib.psA4

I use a TTMSFNCDataGridPDFIO and want to set this Options PageOrientation and PageSize.
Cannot find a syntax that is working.
So i set it in the Property of the Component.

For the TDBAdvRichEditor i set the Datasource and DataField but only get the Error "Ungültiges Stream-Format".
Any Idea where to look for?

If i do not set the datasource there is no Stream-Format error.
I am using a MS-Access Database with a Field Type Langer Text.

  1. Do you use the correct unit namespace prefix for the option you want to set?
  2. Do you use a binary blob to save the TDBAdvRichEditor content? (see the demo for an example)
  1. I try
    DataGridToPDF.Options.PageOrientation := TTMSFNCDataGridPDFIOOptions.PageOrientation(1);

and

DataGridToPDF.Options.PageSize := TTMSFNCDataGridPDFIO.Options.psA4;

This Synthax do not work after i insert the TDBAdvRichEditor.

  1. I cannot use the the TDBAdvRichEditor because in the Database there is only a TextBlob no BinaryBlob.
    What else can i use that use a TextBlob like the TMemo Component.
    A very simple Editor Component with not Monospace Font.

Use the following code

uses
  FMX.TMSFNCPDFLib;

procedure TForm1.FormCreate(Sender: TObject);
begin
  TMSFNCDataGridPDFIO1.Options.PageOrientation := TTMSFNCPDFLibPageOrientation.poPortrait;
  TMSFNCDataGridPDFIO1.Options.PageSize := TTMSFNCPDFLibPageSize.psA4;
end;

This work with
uses
VCL.TMSFNCPDFLib;

Thanks Pieter

1 Like