ToolWindowDragged question

Docking/MDI for Windows Forms Forum

Posted 7 years ago by Tom Johnson
Version: 16.1.0330
Avatar

Is there a way to to determine what tool window was dragged when the tool window dragged event is fired?   Visual Studio just generated EventArgs and not a ToolWindowDraggedArgs or such.  I was trying to use WindowFocused and assume that was the window, but that wasn't fired when I started the drag.

Comments (5)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

That event was created more to allow you to update the status bar during a drag operation to mention the ability to hold Ctrl to prevent docking so the user is aware of that.  It unfortunately doesn't pass any info along specific to any tool windows involved though.


Actipro Software Support

Posted 7 years ago by Tom Johnson
Avatar

Then, is there a good way to determine what changes to the layout have been made?   I am trying to declare the layout has changed when a previously docked window has been dragged, but not when moving a floating window around the desktop.

[Modified 7 years ago]

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

I don't believe we have an event for that.  For what sort of scenario did you want to know that event scenario?  Usually it doesn't matter because you simply load your serialized layout at app start and serialize the current layout as your app is shutting down.


Actipro Software Support

Posted 7 years ago by Tom Johnson
Avatar

Basically, for two things:

1. We have requirement to treat the layout like a document and the ability to save, save as, abort changes, etc.  The big thing is prompting the user if they want to save the layout on exit. 

2. There also does not appear to be any sort of undo feature.  So, thought about keeping X copies of the layout on changes around and just reverting to the copy.

[Modified 7 years ago]

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

1) What you could do for this is save to a string and compare the string to the previous layout.  That way you'd know if anything changed.

2) Thanks for the feedback on this.  It's helpful to know.  At the moment, there wouldn't be a way to achieve the undo feature.


Actipro Software Support

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.