Jump to content
Sign in to follow this  
Myosis

Keeping a DLG_TYPE_ASYNC type dialog always the same size ?

Recommended Posts

Hi,

Preferably I don't want the user to resize the dialog window, but it doesn't seem possible when using a DLG_TYPE_ASYNC type dialog.

I also gave up on trying to dynamically resize the dialog for when a group 'in the dialog' gets folded/unfolded, but that simply doesn't seem possible.
Closest I came was closing it and reopening it in a different size. This worked to a certain extent but not without flaws.

I got that idea from here

 

So I stopped caring about the empty space when a group gets folded.
But I want upon startup that the dialog “at least” goes back to its original shape. (the smallest it can be)

Defaulth=0, defaultw=are only useful on the very first time opening.  When the user resizes this c4d seems to prioritize this and saves it.
So do I use RestoreLayout for this?
 

Share this post


Link to post

I'm afraid you're attempting something that is conceptually not planned. (I had similar issues a long while back; I do not think that anything has changed in that respect but if it did, someone will probably correct me.)

 

Remember that ASYNC dialogs are dockable. If your dialog is docked, the user controls the size of the dialog by modifying the layout (the surrounding elements, the window separator bars). In that state, resetting your dialog's size would simply ruin the user's layout. Therefore, the current size (as set from the outside, either through the window frame handles or by the layout pattern) needs to be flexible and is calculated from the outer frame to the inner layout, with internal minima and sizes only being applied when the dialog's initial minimum dimensions are calculated.

 

I also do not recommend that you force sizes by opening and closing the dialog, as this too would influence the current docking/Layout situation.

Share this post


Link to post

Cairyn is absolutely right, it's neither possible nor would many users appreciate such a break with C4D's conventions. Even if the dialog is not docked, the user can expect all dialogs "behave" if she or he saves her/his layout. This has also been discussed in Plugin Café a few times. It's certainly better to design a dialog with this in mind.

Cheers

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

Latest Topics

Latest Comments

JOBS / BUY & SELL

×
×
  • Create New...