Topic: Justify text alignment in memo field
Has anyone created a script to justify text in a memo field?
My Visual Database → General → Justify text alignment in memo field
Has anyone created a script to justify text in a memo field?
Hi Roberto,
Not sure how you could do this; as I understand it, TMemo only supports left-hand justification.
Derek.
Hi Derek, Roberto
Roberto ,
Memo supports left, center and right alignment. Unfortunately, it doesn't support justified text alignment.
Memo displays information as plain text, and the only way to do this is by adding extra spaces between words,
and it's only for viewing. Character widths vary across fonts. We'll need to calculate word widths, etc. Maybe I'll give it a try.
For now, I've tried this:
To view notes, you can try using RichEdit, as in the example below. It uses justified text alignment. You can change the font and its size.
It's just a window similar to Memo. The downside is that RichEdit requires manual output processing
(for example: Form1.RichEdit.Text := SQLExecute (' SELECT text FROM ....' ). Accordingly, saving text from RichEdit also requires
manual processing.
Whether the game is worth the effort is up to you.
Hi Derek, Roberto
Roberto ,
Memo supports left, center and right alignment. Unfortunately, it doesn't support justified text alignment.
Memo displays information as plain text, and the only way to do this is by adding extra spaces between words,
and it's only for viewing. Character widths vary across fonts. We'll need to calculate word widths, etc. Maybe I'll give it a try.
For now, I've tried this:
To view notes, you can try using RichEdit, as in the example below. It uses justified text alignment. You can change the font and its size.
It's just a window similar to Memo. The downside is that RichEdit requires manual output processing
(for example: Form1.RichEdit.Text := SQLExecute (' SELECT text FROM ....' ). Accordingly, saving text from RichEdit also requires
manual processing.
Whether the game is worth the effort is up to you.
Hi Sparrow and Derek! I was familiar with justified alignment in RTF. I saw that in MEMO this is complicated, because RTF aligns by increasing the space size...but thank you both for your intention.
--- >
My Visual Database → General → Justify text alignment in memo field
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi