Know when a WebContainer looses focus

I know there is debate on whether or not a container can “get” or “lose” focus but I’ll ask anyway. My main web page contains a treeview control and a container that lists transactions. I have placed a “transaction edit” container on the container that lists transactions. When a transaction is clicked, I make visible the transaction edit container. Now, if the user clicks outside the transaction edit container, I need to hide it. Is there a way to do this?

You can use the MouseEnter and MouseExit events of the container to know if the mouse is outside or inside it; set a page boolean property like MouseInTransactionContainer. Then if MouseDown happens in the WebPage and the mouse is out of the container, hide it.