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

    Gedialog size [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 439 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 19/11/2016 at 08:32, xxxxxxxx wrote:

      Is there a way for know the current size of an Gedialog or at least to a group?
      I don't want to change it I just want to know them for doing a dynamic UI.
      Thanks in advance 🙂

      I sucessfully know when the size is changed but not the value 😕

          def Message(self, msg, result) :
              if msg.GetId() == c4d.BFM_SIZED: 
                  print("Changing Dialog Dimensions")
                  for index, value in result:
                      print "Index: %i, Value: %s" % (index, str(value))
        
              return c4d.gui.GeDialog.Message(self, msg, result)
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 21/11/2016 at 04:11, xxxxxxxx wrote:

        Sry for the double post but I figured it out. 
        So I just post the solution in future case.

            def Message(self, msg, result) :
                if msg.GetId() == c4d.BFM_ADJUSTSIZE: 
                  print 'x => ' + str(msg[3])
                  print 'y => ' + str(msg[4])
              
                return c4d.gui.GeDialog.Message(self, msg, result)
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 21/11/2016 at 09:09, xxxxxxxx wrote:

          Hi,

          while this message may work for you, I have to point out, that it is marked private, so we won't guarantee for anything.

          On the other hand, I'm wondering, why you actually need this information? When implementing your own GeUserArea you are provided with the needed size in its Sized() function.

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

            On 21/11/2016 at 09:48, xxxxxxxx wrote:

            Don't know about OP's intentions but it's useful if you want to
            make a grid of elements that adjusts to the available space in
            the dialog.

            -Niklas

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

              On 22/11/2016 at 00:50, xxxxxxxx wrote:

              Exaclty NiklasR here is a short preview.
              http://recordit.co/edew05pq7d

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