10-28-2008 10:00 AM
I'm looking to improve my code...
I have a small main vi (800x600) that contains a graph. I created a subvi (modal dialog) that will size itself to the user's actual display, and that contains a graph configured to "Scale object with pane." My main VI passes a reference to its graph into the subvi, and I can configure the subVI's graph to have the same x scale, y scale, cursors, value, etc. so that my subvi acts like a "full screen" view of the main VI's graph. I do this by using a big property node that reads about 10 properties using the incoming reference, and then writes them to a property node linked to the subVI's graph. This works well, but I wonder if it's not the best way. How can I copy all properties at once so that I can avoid making my list of properties to "copy" extremely long and/or incomplete?
(I don't want users to resize the main VI, because controls end up in undesirable locations)
Thanks,
Alan
10-28-2008 11:24 AM
Hi Alan,
Off hand the only way that I know of to accomplish what you are after is what you are trying to avoid. I have handled similar situations by making the graph in question into a VI that runs in a sub-Panel. The VI running in the sub-panel can be removed from the sub-panel and its FP shown if the user want to re-size it. The zip I posted here called Docking.zip shows how to manage the docking and un-docking. For your case I would make sure the graph was the only object on the FP and set teh FP to re-size objects with the screen.
Well.... I hope that gives you some ideas.
Ben