Text components grow to height

Stimulsoft Reports.WPF discussion
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Text components grow to height

Post by Niqu »

I add sample report to show what I want to achieve and where is the problem.

I have three Text components on panel. I have a lot of this panels (with 3 Text component each) - in sample report I put only 3 panels.
I want all Text components in one row to have the same height.
To test my idea I was changing Font Size, to have different component height. And... it sometimes work, sometimes not and I have no idea why. Maybe I am doing something wrong, but I do not know when exactly is calculated component height.

Thank you in advance for your help.
Attachments
Report.mrt
(19.13 KiB) Downloaded 448 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Text components grow to height

Post by HighAley »

Hello.

It's better to change Panel placement and set the Grow to Height property of the text components.
Please, look at the attached report template. Each Panel has own color.
Report.mrt
(31.07 KiB) Downloaded 502 times
Thank you.
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Text components grow to height

Post by Niqu »

Oh... if each Text component from one row is on one panel it is easy :)
Problem is, that I have components like in my example - a lot of panels with 3 Text componens on each.
Is there opportunity to achieve what I want?

I thought that my idea from example should work, but it do not and I have no idea why.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Text components grow to height

Post by HighAley »

Hello.

Please, look at the attached report template. You could see our code in the next events:
  • After Print event of the Panels
  • Before Print event of the Text components
  • Get Tag event of the Text components
Thank you.
Attachments
Report.mrt
(21.67 KiB) Downloaded 521 times
Niqu
Posts: 81
Joined: Wed Aug 08, 2012 9:08 am

Re: Text components grow to height

Post by Niqu »

Seems working. Thank you for help.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Text components grow to height

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Alex74
Posts: 12
Joined: Mon Mar 04, 2019 11:18 pm

Re: Text components grow to height

Post by Alex74 »

Hello!
We have hundrets of cells as text fields (without panels at all), grouped in rows and bands.
Your suggested solution for a small example works, but it is not acceptable for a huge amout of text fields.
All cells in the same row in designer are at the same Y-Position and have the same height.
It would be nice to have a simple property like GrowToHeightAsMaxInSameRow vs. ShrinkToHeightAsMinInSameRow vs. something combined.
Is it possible?
Thank you very much.
Alex74
Posts: 12
Joined: Mon Mar 04, 2019 11:18 pm

Re: Text components grow to height

Post by Alex74 »

Hello!
Your solution works with a small reports. As we have hundrets of text fields (without panels) grouped in rows the grouped in data bands, it is lot of code work and much less acceptable.
In our situation each cell in a row is at the same top position and has same height. The next row top position is close to bottop of upper row.
So it would be nice to have a property like GrowToHeightAsMaxInSameRow vs. ShrinkToHeightAsMinInSameRow or something like that combined.
Is it possible?
Thank you very much.
Lech Kulikowski
Posts: 6259
Joined: Tue Mar 20, 2018 5:34 am

Re: Text components grow to height

Post by Lech Kulikowski »

Hello,

> So it would be nice to have a property like GrowToHeightAsMaxInSameRow vs. ShrinkToHeightAsMinInSameRow or something like that combined. Is it possible?

Unfortunately, it is not possible.

Thank you.
Alex74
Posts: 12
Joined: Mon Mar 04, 2019 11:18 pm

Re: Text components grow to height

Post by Alex74 »

Ok, but how to do this with a huge amount of text fields?
Without grow/shrink to the same heigt it would look very ugly.
The acceptable solution would be codes, that each databand call bevore beginn to store cell collection per row and per column, than on first in order to save calculated heights and second pass in order to rearrange cells per row.
I think, with your knowledge it will be possible 😁
Or am I wrong with this conclusion?

Many thanks.
Post Reply