Solved 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

MAXON SDK Specialist

MAXON Registered Developer

@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!

@m_adam Hey m_adam ,I find this topic when I try to set minimum size with my dialog, but I try the xpos=-3, ypos=-3, it doesn't work , I use a HideElement dialog like gedialog_menu_hide_content.py did.

but the gui can not fit the minimum size , can I fix this?

Hi @Dunhou sorry for the delay I overlooked your reply. I don't think this is the same issue as described in this topic.

The , xpos=-3, ypos=-3 is something to enforce that each time you open the dialog, the dialog is opened like the first time and doest not re-use the size that a user may have set to the dialog by manually resizing it. In the case of the "gedialog_menu_hide_content" if you want to have really the most minimal size you should define a lower value of the defaultw and defaulth argument in the GeDialog.Open call.

So maybe open a new topic with clear screenshot and if possible some code so I can really look at your issue.

Cheers,
Maxime.

@m_adam
Thanks for you reply , and there is nothing worry about the time, you are much busier than me😊

I already try the defaultX and nothing changed, the dialog is always bigger than I set , it seems the dialog is considering teh hiden element size or something , the code is bit long for the forum ( maybe we should add a folding option to the code block in the forum ), and I sent an copy to ferdinand , and newest version has nothing changed for the UI part, Is that convenient for you to get a copy from ferdinand or post your email I can send you emails to,

Cheers~