Ability to set DLG_TYPE_ASYNC Width & Height



  • Hello,
    I have several Command Plugins whose asynchronous GeDialogs are opening at some different sizes: sometimes far too large for its content which looks quite bad and requires the user to resize to use the plugin with the C4D scene.

            return myDialog.Open(dlgtype=c4d.DLG_TYPE_ASYNC, xpos=-2, ypos=-2,
                pluginid=PLUGIN_ID, defaultw=560, defaulth=560)
    

    As I don't believe it's currently possible, I'd like to request the ability to set a size for the GeDialog DLG_TYPE_ASYNC window. This has come up in the forum and it seems like it'd be a terrific feature for developers.

    Re: open DLG_TYPE_ASYNC always with default size
    Re: Resize dialog after LayoutFlushGroup(id)
    Re: Sizing Plugin Dialogs

    Thank you!



  • hi,

    a bit strange that your UI is sometimes way too large for its content. It should be set to the minimum size or the default you set. At least the first time you open it.
    After that, it will reload the value stored when the dialog is resized by the user.

    Do you want to "force" a size each time your dialog are opened ?

    Cheers,
    Manuel



  • @m_magalhaes Yes, exactly!



  • Hi sorry for the late reply I had to dig down some old code and in fact this can be done by doing:
    xpos=-3, ypos=-3

    return myDialog.Open(dlgtype=c4d.DLG_TYPE_ASYNC, xpos=-3, ypos=-3,
                pluginid=PLUGIN_ID, defaultw=560, defaulth=560)
    
    

    Unfortunately, this means, your dialog will not be anymore centered, but this is for the moment the only possible way to do it.
    Cheers,
    Maxime.



  • @m_adam that is excellent! Thank you for going into old code to find it 😄

    Can I change the request to a centered version of this, please? Maybe xpos=-4, ypos=-4?

    Thank you!


Log in to reply