# Eto.Forms.OpenFileDialog with multiple filters

**URL:** <https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188>\
**Category:** Rhino Developer\
**Tags:** windows, mac, rhinoformac, eto\
**Created:** [October 20, 2025, 10:38am UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188 "2025-10-20T10:38:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![p.stragliotto](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/p.stragliotto/32/702136_2.png) [@p.stragliotto](https://discourse.mcneel.com/u/p.stragliotto)\
**Post date:** [October 20, 2025, 10:38am UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188/1 "2025-10-20T10:38:19Z")

</div>

Hi I’m trying to use the `Eto.Forms.OpenFileDialog` and its `Filter` property with Rhino Common to achieve the following behaviour:

- the user can select a SINGLE file type filter (PNG, BMP, JPG, ZIP) if he already knows precisely what he’s looking for _– or –_
- the user can select an “ALL FILE” filter to browse all files

For the single file type filters all is working as expected:

```csharp
dialog.Filters.Add(new FileFilter("Png files", ".png"));
dialog.Filters.Add(new FileFilter("Jpg files", ".jpg", ".jpeg"));
...

```

but if I try to add a filter like this

```csharp
dialog.Filters.Add(new FileFilter("All files", ".*"));

```

the dialog is shown correctly, however as soon as I select the “All files” filter from the combo box, Rhino crashes.

I guess filters in a “regexp style” with wildcard characters are not managed behind the hood of `Eto.Forms.OpenFileDialog` class.

 ![Screenshot 2025-10-20 at 12.24.34](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/4/4/a445be50350bb0b65db938a80ca1f2a8b8ae5850.png)

I also tried to use `Rhino.UI.OpenFileDialog` instead, where the `Filter` property can be set up in the classic way ``Png files (*.png)|*.png|All files (*.*)|*.*`_```,_ but no filter is shown.

 ![Screenshot 2025-10-20 at 12.33.40](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/c/0/4c0d1864c73b85d890aeb163c5fc5ad604d604d9.png)

I’m running my plugin on Rhino 8 for macOS.

- Rhino version: 8.24
- macOS version: Tahoe 26.0.1

Is there any workaround to achieve the mentioned behaviour?

Thanks

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [October 20, 2025, 3:35pm UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188/2 "2025-10-20T15:35:26Z")

</div>

Hi @p.stragliotto,

```py
#! python3
import Eto
import Rhino
import System

def Test():
    dialog = Eto.Forms.OpenFileDialog()
    dialog.Title = "Open"
    dialog.Filters.Add(Eto.Forms.FileFilter("BMP", [".bmp"]))
    dialog.Filters.Add(Eto.Forms.FileFilter("JPG", [".jpeg"]))
    dialog.Filters.Add(Eto.Forms.FileFilter("PNG", [".png"]))
    dialog.Filters.Add(Eto.Forms.FileFilter("Supported Files", [".bmp", ".jpeg", ".png"]))
    dialog.Filters.Add(Eto.Forms.FileFilter("All Files", ["*"]))
    result = dialog.ShowDialog(Rhino.UI.RhinoEtoApp.MainWindow)
    if result == Eto.Forms.DialogResult.Ok:
        path = dialog.FileName
        print(dialog.FileName)

if __name__ == ' __main__':
    Test()

```

– Dale

---

<div class="post-metadata">

**Author:** ![p.stragliotto](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/p.stragliotto/32/702136_2.png) [@p.stragliotto](https://discourse.mcneel.com/u/p.stragliotto)\
**Post date:** [October 21, 2025, 9:17am UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188/3 "2025-10-21T09:17:37Z")

</div>

Thanks @dale

I tried your code as-is on the Script editor, and actually **Rhino for macOS** crashes the same when selecting “All files” from the combo box.

It works for Rhino Windows, I need to make it work on macOS as well though.

I think this is a bug that needs a fix, in the meantime I will apply no filter and just show all files by default to the user.

Cheers

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [October 21, 2025, 3:30pm UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188/4 "2025-10-21T15:30:23Z")

</div>

Hey @p.stragliotto - I tested my script on the Mac, successfully. Let me look into this a little more.

– Dale

---

<div class="post-metadata">

**Author:** ![curtisw](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/curtisw/32/769477_2.png) [@curtisw](https://discourse.mcneel.com/u/curtisw)\
**Post date:** [October 21, 2025, 4:06pm UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188/5 "2025-10-21T16:06:35Z")

</div>

Hey @p.stragliotto,

Looks like we have already done a fix for this in Rhino WIP, and should be back ported to Rhino 8.

I’ve filed [RH-90064](https://mcneel.myjetbrains.com/youtrack/issue/RH-90064) **Eto FileDialog crashes when specifying all files** to get that fixed up.

Thanks for reporting the issue!

---

<div class="post-metadata">

**Author:** ![brian](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/brian/32/504171_2.png) [@brian](https://discourse.mcneel.com/u/brian)\
**Post date:** [October 21, 2025, 9:29pm UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188/6 "2025-10-21T21:29:50Z")

</div>

[RH-90064](https://mcneel.myjetbrains.com/youtrack/issue/RH-90064) is fixed in [Rhino 8 Service Release 25](https://www.rhino3d.com/download/rhino/8/latest)

---

<div class="post-metadata">

**Author:** ![p.stragliotto](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/p.stragliotto/32/702136_2.png) [@p.stragliotto](https://discourse.mcneel.com/u/p.stragliotto)\
**Post date:** [October 22, 2025, 6:54am UTC](https://discourse.mcneel.com/t/eto-forms-openfiledialog-with-multiple-filters/211188/7 "2025-10-22T06:54:41Z")

</div>

Thank you guys! 💪
