GetWidth() for GeDialog?
-
Hi,
I understand there is
GetWidthforGeUserArea.
Is there also aGetWidthequivalent forGeDialog?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 theGeDialogIs 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.
Cheers,
Maxime. -
Thank you. Works as expected.
-
Hi @m_adam .
Apologies for bringing up the thread again. I just have a follow up question.
The
def Messageworks well for the consecutive duration of the dialog.
But for the initial life (i.e on startup), thedef Messagewill not be executed .Is there a way to determine the width and height of the dialog upon its startup?