3 Textboxes next to each other, make 2nd one grow when 3rd is hidden

Stimulsoft Reports.NET discussion
Post Reply
ophidia
Posts: 4
Joined: Tue Apr 27, 2021 1:17 pm

3 Textboxes next to each other, make 2nd one grow when 3rd is hidden

Post by ophidia »

I have a Databand containing 3 Texts. If a certain variable is set to false, the 3rd Textbox is disabled (via condition). In that case, the 2nd box should increase in size so that it fills the space where text3 usually is.

Image

Is that in any way possible? I tried setting AutoWidth to true, but that makes it grow even when text3 isnt hidden.

So, can I somehow achieve this?
Lech Kulikowski
Posts: 7511
Joined: Tue Mar 20, 2018 5:34 am

Re: 3 Textboxes next to each other, make 2nd one grow when 3rd is hidden

Post by Lech Kulikowski »

Hello,

You can set the Width of the Text component from code.

Thank you.
Attachments
Screenshot 2025-11-05 222155.png
Screenshot 2025-11-05 222155.png (102.71 KiB) Viewed 616 times
ReportWidth.mrt
(16.12 KiB) Downloaded 11 times
nancyfett
Posts: 5
Joined: Tue Aug 26, 2025 10:30 am

Re: 3 Textboxes next to each other, make 2nd one grow when 3rd is hidden

Post by nancyfett »

Lech Kulikowski wrote: Wed Nov 05, 2025 9:22 pm Hello,

You can set the Width of the Text component from code.

Thank you.
That worked perfectly, thanks for the quick response and the code example!

Tunnel Rush Game
Lech Kulikowski
Posts: 7511
Joined: Tue Mar 20, 2018 5:34 am

Re: 3 Textboxes next to each other, make 2nd one grow when 3rd is hidden

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply