Hi, I am placing bound text box between two labels. How to adjust the width of the text box dynamically based on the length of data in the text box. Can shrink or can grow property is not helpful. Please help. Thanks
On a Form? You can try to use code, but that means you'll also have to adjust the position of all the other controls to avoid overlaps. I suggest that design your Textbox to as wide or tall enough to fit as much data as possible rather than deal with the headache of getting the code right. When the content is too big for the control, you should see a scrollbar.
Okay, on Reports, growing is only vertical, not horizontal. Also, on reports, you're limited to the paper size plus margins. So, using code to widen a Textbox, you'll also need to worry about how far you've gone while also considering the size of all the other controls to the right and make sure they don't drop off. So, again, I suggest just designing the report to have controls to have as wide enough size to contain as much data as possible. You can then use Can Grow to show additional data below the first row of data.