<?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: Is there a way to get a reference to control on a custom Ribbon? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/703118#M16</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I actually want to update the edit box's text on the ribbon not just read its value but I think I can manage that with events as you suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2020 08:52:28 GMT</pubDate>
    <dc:creator>GustavoCruz</dc:creator>
    <dc:date>2020-05-26T08:52:28Z</dc:date>
    <item>
      <title>Is there a way to get a reference to control on a custom Ribbon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/703116#M14</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On our AddIn we have an EditBox on our custom Ribbon. I would like to access its Text from a DockPane.&lt;/P&gt;&lt;P&gt;I was expecting something similar to what's in place for DockPanes (&lt;SPAN style="background-color: #ffffff;"&gt;FrameworkApplication.DockPaneManager.Find("the id of the dockpane")) to exist but can't find anything on the API to get a reference to a control on the Ribbon.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2020 14:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/703116#M14</guid>
      <dc:creator>GustavoCruz</dc:creator>
      <dc:date>2020-05-07T14:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to get a reference to control on a custom Ribbon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/703117#M15</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In theory you can use this snippet:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// Test_EditBox is the Id of the editBox in config.daml:&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; plugin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; FrameworkApplication&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetPlugInWrapper &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Test_EditBox"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;however, currently there is a limitation in the API that doesn't allow you to access the returned plugin wrapper which is of the type:&amp;nbsp;ArcGIS.Desktop.Framework.Wrappers.EditBoxWrapper, not accessible via the API.&lt;/P&gt;&lt;P&gt;So the best way to access the text from anywhere is to create a static string property in the Module class and&amp;nbsp;set that property with the text each time the text is changed:&lt;/P&gt;&lt;P&gt;Module1.cs add:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;internal&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt; EditText &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;get&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;set&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To your EditBox class you add these overrides depending on your input trigger preference:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;/// Called when the 'Enter' key is pressed inside this control or when the control loses keyboard focus.&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;override&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnEnter&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;// Passes the current Text in the EditBox to the global parameter in Module1.&lt;/SPAN&gt;
  Module1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;EditText &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Text&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;override&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnLostKeyboardFocus&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;KeyboardFocusChangedEventArgs e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;// Passes the current Text in the EditBox to the global parameter in Module1.&lt;/SPAN&gt;
  Module1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;EditText &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Text&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you prefer events you can also implement an&amp;nbsp;OnEditBoxChanged event in you EditBox class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:34:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/703117#M15</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T05:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to get a reference to control on a custom Ribbon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/703118#M16</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I actually want to update the edit box's text on the ribbon not just read its value but I think I can manage that with events as you suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 08:52:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/703118#M16</guid>
      <dc:creator>GustavoCruz</dc:creator>
      <dc:date>2020-05-26T08:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to get a reference to control on a custom Ribbon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/1567930#M12408</link>
      <description>&lt;P&gt;Where you able to get this resolved?&amp;nbsp; &amp;nbsp;I would like to know the solution.&amp;nbsp; &amp;nbsp;I too want to be able to pass a variable&amp;nbsp; to the editbox text property.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 17:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/is-there-a-way-to-get-a-reference-to-control-on-a/m-p/1567930#M12408</guid>
      <dc:creator>mstranovsky</dc:creator>
      <dc:date>2024-12-12T17:21:22Z</dc:date>
    </item>
  </channel>
</rss>

