Tool window doesn't highlight correctly from another control

Docking/MDI for Windows Forms Forum

Posted 13 years ago by Anthony Martin
Version: 2.0.0073
Avatar
I have a main form that contains a custom user control that contains a treelist. This custom treelist has a dockManager property that is a reference to the main form's dockManager.

Each treelist node populates it's Tag property with a reference to an individual toolwindow. When I click on the node, what should happen is the toolWindow gets activated similar to what happens in a Window menu's Window List. My Window List works fine but not the treenode and it's similar code.

If the window is docked and I click the node, the tool window doesn't get highlighted. I double check my Windows list and it's menu item isn't checked.

However, if I undock the window and click the node, the tool window is brought to the front but not active.

Is there something special I need to do?

Comments (3)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
How are you showing the tool window when the node is clicked? Like what code are you using?


Actipro Software Support

Posted 13 years ago by Anthony Martin
Avatar
I'm using toolWindow.Activate(). I figured out that the problem is that the TreeView has the application focus. After I use the Activate command, I'm trying to use toolWindow.Focus() and that didn't work.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
ToolWindow.Activate will set focus to the tool window. Perhaps something like the mouse up of your click is recapturing it to the TreeView? Maybe try handling the MouseUp event instead of MouseDown or Click or whatever you are using now.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.