Detect State Change of a ToolWindow

Docking/MDI for Windows Forms Forum

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
Is it possible to detect when the state of a ToolWindow changes? If not, would you consider adding a 'StateChanged' event to the ToolWindow class?

Comments (11)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Not yet, I'll add this to the TODO list.


Actipro Software Support

Posted 12 years ago by Anthony Martin
Avatar
I was wondering what the state of this feature was?
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry, it hasn't been added yet. If it's something you require very soon then you can read this page for some options:
http://www.actiprosoftware.com/Purchase/ConsultingServices.aspx


Actipro Software Support

Posted 9 years ago by Martin Merkel
Avatar
Hi
The request for a ToolWindow StateChanged event has been posted multiple times now over quite some years. It has been repeatedly stated by Actipro Software Support that this has been added to the ToDo list. However also in build 108 there seems to be nothing. Any chance that this will ever happen?

What I want to do is to move a ToolWindow become DocumentWinto into the first position (calling the MoveToPositionInTabbedMdiContainer method) in the document area.

I tried to get around the 'missing' event by catching the LocationChanged event, but despite that this is fired when I move a ToolWindow from Dockable to Tabbed Document, the State property is still Dockable in the delegate and will only change later. I suspect a StateChanged event handler would what is needed here.

[Modified at 11/29/2009 03:53 AM]
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Martin,

Sorry we haven't gotten to that yet. We get a lot of customer feature requests every day acrosss our product offerings so we have to priortize what we do. Keep in mind we probably get more feature requests via email than posted on the forums too.

This item is on the TODO list, but I can't say when it will be done. If it's something that is extremely important to you, there is the custom development option, where you pay us an hourly rate to implement it for you. You can find more info on that here and can request a quote if you like:
http://www.actiprosoftware.com/Purchase/ConsultingServices.aspx

We've had a lot of customers successfully use that option when their priorities may not align with ours. When we are hired to do work, we make it top priority (other than support).

As for your idea, what if you override OnParentChanged on your ToolWindow? Does that enable you to at least catch the scenario?


Actipro Software Support

Posted 9 years ago by Martin Merkel
Avatar
Hi,
I just asked as this request was raised about 4 (!) years ago and has been on the ToDo list since that time, which makes me wonder if it ever will happen.

I think I will try to play around with the OnParentChanged event and see if this may be a workaround.
Posted 9 years ago by Martin Merkel
Avatar
Hi,
after investigating the proposal to override the OnParentChange event and debugging to see if the ToolWindow has changed I come to the same result as with the LocationChanged event. What I in fact see is the moment I receive the event the ToolWindow is still in DockableInsideHost state and not yet in TabbedDocument. What I however need to know is when I am in the latter, otherwise a call to MoveToPositionInTabbedMdiContainer will return an exception.
So I guess, the only thing that would do is a StateChanged event. Or maybe somebody else has a suggestion or an example how to solve this issue.
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Martin,

We added a ToolWindow.StateChanged event for the next release and modified the order of a couple things so that you can call MoveToPositionInTabbedMdiContainer from it if you are in the MDI area. If you'd like to try a preview build, email us.


Actipro Software Support

Posted 9 years ago by Martin Merkel
Avatar
Hi,
thanks. It would be great to test this ToolWindow.StateChanged event. Just let me know how to obtain the update.

Best regards, Martin
Posted 9 years ago by Martin Merkel
Avatar
Hi,
late 2009 there was a short discussion on the ToolWindow.StateChanged event. The fix that actipro made available works quite fine, now I would like to inquire if, and when an official release including this functionality may become available.

Regards, Martin
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Martin,

It hasn't been released yet. It's all ready to go but we had some other support things come up that have taken our time. I would expect it out in the next week sometime.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) 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.