Jump to content

'Defaults' button in 'Save configuration' dialog


midora
 Share

Recommended Posts

There is a small issue with the 'Defaults' button I'm fighting with in a file type plugin.

Because the space for settings is limited I'm adapting the ui depending on the current settings.

For this I set the 'Autosize' property in my SaveConfigWidget() constructor to true (this.AutoSize = true;).

This works fine in most cases and the 'Defaults' button moves depending on the size of the plugin panel.

But if the user unfolds a setting to show some sub settings the 'Defaults' button keeps it location and covers some of the controls.

It works in the case that unfolding forces Paint.NET to show a vertical scrollbar for the plugin panel.

Is there something I can do in the plugin to trigger the owner of the plugin panel to adapt the position of the 'Defaults' button?

Or could Paint.NET be changed to react on a size change of the plugin panel?

midoras signature.gif

Link to comment
Share on other sites

The following three screenshots show the problem.

1 => 2: Changed "Page Size" to "A4" which sets some additional layout controls to visible. The "Defaults" button does not move.

2 => 3: Changed "Encryption" to "High" which sets some additional encryption controls to visible. The "Defaults" button" moves because the panel reachs the maximum size and has to show the vertical slider.

I do not set the position of the controls. Just changing the visibility. The rest is done by the TableLayoutPanel logic.

The dll is not ready in the moment, maybe next weekend.

Defaults%20Button%201.pngDefaults%20Button%202.pngDefaults%20Button%203.png

Edited by midora

midoras signature.gif

Link to comment
Share on other sites

One thing you might try, at least in the interim, is to force a layout pass of the entire form. From your control, use FindForm(), and then call its PerformLayout() method.

Are you sure you can't just use IndirectUI?

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Are you sure you can't just use IndirectUI?

No idea about IndirectUI. From what I could find in the forum: IndirectUI is a way to describe UI controls with a language extension and it is used for effects plugins. Maybe a reference would be nice.

But I do not have a good idea about C#. I just know what I teached me in the last month to get the ui to run.

midoras signature.gif

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...