UNSOLVED GetWidth() for GeDialog?


I understand there is GetWidth for GeUserArea.
Is there also a GetWidth equivalent for GeDialog?

I have a bunch of images in a grid with 5 colums.
I want the number of columns to change based on the Width of the GeDialog

Is there a way around this?

Hi @bentraje you can retrieve the size of the current window with BFM_ADJUSTSIZE

    def Message(self, msg, result) :
        if msg.GetId() == c4d.BFM_ADJUSTSIZE: 
          print 'x => ' + str(msg[c4d.BFM_ADJUSTSIZE_WIDTH])
          print 'y => ' + str(msg[c4d.BFM_ADJUSTSIZE_HEIGHT])
        return c4d.gui.GeDialog.Message(self, msg, result)

Then it's up to you to store the value in a member variable of your class.



Thank you. Works as expected.

Hi @m_adam .

Apologies for bringing up the thread again. I just have a follow up question.

The def Message works well for the consecutive duration of the dialog.
But for the initial life (i.e on startup), the def Message will not be executed .

Is there a way to determine the width and height of the dialog upon its startup?