Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Restrict Input Dialog to Numbers?

    Cinema 4D SDK
    r21 python
    2
    3
    412
    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.
    • B
      bentraje
      last edited by

      Hi,

      I want the c4d.gui.InputDialog to restrict to numbers. Currently, it allows and will return a string as verified by this thread and in the documentation.

      Can someone confirm if this is still applicable for the latest version (i.e. R21)?

      If so, are there any definitive solutions?
      I was thinking of calling a GuiDialog within a GuiDialog so I can create a dedicated GeDialog.AddEditNumber().
      But I'm not sure how to implement this.

      Is there a way around this?

      P.S. Just for background:
      Within my current GuiDialog, it has several buttons. And when you press some of them, I would like a Dialog Pop-up and asks for input before the command in the button executes itself.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by m_adam

        @bentraje take a look at the official gedialog_ask_number example.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 2
        • B
          bentraje
          last edited by

          Hi @m_adam

          Thank you for reference. It works as expected.
          Have a great day ahead! 🙂

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