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
    • Recent
    • Tags
    • Users
    • Login

    Set which dialog gizmo or area has focus

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 500 Views
    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.
    • H Offline
      Helper
      last edited by

      On 01/04/2015 at 10:59, xxxxxxxx wrote:

      Is there a way to set which gizmo or object has the focus?

      For example if mouse messages are used to set the focus to a 'GeUserArea' then mouse wheel scrolling will be processed without the user having to click in the area first.

      Thanks,

      Chris

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 01/04/2015 at 14:23, xxxxxxxx wrote:

        GeDialog.Activate()

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 01/04/2015 at 20:33, xxxxxxxx wrote:

          I tried passing the int id of the user area to GeDialog.Activate(), but it returns False, and doesn't seem to set the focus there.

          That's okay, the mouse wheel scroll messages seem to do it, if you set it up right.
          I got it working.

          Thanks anyway NiklasR

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 02/04/2015 at 00:39, xxxxxxxx wrote:

            I'm using GeDialog.Activate() to set focus to a user area too in a plugin I'm currently working on, and
            it returns True for me and properly assigns the focus. :nerd:

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 14/05/2015 at 00:11, xxxxxxxx wrote:

              Niklas,

              Still no luck.

              If I try to set the focus to anything on the dialog inside this function...

              def InitValues(self) :
              

              It doesn't work.

              If I put it inside...

              def Command(self, id, msg) :
              

              and have a button press activate a text field for example, it does work.

              But I want to set the focus away from a textfield that always has the focus when the dialog opens.
              Having the focus there is messing up my keyboard shortcuts.  They go to the textfield and not to the dialog properly.

              Are you setting the focus to a UserArea in an 'InitValues' function?

              Thanks,

              Chris

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