Measure text
Posted: Thu Aug 28, 2008 9:00 am
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:
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: