midora Posted October 13, 2011 Share Posted October 13, 2011 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? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 14, 2011 Share Posted October 14, 2011 Can you post a screenshot? Also, a copy of the DLL would be nice too so I can test it out and possibly fix it. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
midora Posted October 18, 2011 Author Share Posted October 18, 2011 (edited) 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. Edited October 18, 2011 by midora Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 19, 2011 Share Posted October 19, 2011 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? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
midora Posted October 19, 2011 Author Share Posted October 19, 2011 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. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 19, 2011 Share Posted October 19, 2011 IndirectUI can be used for file types as well. All the built-in file types use it. Just derive from PropertyBasedFileType instead of FileType. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.