The latest build of this product (v2.0.0208) was released 19 years ago, which was before this thread was created.
Posted 19 years ago by Glenn Russell - Rhode Island
Avatar
Dear support-
This should be a simple question, but so far, I havn't stumbled acrross the answer.
I would like to completely override the document "x" button. (or remove it) I'm currently using:
this.dwManager.DocumentWindowClosed += new ActiproSoftware.DockableWindow.DWDocumentWindowEventHandler(this.OnDocumentLeave);
but there is still some default behavior which happens.
Is there a method I can use to gain complete control? And then I could close the document in the same way I would from a menu item?
While I'm here, is there a good way to hide the "x" in the document title?
Thanks in advance,
-Glenn Russell

Comments (6)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Glenn,

There are properties like DWManager.ShowDocumentAreaCloseButtons that can control whether the X appears. Yes if that UI is hidden you can still close programmatically.

Our UIStudio suite, which replaces DockableWindow, gives much more control over this sort of thing. In UIStudio you can set global defaults for whether to show close UI for document/tool windows and these global defaults can be overwritten at each window's instance level.

Also, document/tool window closing can be cancelled in the WindowClosing event within UIStudio.


Actipro Software Support

Posted 19 years ago by Glenn Russell - Rhode Island
Avatar
Dear support -
Hi! And thank you for the reply.
I've tried that DWManager.ShowDocumentAreaCloseButtons = false and yet when I create a new document, the 'x' still appears. I've tried doing this in InitializeComponent(), and also in just before I create a document. Any idea why the 'x' is still there?
Also, is there a good method to completly capture that 'x' when it is visible?
Finally, if you like, you could send me an email with upgrade pricing, plus info on how difficult the conversion is.
Thanks,
-Glenn
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It should work... note in our sample that all these options are available on the View menu. You can turn off the close/hide UI there. Then create new documents and it doesn't show the X.

The DWManager.DocumentContainerCloseButtonClicked tells you when the close button is clicked for a document window.

You can see the upgrade pricing for UIStudio here... just order the number of upgrades for the number of DockableWindow licenses you have.
http://www.actiprosoftware.com/Purchase/DotNet/Default.aspx

But you also might want to try out the evaluation first. We've had many customers switch who said it wasn't too bad. It all depends on what features you use however in the end, UIStudio has many more features than DockableWindow so it's probably worth the time. For instance UIStudio has all the new UI features found in Whidbey as well as customizable rendering.


Actipro Software Support

Posted 19 years ago by Glenn Russell - Rhode Island
Avatar
Dear Support-
Thank you for the prompt response and reminding me this feature was in the sample app.
I finally have a workaround to disable that document 'x' button . It's weird, if I place the code:
dwManager.ShowDocumentAreaImages = false;
dwManager.ShowDocumentAreaCloseButtons = false;
dwManager.ShowAutoHideUI = false;
in the InitializeComponents section, during the loading of MainForm, or many other sections, even though the value is set to false (when I check it via debug), when the new document is created, it's still shows the 'X'.
I can duplicate something similar in your sample application.
1.) Start the sample app (I'm running 2.00.0207 Full release)
2.) Uncheck 'Show Document Area Close Buttons'
3.) Right-click in the title bar of one of your sample documents and select 'Close'.
4.) the 'x' now reappears for remaining documents.

For now, as a klugy workaround, I've added it to my UpdateMenuItemsHandler, and that seems to refresh it enough to get the 'x' to stay away. Is this an issue you were aware of? Is there a better way for the 'x' to stay away? I know, I know, UI Studio does a better job with this. :-)
Thanks again for all your help,
-Glenn
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Glenn,

It looks like those both are bugs. Your workaround is probably the best way to handle them with the current release.


Actipro Software Support

Posted 19 years ago by Glenn Russell - Rhode Island
Avatar
Ok, thank you for the info.
-Glenn