Gedialog size [SOLVED]



  • 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)
    


  • 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)
    


  • 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.



  • 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



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

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


Log in to reply