Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi,
I understand there is GetWidth for GeUserArea. Is there also a GetWidth equivalent for GeDialog?
GetWidth
GeUserArea
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.
Cheers, Maxime.
@m_adam
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 .
def Message
Is there a way to determine the width and height of the dialog upon its startup?