This is a migrated thread and some comments may be shown as answers.

RadButton TextWrap issue with Image

1 Answer 128 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 30 Apr 2013, 06:03 PM
We're having an issue with the RadButton (2013Q1) whereby the text wrapping is failing when an image is included in the button.

It appears that the word wrap boundaries are calculated as if the image wasn't there, which is causing words to be cut off at certain button widths.  The right border also appears to be getting overwritten.

To reproduce, create a RadButton on a form with the below settings.  The image is any 32x32 image.  Note that the word wrap shows "The Quick Bro" / "Fox" instead of "The Quick" / "Brown Fox".  (Image attached.)

Does anybody know of any workarounds or fixes for this?  Right now we're probably just going to remove the images entirely, since we can't restrict the text length for the buttons.
this.radButton1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.radButton1.Image = global::TestPopup.Properties.Resources.Image32x32;
this.radButton1.Location = new System.Drawing.Point(13, 13);
this.radButton1.Size = new System.Drawing.Size(131, 44);
this.radButton1.Text = "The Quick Brown Fox";
this.radButton1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.radButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.radButton1.TextWrap = true;

Thanks,
Dave

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 May 2013, 01:28 PM
Hi David,

Thank you for writing.

I was able to reproduce the described behavior and I have logged this issue in our Public Issue Tracking System - PITS. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - PITS Issue. I am not able to provide a work around for the correct text wrap in this case.

Your Telerik points have been updated for bringing this issue to our attention.

Do not hesitate to write back anytime you have further questions or need assistance.

Regards,
Peter
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
David
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or