Bug Report B90049
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Text wraps in a TextEdit control inside a LayoutControl during printing

Wrong fitting when printing a LayoutControl with a CheckBox

created 17 years ago

When a CheckBox is added to a LayoutControl and then configured to print using a PrintingSystem/PrintableComponentLink, the Text field of the check box is always being wrapped no matter how much space is left.
Steps to Reproduce:
I've setup a new form. Then added a LayoutControl (docking on top). Then I added a CheckBox control inside the layout and changed the check box Text field to something like "Abacate amarelo sem corante".
Then I added a PrintingSystem component and configured a new PrintableComponentLink pointing to the LayoutControl.
Then bring the print preview by doing:
            printableComponentLink1.CreateDocument();
            printableComponentLink1.ShowPreviewDialog();
Actual Results:
The print preview (see screenshot) shows the checkbox without the last word (only "Abacate amarelo sem").
That word is actually being wrapped (to the next line that is not visible) even though there's a lot of remaining space that could fit the whole text.
In the second part of the screenshot the Text field is changed to "Abacate amarelo sem corante AAA" and in that case you can see "Abacate amarelo sem corante" in the first line and only the top part of the last word "AAA" in what would be a second line.
Changing the AppearanceItemCaption.TextOptions.WordWrapp field of the LayoutControlItem to 'NoWrapp' doesn't fix it. Neither changing a similar field in the CheckBox itself.
Expected Results:
During print, if there's enough room the Text field should fill completely the first line. When, and only when, there's not enough room then the line should be either cropped or wrapped. But in the second case, if it is being wrapped, the height should be changed to accommodate two lines.

Comments (2)

    This is not a duplicate… this happens with a CheckBox and the other one with regular EditBoxes… this bug is more serious since the wrapping occur no matter what… the other issue is not quite the same thing…

    DevExpress Support Team 17 years ago

      Thank you for the additional details. We have fixed this issue.

      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.