dblk22vball Posted February 20, 2009 Report Share Posted February 20, 2009 I am trying to create a program that will allow the company to interface with some test fixtures. Obviously, sometime in the future there could be more (or less) test fixtures than there are currently. I was wanting to be able to add/remove controls as needed (see attached pic for control). The basic information I need for the fixture is the name and the ip address, but I would like the user to be able to update all or only certain fixtures if so desired, hence the checkbox. Would this require some vi scripting to do or is not possible either way. Sorry if this is mentioned somewhere else, I was unable to find it. Quote Link to comment
iannicholson Posted February 20, 2009 Report Share Posted February 20, 2009 Could you build a cluster containing the three controls and add this to an array control? Then you could add or remove elements from the array at runtime. -Ian Quote Link to comment
Grampa_of_Oliva_n_Eden Posted February 20, 2009 Report Share Posted February 20, 2009 QUOTE (dblk22vball @ Feb 19 2009, 11:29 AM) I am trying to create a program that will allow the company to interface with some test fixtures. Obviously, sometime in the future there could be more (or less) test fixtures than there are currently.I was wanting to be able to add/remove controls as needed (see attached pic for control). The basic information I need for the fixture is the name and the ip address, but I would like the user to be able to update all or only certain fixtures if so desired, hence the checkbox. Would this require some vi scripting to do or is not possible either way. Sorry if this is mentioned somewhere else, I was unable to find it. Two methods are generally used for this type of situation. 1) Use and array of clusters - the array size can change no complications. 2) Cluster with "extra" sets of controls that are hidden until required. otherwise you could use a picture control and a LOT of support code to "Create Controls on the Fly". Ben Quote Link to comment
dblk22vball Posted February 20, 2009 Author Report Share Posted February 20, 2009 i had the array/cluster idea too, but wasnt sure if there was another way. hmmm, ok, thanks. Quote Link to comment
Phillip Brooks Posted February 20, 2009 Report Share Posted February 20, 2009 QUOTE (neBulus @ Feb 19 2009, 11:39 AM) Looks like a XControl to me Quote Link to comment
jdunham Posted February 20, 2009 Report Share Posted February 20, 2009 QUOTE (dblk22vball @ Feb 19 2009, 08:44 AM) i had the array/cluster idea too, but wasnt sure if there was another way. If you use an array of clusters, hide the index element (which hardly any non-labview programmer can understand) and show the vertical scrollbar. It's still confusing for people to use the concept of right-clicking on the border of cluster to delete it. If it were me, I would implement a listbox with 1 element selected, and then you could edit the IP address of the selected listbox item in a separate control, and you could have a delete button, and you can show the checkmark symbols to show which ones are enabled. You have to code up all the handling yourself, but it should only take a half day or so. Quote Link to comment
Mark Yedinak Posted February 20, 2009 Report Share Posted February 20, 2009 QUOTE (jdunham @ Feb 19 2009, 11:17 AM) If it were me, I would implement a listbox with 1 element selected, and then you could edit the IP address of the selected listbox item in a separate control, and you could have a delete button, and you can show the checkmark symbols to show which ones are enabled. You have to code up all the handling yourself, but it should only take a half day or so. This was my thought as well. By doing this method you could read the list of fixtures from a file or a database and populate the list box with the appropriate data. You could also have different connection types for your fixtures if needed. Internally you have an array of clusters with all the necessary data. You could then pass the individual cluster of the desired fixture to whatever needs it. Quote Link to comment
huotom Posted February 26, 2009 Report Share Posted February 26, 2009 QUOTE (Phillip Brooks @ Feb 20 2009, 01:05 AM) Looks like a XControl to me How ugly it is! 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.