Why is Label Top Alignment twice as large as Left?

Posted by: mtag on 8 January 2024, 1:13 am EST

    • Post Options:
    • Link

    Posted 8 January 2024, 1:13 am EST - Updated 8 January 2024, 1:20 am EST

    I’m trying to tighten up margins on a report - I’m wondering if there’s any way to reduce the top margin on a label, which seems to be about twice as big as the left margin when a label is Left aligned. I have tried combinations of VerticalAlignment, wrapping, multiline - I even tried to setting the padding to a negative value in code.

    Attached is a zoomed in example of what I mean, and a sample report. The goal is to reduce the spacing shown by the red line to move it closer to the top of the label. Thank you.

    rptAlign.zip

  • Posted 8 January 2024, 9:34 pm EST

    Hi Matt,

    AFAIK, it is not possible to reduce the top margin of the Label control. Also, please note that the Padding property of the Label control takes positive values only, or it sets its value back to default, i.e., 0.

    Although, there are two workarounds for this scenario:

    1. Some other font style that has less padding, e.g., Cambria Math.
    2. Use the RichTextBox control, as it allows you to display, insert, and manipulate formatted text (preferred workaround). You may refer to the following link from our documentation for more information about the same:

    Hope this helps!

    TextAlignmentReport.zip

Need extra support?

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

Learn More

Forum Channels