Is it possible to measure text after rendering?
I have a StiText component where I hold some persons name plus degree:
e.g.
Franz
BINDER-REISINGER, Dr.
If the degree and/or name gets longer it cannot fit into the StiText component and there´s another linebreak:
Franz
BINDER-REISINGER, Dipl.-
Ing.
But I´d like to have follwing output:
Franz
BINDER-REISINGER,
Dipl.-Ing.
So I need to know length of lastname + ", " + degree to insert another "\n" after lastname if needed.
The StiText component should not grow in width, only in height.
In c# there´s a method called TextRenderer.MeasureText, does Stimulsoft Report offer similar method or is there another solution for my problem ?
:shame:
Measure text
-
- Posts: 43
- Joined: Fri May 25, 2007 2:54 am
- Location: Austria
Measure text
Hello, Christian.
Yes, it is possible in Stimulsoft Reports.Net as well.
In the 2008.1 or earlier versions please use the following static property:
StiReport.MeasureGraphics
in latest prerelease versions:
Stimulsoft.Report.StiReport.GlobalMeasureGraphics.MeasureString()
Thank you.
Yes, it is possible in Stimulsoft Reports.Net as well.
In the 2008.1 or earlier versions please use the following static property:
StiReport.MeasureGraphics
in latest prerelease versions:
Stimulsoft.Report.StiReport.GlobalMeasureGraphics.MeasureString()
Thank you.