<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: can't get ribbon panel to work in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5619329#M72598</link>
    <description>Dear, what do you by "can't get it to work", your code works for me.&lt;BR /&gt;is it a problem of your addin file?</description>
    <pubDate>Mon, 04 May 2015 04:36:16 GMT</pubDate>
    <dc:creator>Aaron.Lu</dc:creator>
    <dc:date>2015-05-04T04:36:16Z</dc:date>
    <item>
      <title>can't get ribbon panel to work</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5615958#M72597</link>
      <description>&lt;P&gt;I wanted a ribbon panel with a text box but can't get it to work. I put my code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public class CsAddPanel : IExternalApplication&lt;BR /&gt;{&lt;BR /&gt;// Both OnStartup and OnShutdown must be implemented as public method&lt;BR /&gt;public Result OnStartup(UIControlledApplication application)&lt;BR /&gt;{&lt;BR /&gt;// Add a new ribbon panel&lt;BR /&gt;RibbonPanel panel = application.CreateRibbonPanel("NewRibbonPanel");&lt;/P&gt;&lt;P&gt;panel.AddSeparator();&lt;BR /&gt;AddStackedButtons(panel);&lt;/P&gt;&lt;P&gt;return Result.Succeeded;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;private void AddStackedButtons(RibbonPanel panel)&lt;BR /&gt;{&lt;BR /&gt;ComboBoxData cbData = new ComboBoxData("comboBox");&lt;/P&gt;&lt;P&gt;TextBoxData textData = new TextBoxData("Text Box");&lt;BR /&gt;//textData.Image =&lt;BR /&gt;// new BitmapImage(new Uri(@"D:\Sample\HelloWorld\bin\Debug\39-Globe_16x16.png"));&lt;BR /&gt;textData.Name = "Text Box";&lt;BR /&gt;textData.ToolTip = "Enter some text here";&lt;BR /&gt;textData.LongDescription = "This is text that will appear next to the image"&lt;BR /&gt;+ "when the user hovers the mouse over the control";&lt;BR /&gt;//textData.ToolTipImage =&lt;BR /&gt;// new BitmapImage(new Uri(@"D:\Sample\HelloWorld\bin\Debug\39-Globe_32x32.png"));&lt;/P&gt;&lt;P&gt;IList&amp;lt;RibbonItem&amp;gt; stackedItems = panel.AddStackedItems(textData, cbData);&lt;BR /&gt;if (stackedItems.Count &amp;gt; 1)&lt;BR /&gt;{&lt;BR /&gt;TextBox tBox = stackedItems[0] as TextBox;&lt;BR /&gt;if (tBox != null)&lt;BR /&gt;{&lt;BR /&gt;tBox.PromptText = "Enter a comment";&lt;BR /&gt;tBox.ShowImageAsButton = true;&lt;BR /&gt;tBox.ToolTip = "Enter some text";&lt;BR /&gt;// Register event handler ProcessText&lt;BR /&gt;tBox.EnterPressed +=&lt;BR /&gt;new EventHandler&amp;lt;Autodesk.Revit.UI.Events.TextBoxEnterPressedEventArgs&amp;gt;(ProcessText);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void ProcessText(object sender, Autodesk.Revit.UI.Events.TextBoxEnterPressedEventArgs args)&lt;BR /&gt;{&lt;BR /&gt;// cast sender as TextBox to retrieve text value&lt;BR /&gt;TextBox textBox = sender as TextBox;&lt;BR /&gt;string strText = textBox.Value as string;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public Result OnShutdown(UIControlledApplication application)&lt;BR /&gt;{&lt;BR /&gt;// nothing to clean up in this simple case&lt;BR /&gt;return Result.Succeeded;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;[TransactionAttribute(TransactionMode.Automatic)]&lt;BR /&gt;[RegenerationAttribute(RegenerationOption.Manual)]&lt;BR /&gt;public class Lab1PlaceGroup1 : IExternalCommand&lt;BR /&gt;{&lt;BR /&gt;public Result Execute(&lt;BR /&gt;ExternalCommandData commandData,&lt;BR /&gt;ref string message,&lt;BR /&gt;ElementSet elements)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;// code&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2015 19:43:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5615958#M72597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-01T19:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: can't get ribbon panel to work</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5619329#M72598</link>
      <description>Dear, what do you by "can't get it to work", your code works for me.&lt;BR /&gt;is it a problem of your addin file?</description>
      <pubDate>Mon, 04 May 2015 04:36:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5619329#M72598</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-05-04T04:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: can't get ribbon panel to work</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5620212#M72599</link>
      <description>I mean that I can't see a textbox under the addin tab. I made one plug in for the class under Lab1PlaceGroup1. Do i need one for the CsAddPanel as well?</description>
      <pubDate>Mon, 04 May 2015 17:35:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5620212#M72599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-04T17:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: can't get ribbon panel to work</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5620759#M72600</link>
      <description>&lt;P&gt;I can see the textbox, please see the attachment.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 02:35:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5620759#M72600</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-05-05T02:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: can't get ribbon panel to work</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5620760#M72601</link>
      <description>&lt;P&gt;I can see the textbox, please see the attachment.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 02:36:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-ribbon-panel-to-work/m-p/5620760#M72601</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-05-05T02:36:14Z</dc:date>
    </item>
  </channel>
</rss>

