Posted 19 years ago
by Dmitry Kaganovich

I’m trying to implement validation of my toolwindows (through “Validating” event) and even though validation fails and I set e.Cancel = true; I am still able to hide the window (if it’s docked) or navigate to a different tabbed documtent (if it’s tabbed) or click on a different floating window – it only seems to work for docked toolwindows.
I did notice that focus does stay with original toolwindow so I am unable to type anywhere else. However this becomes confusing. In the case of tabbed document windows, when validation fails, the focus remains with toolwindow1, but if user clicks on toolwindow2 and it’s brought to the front, the user can’t type in that window).
Any suggestions as to how I can work around this issue – it would be helpful to have some sort of cancelable event for before focused changed, this way if validation fails I would cancel any attempts to navigate away (will this work for floating windows?)
Thank you,
Dmitry
I did notice that focus does stay with original toolwindow so I am unable to type anywhere else. However this becomes confusing. In the case of tabbed document windows, when validation fails, the focus remains with toolwindow1, but if user clicks on toolwindow2 and it’s brought to the front, the user can’t type in that window).
Any suggestions as to how I can work around this issue – it would be helpful to have some sort of cancelable event for before focused changed, this way if validation fails I would cancel any attempts to navigate away (will this work for floating windows?)
Thank you,
Dmitry