I have developed an application that allows the user to dynamically add toolwindows containing appropriate user content - I am displaying these in an inner fill. What I would like to do is identify the toolwindow that the user has decided to close through the close 'x' on the individual tool window title bar. Unfortunately I am having no luck in this.
I have an WindowClosingEvent set up that is successfully triggered when the toolwindow closed button is pressed, and in the code of the event I have used the ActiveWindow property to identify the closed toolwindow. This works OK if the toolwindow that is closed originally had focus/was active and highlighted. However, if I am closing a toolwindow that is not currently highlighted, the ActiveWindow is not set to the closed/triggered toolwindow.
Within the same event code, I have also tried looping through toolWindows and checking which element/toolwindow 'isSelected' but no luck, as all toolwindows onscreen are set to be Selected.
Please let me know if there is an easy way to identify the closed toolwindow. If there is an issue with doing this, is there a way to remove the close button from the toolwindow title bar, and therefore I can create my own close button in the ribbon bar/etc. to close only the toolwindow that is highlighted?
Thanks
I have an WindowClosingEvent set up that is successfully triggered when the toolwindow closed button is pressed, and in the code of the event I have used the ActiveWindow property to identify the closed toolwindow. This works OK if the toolwindow that is closed originally had focus/was active and highlighted. However, if I am closing a toolwindow that is not currently highlighted, the ActiveWindow is not set to the closed/triggered toolwindow.
Within the same event code, I have also tried looping through toolWindows and checking which element/toolwindow 'isSelected' but no luck, as all toolwindows onscreen are set to be Selected.
Please let me know if there is an easy way to identify the closed toolwindow. If there is an issue with doing this, is there a way to remove the close button from the toolwindow title bar, and therefore I can create my own close button in the ribbon bar/etc. to close only the toolwindow that is highlighted?
Thanks