AutoSize and Font changes
I am using D4 and RB5. I have a printout that allows the user to change the
font and width of a list of text items.
If I set AutoSize to True the height of the item adjusts to show a larger
font, but the width goes past the user set width on long text strings and
overlaps onto other text.
If I set AutoSize to False the width of the text is cut off where it should,
but the bottom of the text is clipped on larger fonts.
Any ideas? I guess what I need is AutoHeight on and AutoWidth off.
Thanks in advance for any ideas. A memo field won't work as I need to
variably space each item in the list.
Mark Warren
markwarren@charter.net
font and width of a list of text items.
If I set AutoSize to True the height of the item adjusts to show a larger
font, but the width goes past the user set width on long text strings and
overlaps onto other text.
If I set AutoSize to False the width of the text is cut off where it should,
but the bottom of the text is clipped on larger fonts.
Any ideas? I guess what I need is AutoHeight on and AutoWidth off.
Thanks in advance for any ideas. A memo field won't work as I need to
variably space each item in the list.
Mark Warren
markwarren@charter.net
This discussion has been closed.
Comments
get autoheight in the BeforePrint event of the detailband.
liTextHeight := ppReport1.Printer.Canvas.TextHeight(lsText);
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
can look at it.
Cheers,
Jim Bennett
Digital Metaphors
---
Jim,
Thanks for the idea, but it doesn't seem to solve the problem. I probably
should add that along with the list of items there are other items on the
print out that have different fonts. I have attached a small graphic file
showing the behavior with and without AutoSize on so you can see the context
in which I am trying to work this out. I hope attaching an image isn't a
no-no. If it is please let me know.
Thanks,
Mark Warren
low Profile Software
http://www.digital-metaphors.com
info@digital-metaphors.com
way it can accomodate the larger font if it is set.
You may have not thought about this, but here is an auto-font-sizing demo,
where all of the text prints within a certain text width (autosize = false),
by resizing the font size so that all of the text fits and stops resizing at
the minimum readable font size.
http://www.digital-metaphors.com/tips/AutoFontSize.zip
You could do something similar to change the height of the text, in effect
to have an auto-height-sizing effect.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com