radButton Wordwrap

4 posts, 0 answers
  1. Nancy
    Nancy avatar
    22 posts
    Member since:
    Jun 2005

    Posted 02 Sep 2008 Link to this post

    Does the radButton not support word wrap?  It does not seem to do this automatically and I do not see any property to turn it on/off.  Thank you for any information!
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 05 Sep 2008 Link to this post

    Hello Nancy,

    In order to enable the word wrapping, you should set the TextWrap property of the TextPrimitive to true:
    ((TextPrimitive)this.radButton1.ButtonElement.Children[1].Children[1]).TextWrap = true

    Additionally, to make your button resizable while wrapping the text, please set the properties below:
    this.radButton1.Padding = new Padding(5);  
    this.radButton1.RootElement.StretchVertically = false;  
    this.radButton1.TextAlignment = ContentAlignment.TopLeft; 

    You can also set the above properties in the designer. To do so, click on the RadButton's SmartTag and choose Edit UI Elements. You will see a tree view of the RadButton's subelements. Set the necessary properties to the particular elements.

    If you have additional questions, feel free to contact me.
     

    Greetings,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Robert
    Robert avatar
    1 posts
    Member since:
    Dec 2008

    Posted 04 Dec 2008 Link to this post

    I am using the demo version of the latest WinForms and I am unable to get the word wrap as discussed above to work.

    I get an error of: Error parsing RadItem: Children collection index is not valid: 1 -

    This code entry I have.

    ((Telerik.WinControls.Primitives.TextPrimitive)this.btnOperLogOff.ButtonElement.Children[1].Children[1]).TextWrap = true;

    Is there something I am doing wrong here?
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 09 Dec 2008 Link to this post

    Hi Robert,

    Please find the answer to your question in the support ticket in your Client.Net account >> My Support Tickets

    Best wishes,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top