Determining the "Top" position of a textbox control dynamically RRS feed

  • Question

  • Hi,
    I am creating an rdlc on - the fly. I am stucked up at a stage, wherein I am not able to find a WAY OUT and hence your assistance might help me.

    While creating an .rdlc file on - the fly, I am using a List which contains some textbox(es) and a SubReport. Each of these textbox(es) contain one or the other field values as its respective value. Apart from that, each of the textbox(es) have the "CanGrow" property / element set to True.

    The issue is that I have two fields (Remarks and Address) (2nd last and last field respectively) which have multiple lines of values. At the time of printing, both the values are printed in the textbox with the "CanGrow" feature on. However, the contents of the "Address" field (i.e, the last field) are being overlapped on the contents of the "Remarks" field (2nd last field).

    The reason of this overlap is because of the "Top" property of the Textbox, which I am determining at the run - time. However, I am not taking into consideration the height that has been occupied by the 2nd last field ("Remarks" textbox) and hence the issue.

    I would like to know, that is there "ANY WAY OUT" to determine the height of the textbox at the runtime after the "CanGrow" feature is applied

    For instance, the default height of a textbox is "0.25 inch" but the data in the Remarks field is of 4 lines which approximately computes to "1 inch". So I wish to calculate this  1 inch programmatically so that i can add "0.20 inch" more to this 1 inch and set the "Top" property of the "Address" textbox to "1.20" inch

    Thanking You in advance

    Pratik Shah

    Monday, January 29, 2007 2:49 PM