01-24-2007 10:00 AM
01-24-2007 10:11 AM
What do you expect to do will all these controls after you've placed them there. Do you want to have a VI with no code or just a picture?
Anyway, the closest you can get is by using the picture control (examples) but you should note that it is not optimal for this.
Another option is creating "enough" controls, placing them where you can't see them and then using property nodes to control their positions, but you should note that executables do not have the ability to save VIs, so you won't be able to save it.
There are some other potential alternatives, but the real question is what your ultimate goal is.
01-24-2007 10:13 AM
I have done this in a number of apps based on the hint provided by JPD in this thread.
http://forums.ni.com/ni/board/message?board.id=170&message.id=24161#M24161
(see reply #11)
other examples of picture control use can be found in this thread.
http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true
The pic control was alos featured as one of Darren's Nuggets here.
http://forums.ni.com/ni/board/message?board.id=170&message.id=212920
Here is an example of the results.
I hope this helps. If you come up with a better example, please share it with us.
Trying to help,
Ben
01-24-2007 10:37 AM
01-24-2007 10:42 AM
The app image I shared is customized by the customer to put the indicators (green dots etc) any where they want on the map the control.
The same app is used for many customers and is delivered as an exe.
Ben
01-24-2007 10:48 AM
Sounds to me like what you want is what I described in my second use case (have "enough" controls and change their properties using property nodes).
You will need a state of operations where the front panel is visible and the customer can simply use mouse events to grab the controls and drag them (change their enabled state to 1 so that they can't change their value).
Then, have a floating window which will show you the properties of the control and allow you to change them.
The last thing you need is to be able to save these properties to a file and to load and apply them later. The OpenG Variant Configuration VIs package should help you there (you will need to modify some of the VIs to save properties for a control). Note that some properties can not be written at run time (like the size, which needs to be controlled through other properties).
Sounds like a nice project, although you might find out that it is a bit more complicated then you expected.
See an example for how to control properties of controls here.
01-24-2007 10:52 AM
Let me add....
If it is at all possible to use tst's method, then DO SO!
My approach is not for the faint of heart and will send your head spinning
before you are done.
Ben
01-24-2007 12:35 PM
Thanks a lot for so many helpful suggestions.
One more question, is there any way to leave the orginal control there unchanged when we drag the control to the different position and just create a copy of the original control?
01-24-2007 12:50 PM
@michenglaoxu wrote:
One more question, is there any way to leave the orginal control there unchanged when we drag the control to the different position and just create a copy of the original control?
What about the code that goes with that control?
I was under the impression that you wanted to take an existing front panel with code and simply change its appearance.
01-24-2007 01:16 PM
Now I see where the limitation is to implment this in LV.
Propobaly, OO design (C++/JAVA) may work. in LV, it would be more complicate at least now out of my knowledge.
Anyway, thanks agagin, I will keep working on this and may change my idea ( since this is the initial design stage).
Thanks again for your kindly help.