mje Posted December 21, 2010 Report Share Posted December 21, 2010 Is it possible to set the cursor for a VI which is embedded in a subpanel? I keep getting a null window error. Example code attached. I know I can set the cursor on the parent VI, but that's not what I'm after, I'd like to localize the busy state if possible? Something tells me I'm out of luck... SubPanelCursor.zip Quote Link to comment
asbo Posted December 21, 2010 Report Share Posted December 21, 2010 I know I can set the cursor on the parent VI, but that's not what I'm after, I'd like to localize the busy state if possible? Something tells me I'm out of luck... I had a desperate hope that the subpanel itself would have a mouseover event, but alas. Have you tried making the child VI set its mouse cursor and see if that has the desired effect? Quote Link to comment
Matt W Posted December 21, 2010 Report Share Posted December 21, 2010 (edited) Is it possible to set the cursor for a VI which is embedded in a subpanel? I keep getting a null window error. Example code attached. I know I can set the cursor on the parent VI, but that's not what I'm after, I'd like to localize the busy state if possible? Something tells me I'm out of luck... If you use a reference to the subpanel with a register for events node, you can switch the state when the mouse enters and leaves the subpanel. But when I tried it with the busy state on the leave event was only triggered when I left the vi and not the subpanel. Which I think is a bug in LabVIEW, but I'm not certain how the busy state is supposed to affect events. Edited December 21, 2010 by Matt W Quote Link to comment
SuperS_5 Posted December 22, 2010 Report Share Posted December 22, 2010 (edited) Hi, It seams that you have to use the dynamic registration terminals to get the appropriate events on your event structure. It seams like the Front Panel of the embedded VI is not accessable to windows, or whatever code LV uses in the set cursor primitive. Using this current vi ref like this allows for "localization" ....sort of. I hope this is what you wanted. It is very late, and I am seeing doubles. Edited December 22, 2010 by SuperS_5 1 Quote Link to comment
hugo_fr Posted December 22, 2010 Report Share Posted December 22, 2010 Another way is to pass the parent VI ref to the subpanel VI See zip. SubPanelCursor_PassRefByValue.zip Quote Link to comment
mje Posted December 23, 2010 Author Report Share Posted December 23, 2010 Thanks for the feedback! SuperS_5, your idea definitely works. The unfortunate side is far as that example goes, it requires the parent VI to be aware of the state of the contained VI. Adapting it to hugo's idea though should make everything work the way I'd like. Good ideas, thanks again. -m 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.