spaghetti_developer Posted May 16, 2009 Report Share Posted May 16, 2009 Hi to All, Happen that I need to create unknow numbers of controls in my application front pannel. I wish I can programmatically load custom controls without know the number of them before to create my front pannel. Example: I want to create custom controls that take his property from text file; each line in text file is one control, the controls are grouoping in cluster of controls. I know that I easy create an Array-Controls that contain my custom controls and that I can insert it in TAB-Page of TAB-Control but, how I can add Tab-pages as first one I created if user add cluster controls in text-file? For this kind of problems I wish NI will add some methods that can help developer for programmatically add controls to application front pannel as other oop programming languages. Thank to all, and sorry for my english. Quote Link to comment
LAVA 1.0 Content Posted May 30, 2009 Report Share Posted May 30, 2009 Stay tuned. Ton Quote Link to comment
i2dx Posted May 31, 2009 Report Share Posted May 31, 2009 This wish has beend posted several times before, and the answer was always: we can't do this, because there is no way to connect controls to a wire at runtime (e.g. because there is no block diagram at runtime ...). My assumption is: even with the newly released scripting there is no way because scripting will not work at runtime, just at development time. Unless this task is easy to do in other programming languages, it will be hard to archive in LV, because IMHO this would require something like Objects by reference (in the C++ or C# sense of Object) Quote Link to comment
Aristos Queue Posted May 31, 2009 Report Share Posted May 31, 2009 QUOTE (i2dx @ May 30 2009, 09:28 AM) My assumption is: even with the newly released scripting there is no way because scripting will not work at runtime, just at development time. That is correct. Scripting requires recompilation, and there is no compiler in the runtime engine.Your best option is an array of controls... you can resize the array at runtime to display more or fewer controls. Quote Link to comment
Val Brown Posted May 31, 2009 Report Share Posted May 31, 2009 QUOTE (Aristos Queue @ May 30 2009, 09:28 AM) That is correct. Scripting requires recompilation, and there is no compiler in the runtime engine.Your best option is an array of controls... you can resize the array at runtime to display more or fewer controls. And you COULD even wrap that functionality into a VI that was called "Create..." and feed in which control to expose.... Kind of make an object out of if desired. 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.