Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    c4d.gui.ShowPopupDialog Hide search entry

    Cinema 4D SDK
    python
    2
    2
    382
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • merkvilsonM
      merkvilson
      last edited by

      Hello!

      I have a popup menu dialog with several options. c4d.gui.ShowPopupDialog
      If I add more than a certain number of options, it automatically adds the Search Entry. Is it possible to remove the search entry? 🤔

      i_mazlovI 1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov @merkvilson
        last edited by i_mazlov

        Hi @merkvilson,

        Please give more information about your setup and provide a code snippet that shows your issue. I'm not able to reproduce your issue using the code snippet below in C4D 2024.2

        There's a c4d.POPUP_ALLOW_FILTERING flag that you can pass to the ShowPopupDialog() function to allow showing the filtering entry in your menu:

        c4d.gui.ShowPopupDialog(cd=None, bc=menu, x=300, y=300, flags=c4d.POPUP_ALLOW_FILTERING)
        

        Cheers,
        Ilia

        import c4d
        
        def main() -> None:
            menu = c4d.BaseContainer()
            for idx in range(5):
                menu.InsData(c4d.FIRST_POPUP_ID + idx, f"Item {idx}")
            c4d.gui.ShowPopupDialog(cd=None, bc=menu, x=300, y=300)
            # c4d.gui.ShowPopupDialog(cd=None, bc=menu, x=400, y=300, flags=c4d.POPUP_ALLOW_FILTERING)
        
        if __name__ == '__main__':
            main()
        

        03915845-5d04-4cf4-a79c-1cb342e2aa60-image.png

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 1
        • First post
          Last post