I have two textboxes that need to be styled differently I want the first text box to be able to shrink there is less text, but I want the 2nd text box always to be say, .1in from the right border of the 1st box.
Is this possible? Some Conditional Formatting formula?
It looks like the "Anchoring", "CanGrow", "CanShrink" and "Docking" properties may be relevant to your case. However, the CanGrow and CanShrink properties affect the textbox items vertically. As far as I understand, you want to increase/decrease the width of the textbox (horizontally). Is it the case?
Hi, My understanding is that anchoring and docking only work with the parent container. In this case I want to "anchor" or "dock" one textbox to the textbox to its left as the left textbox changes size
You are right. The anchoring and docking work only within the parent container. The CanGrow and CanShrink affect the boxes vertically. However, there is not built-in way to set the width of the textbox to "auto" (at least I've never encountered such). In that case you could consider a workaround.
You could use bindings to set the width dynamically based on the length of the text. E.g.
I believe, there is a reason for not being able to let the width grow/shrink automatically, as this could have severe negative impact on the overall layout when visualizing the report. If the width goes beyond the page size, it will be printed on a separate page, so you should be very careful with setting some upper limits for the width of the boxes.
As for binding the right textbox to the left one - when using bindings, this will make it extremely hard for the rendering engine to calculate the proper position for the second box. If OK, you could use table to handle this scenario.
Attached you can see an example report. It demonstrates the described approach with and without using tables. As you can see, without tables the boxes are overlapping.
Hello,
It looks like the "Anchoring", "CanGrow", "CanShrink" and "Docking" properties may be relevant to your case. However, the CanGrow and CanShrink properties affect the textbox items vertically. As far as I understand, you want to increase/decrease the width of the textbox (horizontally). Is it the case?
Regards,
Krasimir Baylov
My understanding is that anchoring and docking only work with the parent container.
In this case I want to "anchor" or "dock" one textbox to the textbox to its left as the left textbox changes size
Hello,
You are right. The anchoring and docking work only within the parent container. The CanGrow and CanShrink affect the boxes vertically. However, there is not built-in way to set the width of the textbox to "auto" (at least I've never encountered such). In that case you could consider a workaround.
You could use bindings to set the width dynamically based on the length of the text. E.g.
I believe, there is a reason for not being able to let the width grow/shrink automatically, as this could have severe negative impact on the overall layout when visualizing the report. If the width goes beyond the page size, it will be printed on a separate page, so you should be very careful with setting some upper limits for the width of the boxes.
As for binding the right textbox to the left one - when using bindings, this will make it extremely hard for the rendering engine to calculate the proper position for the second box. If OK, you could use table to handle this scenario.
Attached you can see an example report. It demonstrates the described approach with and without using tables. As you can see, without tables the boxes are overlapping.
Regards,
Krasi