Document Window Strip Buttons

Docking/MDI for Windows Forms Forum

Posted 13 years ago by Kevin Burt - Marketing Databasics
Avatar
Hello.

TabStripButtons in the TabStrip control can be associated with a Command event which allows users to intercept CommandEventArgs.

Is there a similar event for handling the strip buttons in the DockManager/DocumentWindow class when using DocumentMdiStyle 'Tabbed'?

Thanks in advance.

Comments (3)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kevin,

Not the same way but DockManager has a WindowClosing event that fires when you click the close button and an ActiveFilesContextMenu event that fires when you click the files drop-down.


Actipro Software Support

Posted 13 years ago by Kevin Burt - Marketing Databasics
Avatar
Thanks for the swift response.

I've re-jigged the code to use the Document Window 'Closing' and 'Closed' events.

I do have one other question. When the 'Document Window Closed' event is triggered, the DockManager.DocumentWindows collection still contains an instance of the closed DocumentWindow. Should the DocumentWindow not be removed from the DockManager.DocumentWindows collection at this point?
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Well there is an option (true by default) that says whether document windows dispose when closed. If you set that to be false, you can close them but they will still be in the collection for reopening. Most people want them removed from the collection by default though. So the actual removal occurs when they get disposed. The dispose call happens after the close events fire. Hope that explains it.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 7 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.