Skip to content

DirectoryFileSelector: add a single-select option #274

Done

Description

@Felix-Mallinder

Description:

DirectoryFileSelector is always multi-select (selectmode=tk.MULTIPLE, plus Select All / Deselect All). Tools that need exactly one file can't stop the user ticking several, so each tool has to check the selection itself, and a tool that doesn't silently uses the first ticked file.

Expected behaviour:

Add a multi_select: bool = True argument. With multi_select=False the list allows one file only (selectmode=tk.BROWSE) and Select All / Deselect All are hidden. The default keeps today's behaviour, so existing callers are unchanged.

Test file(s):

Python_Engine/Python/tests/test_bhom_tkinter_ui.py::test_directory_file_selector_single_select

Activity

  1. added
    type:feature
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions