1
I’m creating a report in Delphi using the QuickReport
.
In the Database I write a formatted text (this eh, with justified parts, others aligned to the left other centralized).
To justify the text in TDBrichedt
I used the following code:
procedure TfrmAnotacoes.FormShow(Sender: TObject);
begin
inherited;
SendMessage(edtAnot.handle,
EM_SETTYPOGRAPHYOPTIONS,
TO_ADVANCEDTYPOGRAPHY,
TO_ADVANCEDTYPOGRAPHY)
end;
procedure TfrmAnotacoes.JustifyRichEdit(RichEdit :TCustomRichEdit; AllText :Boolean);
var
ParaFormat :TParaFormat;
SelStart,
SelLength :Integer;
begin
ParaFormat.cbSize := SizeOf(ParaFormat);
SelStart := RichEdit.SelStart;
SelLength := RichEdit.SelLength;
if AllText then
RichEdit.SelectAll;
ParaFormat.dwMask := PFM_ALIGNMENT;
ParaFormat.wAlignment := PFA_JUSTIFY;
SendMessage(RichEdit.handle, EM_SETPARAFORMAT, 0, LongInt(@ParaFormat));
// Restaura seleção caso tenhamos mudado para All
RichEdit.SelStart := SelStart;
RichEdit.SelLength := SelLength;
end;
I would like to justify the text in QRDBRichText
as it comes from the bank, but I’m not getting!
the rich and dbrich are ok, the bad eh that the quickreport is used in a report generator here from the company, so it is not so easy to abandon it
– HagaHood
did not understand. vc meant "There are good tools nowadays easy to use as "nothing"? is it? = P
– HagaHood
The friend sorry me, is who cut when I sent the reply from the text editor! , I will edit and add!
– Junior Moreira