<?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: Esri version of FolderBrowserDialog in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277112#M9625</link>
    <description>&lt;P&gt;Set the dialog filter to ItemFilters.Folders.&amp;nbsp;A FolderConnectionProjectItem will be returned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; var home = Project.Current.HomeFolderPath;
 var opn_dlg = new OpenItemDialog();
 opn_dlg.Title = "Select a Folder";
 opn_dlg.InitialLocation = home;
 opn_dlg.MultiSelect = false;//or true, whichever
 opn_dlg.Filter = ArcGIS.Desktop.Catalog.ItemFilters.Folders;//select folders only

 bool? ok = opn_dlg.ShowDialog();
 if (ok == true) {
   var folder = opn_dlg.Items[0] as FolderConnectionProjectItem;
   var path = folder.Path;
   //TODO - use folder selection
 }
 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2023 22:09:31 GMT</pubDate>
    <dc:creator>CharlesMacleod</dc:creator>
    <dc:date>2023-04-10T22:09:31Z</dc:date>
    <item>
      <title>Esri version of FolderBrowserDialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277095#M9622</link>
      <description>&lt;P&gt;I have a part in my code that requires the user to select a folder. I've been using the microsoft dialog&amp;nbsp;FolderBrowserDialog do this. It works fine except that the dialog isn't dark when the ArcGIS Pro user has set Pro to dark theme.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an Esri equivelent to the&amp;nbsp;FolderBrowserDialog, or is there a way that I can configure an Esri dialog to do the same task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 21:28:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277095#M9622</guid>
      <dc:creator>StevenCorpus</dc:creator>
      <dc:date>2023-04-10T21:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Esri version of FolderBrowserDialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277105#M9623</link>
      <description>&lt;P&gt;The &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic8992.html" target="_self"&gt;OpenItemDialog&lt;/A&gt; is what you're looking for. You can set the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic27537.html" target="_self"&gt;BrowseProjectFilter&lt;/A&gt; to a folder. The full list of filters is &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Browse-Dialog-Filters" target="_self"&gt;here&lt;/A&gt;. This &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-content#geodatabase-content-from-browse-dialog" target="_self"&gt;snippet&lt;/A&gt; shows how to use it.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 21:48:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277105#M9623</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-04-10T21:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Esri version of FolderBrowserDialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277112#M9625</link>
      <description>&lt;P&gt;Set the dialog filter to ItemFilters.Folders.&amp;nbsp;A FolderConnectionProjectItem will be returned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; var home = Project.Current.HomeFolderPath;
 var opn_dlg = new OpenItemDialog();
 opn_dlg.Title = "Select a Folder";
 opn_dlg.InitialLocation = home;
 opn_dlg.MultiSelect = false;//or true, whichever
 opn_dlg.Filter = ArcGIS.Desktop.Catalog.ItemFilters.Folders;//select folders only

 bool? ok = opn_dlg.ShowDialog();
 if (ok == true) {
   var folder = opn_dlg.Items[0] as FolderConnectionProjectItem;
   var path = folder.Path;
   //TODO - use folder selection
 }
 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 22:09:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277112#M9625</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2023-04-10T22:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Esri version of FolderBrowserDialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277114#M9626</link>
      <description>&lt;P&gt;To control the color like you describe&amp;nbsp; you may need to build your own FoldierLocator dialog and use the showdialog()&amp;nbsp; command to open it. If you create your own form there is a BackColor property you can use. You would call the following Subroutined after instantiating the form but Before showing it. In this example I've stored my desired Form color in the myAppColor environment variable.&amp;nbsp; I've used 'Named' colors as available from the&amp;nbsp;SystemColors collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    Sub setControlColor(ByRef theForm As System.Windows.Forms.Form)
        Dim theControl As Control
        Try
            theForm.BackColor = My.Settings.Default.myAppColor
        Catch eX As Exception
            'unable to get the color
            theForm.BackColor = SystemColors.Control
        End Try

        For Each theControl In theForm.Controls
            If theControl.GetType Is GetType(TextBox) Then
                'do nothing since we want white backgrounds in our text box
            Else
                theControl.BackColor = My.Settings.Default.myAppColor
                theControl.Invalidate()
            End If
            If theControl.GetType Is GetType(System.Windows.Forms.Button) Then
                Dim theButton As System.Windows.Forms.Button
                theButton = theControl
                theButton.UseVisualStyleBackColor = False
            End If
        Next
        theForm.Refresh()
    End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 22:16:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/esri-version-of-folderbrowserdialog/m-p/1277114#M9626</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2023-04-10T22:16:13Z</dc:date>
    </item>
  </channel>
</rss>

