orko Posted February 13, 2006 Report Share Posted February 13, 2006 I whipped this up to enable dragging (selected) controls around on the FP while the VI was running. Of course, comments would be most welcome. I'm working on an optional perimeter check to make sure that the control doesn't get "hidden" off of the FP, and making this a sub-VI with a configurable input array of control refs (if possible). Are there any other useful features I could put in? Download File:post-3266-1139872912.vi Joe (orko) Quote Link to comment
Neville D Posted February 13, 2006 Report Share Posted February 13, 2006 I whipped this up to enable dragging (selected) controls around on the FP while the VI was running. Of course, comments would be most welcome.Download File:post-3266-1139872912.vi Joe (orko) Sorry, but I just don't get why you would want to move controls around while running?? If you want to display different controls in the same spot, use a tab control with all the controls and flip programmatically to the required tab sheet. Neville. Quote Link to comment
orko Posted February 13, 2006 Author Report Share Posted February 13, 2006 Sorry, but I just don't get why you would want to move controls around while running??If you want to display different controls in the same spot, use a tab control with all the controls and flip programmatically to the required tab sheet. Neville. Someone asked if it was possible. Actually it was a request from info-labview where the requirements were for raw display of multiple arrays wth indeterminate sizes, with the ability to compare side by side with large data sets. Evidently screen real estate was limited and they wanted a way to move the data sets around to compare against each other. Other than that I don't know much about the usefulness of this, but I've been fooled in the past thinking that I would never use a tool until that one fateful day... Cheers! Joe (orko) Quote Link to comment
jzoller Posted February 14, 2006 Report Share Posted February 14, 2006 Someone asked if it was possible. Actually it was a request from info-labview where the requirements were for raw display of multiple arrays wth indeterminate sizes, with the ability to compare side by side with large data sets. Evidently screen real estate was limited and they wanted a way to move the data sets around to compare against each other. Other than that I don't know much about the usefulness of this, but I've been fooled in the past thinking that I would never use a tool until that one fateful day... Cheers! Joe (orko) The need for moveable control objects is quite common in near-real time, large user base, highly dynamic environments (games ). The tight binding between front panel and code make it a little less common in the LV world. If you haven't seen it before, check out the example in your LabVIEW folder at examples/general/dynamicevents.llb/Dynamically Register For Events.vi for another method of moving controls while running. Quote Link to comment
orko Posted February 14, 2006 Author Report Share Posted February 14, 2006 The need for moveable control objects is quite common in near-real time, large user base, highly dynamic environments (games ). The tight binding between front panel and code make it a little less common in the LV world.If you haven't seen it before, check out the example in your LabVIEW folder at examples/general/dynamicevents.llb/Dynamically Register For Events.vi for another method of moving controls while running. Thanks for the example pointer. I knew I had seen it done somewhere before... It's funny, the thought of making a LED indicator (round and rectangle) version of BlackOut came to my mind as I was wiring this up! Hehe... I wonder how Battle Tank or Tempest would look in an XY plot... Probably much better than the originals! Defender of the Pong, Joe (orko) Quote Link to comment
Irene_he Posted February 14, 2006 Report Share Posted February 14, 2006 I think this moving control feature is pretty nice. One usage case can be that customer may want to layout their own screen, even for the same product, but they want different look for their own brand:-). I guess we can save the last locations of controls to a file so that when loaded up next time, it will keep the previous look. It's good that LabVIEW opens up more new opportunities. Irene Quote Link to comment
Mike Ashe Posted February 15, 2006 Report Share Posted February 15, 2006 Nice quick example. I can see uses for a user configurable interface. Some groups of users really really like to be able to customize where items are layed out. Do this to clusters of complex data and you could almost simulate a multiple document interface. We can already do that with system calls under Windows, but it is not portable to other platforms. Would be great to have as a generic subVI tool that we register some or all of the controls on a VI at startup time. Quote Link to comment
orko Posted February 15, 2006 Author Report Share Posted February 15, 2006 Would be great to have as a generic subVI tool that we register some or all of the controls on a VI at startup time. Working on it Quote Link to comment
orko Posted February 15, 2006 Author Report Share Posted February 15, 2006 New rev to fix the following: 1) Button 1 clicks are now the only ones which enable moving 2) Disable comment added. I was getting some freaky behavior when mousing off of the right-click menu items, so I enabled only Button 1 (left click on most mice) for movement. Also, added in a comment explaining that by disabling a control (such as an array or waveform graph) lets the operator click anywhere on it to move it. ... still trying to find time to make this a subVI Download File:post-3266-1140020604.vi LV 7.0 Joe (orko) Quote Link to comment
Mike Ashe Posted February 16, 2006 Report Share Posted February 16, 2006 Seems to work fine under LabVIEW 8 although you get a warning when it first opens (which you can ignore). Quote Link to comment
orko Posted February 16, 2006 Author Report Share Posted February 16, 2006 Seems to work fine under LabVIEW 8 although you get a warning when it first opens (which you can ignore). What is the warning message? Thanks for testing it out on LV8! Joe (orko) Quote Link to comment
jbrohan Posted February 16, 2006 Report Share Posted February 16, 2006 Here is my solution to the movable controls issue. There sometimes occurs a bunch of controls that work together and this approach deals with this issue. It does not use events, but polls the mouse button. A full description is included. LabVIEW 7.0Download File:post-230-1140106142.llb Download File:post-230-1140113726.zip 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.