sand of time Posted December 11, 2006 Report Share Posted December 11, 2006 Hi I want to add controls when the vi is running , so I download some OpenG Packages that included the function "New VI Object" , can I use it to build a control on front panel ? There is no help document about it , is there anybody can help me ? Thanks very much ! Bin Wu Quote Link to comment
Jim Kring Posted December 11, 2006 Report Share Posted December 11, 2006 HiI want to add controls when the vi is running , so I download some OpenG Packages that included the function "New VI Object" , can I use it to build a control on front panel ? There is no help document about it , is there anybody can help me ? Thanks very much ! Bin Wu Adding a new control to a front panel is considered to be editing a VI and is not possible while the VI is running. The "New VI Object" function can add controls to the front panel, but only on VIs that are in edit mode. Quote Link to comment
sand of time Posted December 12, 2006 Author Report Share Posted December 12, 2006 Adding a new control to a front panel is considered to be editing a VI and is not possible while the VI is running. The "New VI Object" function can add controls to the front panel, but only on VIs that are in edit mode. Thanks for your help! Quote Link to comment
Mike Ashe Posted December 12, 2006 Report Share Posted December 12, 2006 You can, however, "simulate" addition of new controls, assuming that you want to add several instances of the same type of control, you make them ahead of time, say 10 (or 20, whatever) then hide them and/or keep them off screen, then as your user requests them, move them into position and unhide. To the user it will look like the control was made. The downside is trying to set a reasonable limit on how many to premake. Are you making some type of GUI layout editor? What is your end application? Another possibility is to use the picture control for your editing canvas, using images of controls, then create a copy of a VI off to the side from a template and then add the controls using New Object. The copy would not be running and therefore you could add the controls. YMMV Quote Link to comment
sand of time Posted December 14, 2006 Author Report Share Posted December 14, 2006 You can, however, "simulate" addition of new controls, assuming that you want to add several instances of the same type of control, you make them ahead of time, say 10 (or 20, whatever) then hide them and/or keep them off screen, then as your user requests them, move them into position and unhide. To the user it will look like the control was made. The downside is trying to set a reasonable limit on how many to premake. Are you making some type of GUI layout editor? What is your end application?Another possibility is to use the picture control for your editing canvas, using images of controls, then create a copy of a VI off to the side from a template and then add the controls using New Object. The copy would not be running and therefore you could add the controls. YMMV Thank you! But it can not creat controls dynamically, because the number of controls is certain. I think I have made a mistake, my opinion does not accord with logic. Thanks for your helps, I learn a lot in this forums. Bin Wu :thumbup: Quote Link to comment
Mike Ashe Posted December 15, 2006 Report Share Posted December 15, 2006 Thank you!But it can not creat controls dynamically, because the number of controls is certain. I think I have made a mistake, my opinion does not accord with logic. Thanks for your helps, I learn a lot in this forums. Bin Wu :thumbup: Yes and no. You cannot add controls dynamically to a VI that is running or to the creating VI (yet), but you can use and editor VI to create another VI (that is not running) and then at the end of the edit process, run the new VI.What is your application? What are you trying to do? Perhaps if we knew that we could suggest alternatives. 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.