Configure a TextBox to Fill a Container

Posted by: bhasden on 6 April 2018, 4:42 pm EST

    • Post Options:
    • Link

    Posted 6 April 2018, 4:42 pm EST

    Is there any way to set a

    TextBox
    object to fill the entire space of a
    Container
    object within a ```

    PageReport

  • Posted 6 April 2018, 4:43 pm EST

    My apologies for the formatting. I didn’t realize the code formatting would force a new line and there’s no link to edit or remove a post.

  • Posted 9 April 2018, 4:46 am EST

    If you set the size of the TextBox equivalent to the Container, it will fill the entire container. However, if the text is not much so as to fill the entire area, it’ll be displayed only in the space that it requires. The rest of the TextBox would be empty. If I have misunderstood your requirement, kindly explain in detail.

  • Posted 9 April 2018, 10:24 am EST - Updated 30 September 2022, 6:16 pm EST

    Abdias,

    Thanks for your response. The issue I’m having is that I have a container within a table cell, so it doesn’t have a size since it automatically fills the available area. When I then put a textbox inside of the container which is inside of a table cell, I need that textbox to fill the entire container area.

    Hope that clears things up.

    Thanks,

    Brian

  • Posted 10 April 2018, 2:36 am EST

    Hi Brian,

    Even if the container is inside a TableCell, the Text will appear only in the space that it requires. Can you attach your report file and a screen shot of what you’re trying to achieve?

    Thanks

  • Posted 17 April 2018, 5:22 pm EST

    Abdias,

    We’re programmatically creating the report file (Page Report), so I don’t have anything readily available to send you. We’ve created a hack to work around the problem, but I’ll elaborate a little more so that you’re aware of the issue.

    Within the report designer, if you add a Container to a table cell the Size property goes away because the Container fills up the entire space for the cell. If you then add a TextBox into the Container, you have to manually size the TextBox because there’s no “Fill” or “Dock” behavior available. As a result, when the table is resized someone has to go into every Container object within a cell and manually resize the TextBox.

    Specifically for the scenario that we’re running into, we’re programmatically creating our report definition and the tables within. Ideally we’d be able to adjust the column widths of the table without having to loop through all of the cells in the table and determine whether the cell has a Container object and then looping through the objects within the Container to check if it has a TextBox that needs to be resized.

    Hope this clarifies the issue we’re running into. I’m happy to answer more questions if you have them. I’ll also try to find time to create a small example of the problem, but that’s not likely to happen given some of the deadlines we’re trying to meet. For now, we have a hack that allows us to get past the issue.

    Regards,

    Brian

  • Posted 19 April 2018, 5:06 am EST

    Hi Brian

    Thanks for the detailed explanation of your issue. However, what I’d like to understand is the reason behind using a Container inside a Table cell. Is there a particular requirement for which you need to have the Container inside a Table cell?

    Thanks

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels