Francois Normandin Posted April 23, 2012 Report Share Posted April 23, 2012 Is there a way to have the VI running in a subpanel catch the right clicks (User menu) instead of the parent VI? A right-click on an empty subpanel returns "SubPanel" for the SubObj class name. When a subPanel is loaded, it will return the subpanel's control/indicator class. However the "User Menu Selection" event will run in the parent VI. Anyone knows a way around that? Quote Link to comment
drjdpowell Posted April 23, 2012 Report Share Posted April 23, 2012 I’ve used User Menus in VIs in sub panels before without problem. Perhaps I’m misunderstanding the issue. Quote Link to comment
Popular Post Francois Normandin Posted April 23, 2012 Author Popular Post Report Share Posted April 23, 2012 I made this test VI to show what I have. It seems I always get "one parent up" when I embed subpanels within subpanels... Weird. http://screencast.com/t/jNX95hOCFS (LV2011) DropVIContent_PaneUserSelection.vi 3 Quote Link to comment
mje Posted April 24, 2012 Report Share Posted April 24, 2012 Very nice demo of the behavior. Quote Link to comment
asbo Posted April 24, 2012 Report Share Posted April 24, 2012 Very nice demo of the behavior. Beautiful, in a way. Quote Link to comment
drjdpowell Posted April 24, 2012 Report Share Posted April 24, 2012 Oh, I didn’t know your were talking about Panes. I’ve not done that; just User Menus from controls inside a sub panel, which work fine. Quote Link to comment
Ravi Beniwal Posted April 24, 2012 Report Share Posted April 24, 2012 If you can fit the subpanel to pane, it shouldn't be a problem. If you can not, can you put a transparent tab control (fit to pane) behind the subpanel and use the menu activation of the tab instead? 1 Quote Link to comment
Francois Normandin Posted April 24, 2012 Author Report Share Posted April 24, 2012 I hadn't thought about the fact that I use "Pane:User Menu Activation" vs any other object directly. But it doesn't seem to be the culprit. It behaves actually as if I had made the subpanel with "transparent background", which it is not. Ravi, thanks for the workaround. For now, it will do just fine. Quote Link to comment
asbo Posted April 24, 2012 Report Share Posted April 24, 2012 If you can fit the subpanel to pane, it shouldn't be a problem. If you can not, can you put a transparent tab control (fit to pane) behind the subpanel and use the menu activation of the tab instead? Man, you are on fire with the transparent tricks. Quote Link to comment
mje Posted April 24, 2012 Report Share Posted April 24, 2012 I'm still curious if the behavior that is shown is by design or a fault. At best it seems peculiar to me... Quote Link to comment
Francois Normandin Posted April 24, 2012 Author Report Share Posted April 24, 2012 I think it is a fault, but it would be desired behavior for transparent subpanels. I just remembered AQ wanting to be able to click through a transparent subpanel. It's almost funny that the right-click works the way he wants but not the left-click... 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.