Bug Report T318953
Visible to All Users

LayoutControl - LabelControl has incorrect size on printing

created 9 years ago

I am having trouble printing a layoutcontrol containing a LabelControl, that has a long text.

I have included an example. If you run the example and press the SimpleButton1, you will see a print preview of the layoutcontrol, but the label text is only one line high, but displaying 2 half lines. This is my main issue. I have set the

C#
labelControl1.AutoSizeInLayoutControl = true; labelControl1.AutoSizeMode = LabelAutoSizeMode.Vertical;

I need to be able to see the entire text. It is related to the width of the form. Try resizing the form and click the SimpleButton1. Sometimes the word wrapping works.

Now, I have observed some other unfortunate behaviour, that you may want to look into. In the example , set the

C#
enableDifferentStrings = false; To true and click the SimpleButton1 (or SimpleButton2 or 3) a few times. Every other time, the preview is empty. This is not an issue for me in the final implementation, but you may want to look into it. Finally, here on the support website, as I entered this ticket, I selected some text and marked it as code. Since it was the last in my edit field, I can not get out of Code input mode. Thanks

Answers approved by DevExpress Support

created 9 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    created 9 years ago

    Hello Kasper,
    Thank you for the project.
    To avoid this behavior, you can use the WYSIWYG approach. For this, set the **OptionsPrintControl.OldPrinting**property to true.
    For more information, please refer to the Default Print and Export Mode documentation topic.
    Let me know if you have additional questions.

      Comments (3)
      K K
      Kasper Rung - New work place 1 9 years ago

        Yeah, well, the WYSIWYG approach is not really what we want. We have many lists on the forms, and it is nice to get them expanded, like in the new approach.
        Is there no way to get the new approach working?

        K K
        Kasper Rung - New work place 1 9 years ago

          Yeah, the WYSIWYG isn't working for us. The text is too small to read. A screen shot would be better in this case.

          Sasha (DevExpress Support) 9 years ago

            Hello Kasper,
            The behavior in the provided sample looks incorrect to me. I will pass this ticket to our developers for further research. We will update this thread as soon as we have any results.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.