Author Topic: CUI - Create MultiLine Text for Ribbon Button  (Read 2392 times)

0 Members and 1 Guest are viewing this topic.

Keith Brown

  • Swamp Rat
  • Posts: 601
CUI - Create MultiLine Text for Ribbon Button
« on: November 06, 2013, 07:28:21 AM »
Has anyone had any luck inserting multi line text into a ribbon button?  The article below says it is as easy as just inserting a \r in your text but I am finding that it is not working.  It just displays the \r and doesn't insert a carriage return.  Anyone else try this?
 
http://adndevblog.typepad.com/autocad/2012/05/multiline-text-in-ribbon-button.html
 
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: CUI - Create MultiLine Text for Ribbon Button
« Reply #1 on: November 06, 2013, 08:17:35 AM »
Take a look at this thread, be sure to read the entire thing.
I just tested it and it still works in 2013.

http://forums.augi.com/showthread.php?101284-How-to-get-2010-ribbon-command-names-to-wrap-%28multi-line%29



Keith Brown

  • Swamp Rat
  • Posts: 601
Re: CUI - Create MultiLine Text for Ribbon Button
« Reply #2 on: November 06, 2013, 08:55:49 AM »
I figured out what my problem was.  I was trying to add the \r or \n to the command name and not the button on the panel.  DOH!  As soon as I added it to the button instead of the command both of them worked just fine.  Thanks again for the help!
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: CUI - Create MultiLine Text for Ribbon Button
« Reply #3 on: November 06, 2013, 12:05:35 PM »
Yea, it took me a few times to figure it out too.

As as side note, I would prefer that the CUI buttons just have a "width" property, and then the text would just wrap as needed based on the button width.
Having to go in and specifically tell each string to wrap is nonsense.