We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Text Wrap "MultiLine Text" Ribbon button

Thread ID:

Created:

Updated:

Platform:

Replies:

100003 Jun 25,2011 06:55 AM UTC Jun 29,2011 06:36 AM UTC WinForms 2
loading
Tags: Tools
Gilles Angulo
Asked On June 25, 2011 06:55 AM UTC

I am trying to achieve a Multi-Line Text on a button with an image inside the ribbon control.

I can see that in the "ribbon merge" sample there are a couple of buttons that have the desired effect: "Conditional formatting", "Format as Table" etc.

where the image could be on top, to the right, or to the left and the button when is has a long text it will display the text on a MultiLine text wrap kind of layout instead of making the control as long as the text length.

How do i achieve this ? i have tried to find a property that allows me to do this and i can't find it. besides when i change the text on the "Ribbon Merge" samples (on the buttons where i see you do it) as soon as i add more text the buttons loose this type of formatting and come back to where the button becomes as big as the length of the text and look horrible.

What do you do to make this "Text Wrap" and can you do it code besides doing it on the designer so when you have a localized application and you need to change the text to another language the text will keep this "Text Wrap" formatting so the button does not loose its shape.

Look forward to your answer.


Gilles Angulo
Replied On June 28, 2011 01:11 PM UTC

Well i guess you guys are Busy and have not have time to answer my question, and i have played a a couple of minutes with the issue so i will answer my own question:

There are 2 ways of doing this:

1) Through the designer. Just go the the text property where the text of the button in to be placed ("write the text you want"), then click on the drop-down in that field and where you want to have a new line just press the "Return" key until you have the text formatted the way you want too.

2) Through code: just place an "Environment.NewLine" where you want a new line on the text.

ex: toolStripButton34.Text = "Line 1" + Environment.NewLine + "Line 2" + Environment.NewLine + "Line 3";

That will give you a button with 3 lines of text:

Line 1
Line 2
Line 3

Thanks and i hope that this helps someone else

Gilles


Iniyen M A [Syncfusion]
Replied On June 29, 2011 06:36 AM UTC

Hi Gilles,

Thanks for your interest in Syncfusion products.

We are glad to hear you have resolved your query, Our support policies differ for the different support we offer, You will receive faster assistance with our Direct-Trac support system. Please log incidents under the following link if you need any further assistance.

http://www.syncfusion.com/support/directtrac

We are glad to assist you

Regards,
Iniyen M.A.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;