Dear Stimulsoft Team
I am trying to get the actual size of stiText. I initialized the instance of stiText with the height and width of 0.8 and assigned a large text to TextValue then I executed below lines. But still I am getting 0 as width and height.
((StiText)cellComponent).CanGrow = true;
((StiText)cellComponent).CanShrink = true;
((StiText)cellComponent).AutoWidth = true;
var actualSize = ((StiText) cellComponent).GetActualSize();
Could you please help me in getting the actual size of stiText?
Thanks
SHYAM
GetActualSize is returning 0 height and width
-
- Posts: 56
- Joined: Fri Feb 21, 2014 9:26 am
Re: GetActualSize is returning 0 height and width
Hello.
Why do you need to get height of the text component?
Do you use pure Silverlight or Client/Server version?
Could you send us any sample report?
Thank you.
Why do you need to get height of the text component?
Do you use pure Silverlight or Client/Server version?
Could you send us any sample report?
Thank you.
-
- Posts: 56
- Joined: Fri Feb 21, 2014 9:26 am
Re: GetActualSize is returning 0 height and width
Dear Aleksey
I got the solution of my problem.
I am using client/server version.
The very first cell in a row of the report was getting wrapped because of the large text content. I wanted the other cells in the same row to follow the same height as the very first cell's height.
So I wanted to get the height of the first cell so that I can apply that to subsequent cells.
I got the actual height of the first cell by first calling Render and then calling GetActualSize. I wrote this piece of code at server side.
((StiText) cellComponent).Render().GetActualSize();
Thanks for acknowledging my question!
Best Regards
SHYAM
I got the solution of my problem.
I am using client/server version.
The very first cell in a row of the report was getting wrapped because of the large text content. I wanted the other cells in the same row to follow the same height as the very first cell's height.
So I wanted to get the height of the first cell so that I can apply that to subsequent cells.
I got the actual height of the first cell by first calling Render and then calling GetActualSize. I wrote this piece of code at server side.
((StiText) cellComponent).Render().GetActualSize();
Thanks for acknowledging my question!
Best Regards
SHYAM
Re: GetActualSize is returning 0 height and width
Hello.
Why don't you set the Grow to Height property.
Please, read the Binding The Bottom Border Of A Component article.
Thank you.
Why don't you set the Grow to Height property.
Please, read the Binding The Bottom Border Of A Component article.
Thank you.
-
- Posts: 56
- Joined: Fri Feb 21, 2014 9:26 am
Re: GetActualSize is returning 0 height and width
Dear Aleksey,
I replaced my code with the GrowToHeight = true and it worked!
So now I am using GrowToHeight property.
Thanks for your solution and the informative link.
Really Appreciated!
Best Regards
SHYAM
I replaced my code with the GrowToHeight = true and it worked!
So now I am using GrowToHeight property.
Thanks for your solution and the informative link.
Really Appreciated!
Best Regards
SHYAM
Re: GetActualSize is returning 0 height and width
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.