RadButton TextWrap issue with Image

2 posts, 0 answers
  1. David
    David avatar
    9 posts
    Member since:
    Sep 2009

    Posted 30 Apr 2013 Link to this post

    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;

  2. Peter
    Peter avatar
    1160 posts

    Posted 03 May 2013 Link to this post

    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.

    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Back to Top