Problem

ToolWindow bug after hiding and reshow

Posted 5 months ago by Avatar rex hui

To reproduce, run the Docking & MDI Simple IDE Demo.

1. Drag and float the Document Properties toolwindow.

2. Notice you can resize it to very small and everything is correct.

3. Close the Document Properties toolwindow.

4. Reopen it from View->Document Properties.

5. Notice now you cannot resize it to very small size and also it seems like the inner content is limiting the resizing.

 

problem


Comments (4)

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA

Hi Rex,

Thanks for pointing this out.  Actually there should be a default minimum size in place of about 136x50 pixels.  We weren't explicitly setting it on the WPF Window that hosts the floating dock host, and something in core Win32 was producing random results in the scenario you gave.  For the next build, we have updated DockSite.InitializeFloatingWindow to set the window's MinWidth/MinHeight.  Once set to a value, it seems more consistent in how Win32 handles things.


Actipro Software Support
Posted 5 months ago by rex hui

Thanks. I have a somewhat related question. There is the option AreDocumentWindowsDestroyedOnClose but that doesn't apply to ToolWindows. How do I achieve the same thing with ToolWindows?

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA

Hello,

That is correct... tool windows are meant to live on when closed, whereas documents are typically destroyed (removed from the DockSite) when closed.  If you want to destroy a tool window when it is closed, just watch the DockSite.WindowsClosed event and for tool windows, call their Destroy() method.


Actipro Software Support
Posted 5 months ago by rex hui

Got it. Thank you!

Information The latest build of this product (2018.1 build 0673) was released 7 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.