stopping editor component

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I have create a control which could be edited. That is you could double
click on some shape in my view and I will popup and editor.
Such as a TextBox, an "advanced" UserControl and so on.

Now I would like to stop editing if the user click outside my control, go
elsewhere, etc.....

My initial implementation was to show the editor in a borderless window.
The advantage with that is that I could use the *Inactivate* event of
the windows to know if the user clicked outside, use CONTROL+TAB and so on.


But, ideally, I would like to simply add my editor as a child control of my
control but I don't know how to track wether or not the user *leave* the
control.

I cannot use the *LostFocus* event either as, in the case of a UserControl,
the focus could simply go on a child control and then I loose track of it.


I think I probably have to use a message filter, but I'm not sure which
event / message id, would give me the information I need.
Any thoughts? links? ideas?
 
Back
Top