Wrap text in radStatusBarPanelElement

5 posts, 0 answers
  1. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 29 Dec 2010 Link to this post

    I cannot get the text to wrap in radStatusBarPanelElement placed inside a radstatustrip.
    I  am using Q1 2008 SP1.
    Can someone please tell me how I can do this? There is nothing in docs also about wrapping text in this element.

    Thanks
    Sunil
  2. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 29 Dec 2010 Link to this post

    I have set the maximum size so its less than the width of the radstatusstrip in which it is contained.  Even then text does not wrap if text exceeds the max width of the panel element.

    Thanks
    Sunil

    radStatusBarPanelElement1.MinSize = new Size(0, 0);
    raddStatusBarPanelElement1.MaxSize =
    new Size(Screen.PrimaryScreen.WorkingArea.Width -20, 100);
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 03 Jan 2011 Link to this post

    Hello Sunil,

    You can do this at design time by following these steps:

    1. Choose the Edit UI Elements option from the smart tag
    2. Select the TextPrimitive from the element tree
    3. Set the TextWrap property to true 
    4. Set the MaxSize property as well

    Please, refer to the attached screenshot which illustrates these steps. I hope this helps.  

    Do not hesitate to contact me, if you have further questions.

    Greetings,
    Peter
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  5. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 03 Jan 2011 Link to this post

    Hi Peter,

    I could not find any property for TextWrap in Q1 2008 SP1 after reading your reply.

    Thanks
    Sunil
  6. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 05 Jan 2011 Link to this post

    Hi Sunil,

    Thank you for writing back.

    In this case you should try to manually add a new line symbol to StatusBarPanel text, for example:

    radStatusBarPanelElement.Text ="Firstline\nSecondLine";   

    I hope this helps.

    Regards,
    Peter
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top
UI for WinForms is Visual Studio 2017 Ready