mje Posted November 15, 2012 Report Share Posted November 15, 2012 I have an application that has several different data views, any number of which could be open at a time in their own window. Many views track mouse movements and display context information by showing small frameless panels, and hiding them when not relevant. I'm having trouble though capturing mouse events when the cursor "leaves" a window by moving on top of other windows which are higher on the z-stack. Basically none of the control, pane, or VI mouse leave events fire since the mouse technically never left any of the respective boundaries, so I'm left with an orphaned tooltip window until the mouse happens to stray back to the window. This video quickly demonstrates as much: http://www.screencast.com/t/aRCEDlqWVG Now I can think of a few ways to fix this such as having each view broadcast an application level event to the effect of "Hey I have the cursor now so the rest of you hide your tooltips," but that seems inelegant. Surely there's a way to manage this locally without starting to throw around global brodcasts? We want the tooltips to display even if the window does not have focus, so tracking focus is not really an answer. Quote Link to comment
ShaunR Posted November 15, 2012 Report Share Posted November 15, 2012 (edited) I have an application that has several different data views, any number of which could be open at a time in their own window. Many views track mouse movements and display context information by showing small frameless panels, and hiding them when not relevant. I'm having trouble though capturing mouse events when the cursor "leaves" a window by moving on top of other windows which are higher on the z-stack. Basically none of the control, pane, or VI mouse leave events fire since the mouse technically never left any of the respective boundaries, so I'm left with an orphaned tooltip window until the mouse happens to stray back to the window. This video quickly demonstrates as much: http://www.screencast.com/t/aRCEDlqWVG Now I can think of a few ways to fix this such as having each view broadcast an application level event to the effect of "Hey I have the cursor now so the rest of you hide your tooltips," but that seems inelegant. Surely there's a way to manage this locally without starting to throw around global brodcasts? We want the tooltips to display even if the window does not have focus, so tracking focus is not really an answer. Try using the "Mouse Leave" event of the pane? Although your last comment (tooltips display when it doesn't have focus) seems contradictory so that might not be what you are after. Edited November 15, 2012 by ShaunR 1 Quote Link to comment
mje Posted November 15, 2012 Author Report Share Posted November 15, 2012 Negative, the control, pane, or VI mouse leave event does not fire. Argh! Nevermind. It does fire. Stupid stupid stupid. (Found a typo in a string constant.) 2 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.