How do I change the visibility of multiple decorations in LabVIEW programatically? - user-interface

I am trying to make a number of front panel decorations hidden in LabVIEW by the use of a boolean control. I have figured out how to do this with one object fine and have made it work with multiple items however it is not very elegant to say the least (see attached image). While in this case I only have 5 elements what if I had an elaborate front panel and had many more decorations I wanted to hide? There must be a better way to do this.
Thanks in advance.
Cheers
It works, just not very efficient....

As you might now you can use a for loop to iterate over array elements. What I would suggest is in the initialization code of your application put the controls of interest on to arrays, and when a user clicks a particular button iterate over those arrays to execute the visible non visible property node call on your decos and or controls of interest.

Related

Dynamically load SubVI frontpanels

I want to display multiple SubVIs (each one has a set frontpanel with controls and indicators) in my main VI. The problem is: usually only 2 or 3 are active at the same time, the rest are deactivated.
Let's say I got an array of VI references for the active SubVIs. Is it possible to display the SubVIs in a table, where each SubVI gets its own row?
I'm basically looking for a container similar to a Tab Control, but instead of tabs I want to display the VIs row-wise.
Thanks in advance.
The best choice for you is sub panels. http://digital.ni.com/public.nsf/allkb/D587067E18E0E70186256D44007B91FE
Example:
https://decibel.ni.com/content/docs/DOC-18164
Also there is nice way with xcontrols, but it is complicated and takes more time to implement. Anyway below is link about xcontrols:
http://www.ni.com/tutorial/3198/en/
I was unable to place a Sub Panel (which shows a VI's front panel) in an array control, but I was able to place it and its VI reference in a cluster, and then place that in an array:
After that, you could set the VI Ref's visibility to hidden, and tweak the array's chrome. Going further, I don't know if LabVIEW provides a way to give that subpanel a VI reference when it's in a container, so your mileage may vary.

Looking for a specific control (sketch included)

I am looking for a control many of us probably know, but I don't know it's name and don't have a real screenshot by hand, just this sketch:
In the left box one can select an operation or whatever, which then is moved to the right side. With the up/down arrows on the right, one can move this operation (or whatever kind of meaning the entry has) up or down in the order of execution.
How is this kind of control called? Or is it normally build by developers out of single controls? Is this control available in JavaFX 2? If not, I don't need exactly this control, but a control with the following features:
User can select multiple operations (duplicates allowed) out of all available operations
The user can arrange their order of execution
Thanks for any hint :-)
You need to use multiple controls to build up your interface. Use two ListViews with a MultipleSelectionModel for each (or at least the left one) and add a couple of buttons, that copy selected items from one list to the other and another couple of buttons which modify the position of selected items in the right list view by modifying the view's underlying item list.
listView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);

How to implement a threaded view?

I need to implement a threaded view of sorts in an old VB6 app. It should look similar to this:
So, it's like a TreeView of sorts but there are buttons on the right (for each row) that could be pressed. The view does not need to collapse - it always stays in the expanded mode. The users should be able to respond to each node (via the comment button on the far right). And, of course, users should be able to scroll through the entries.
What are some of the ways I could implement this? I am open to 3rd party controls, paid or not.
VSFlexGrid has an outline mode. You can set the indent per row via the RowOutlineLevel property. It supports word wrap, images, etc within its cells/columns so you should be able to get pretty close to what you want. It also supports owner-drawn which lets you fully customize the cell painting (for example, to get those rounded corners).
I'm sure there are other controls out there as well...

Modifying a jQuery Plugin

I'm trying to modify Brian Reindel's Accessible News Slider plugin (sorry, it won't let me link to it and also to my work location), to allow a visitor to fill in multiple copies of a form, sliding back and forth between them. I need for the visitor to be able to add and delete copies of the form from the list. I've modified one of his examples and created a little function to add an element to the list. However, no matter how many times I call the function, it only adds one element, and the plugin is not aware of it; I can see it in the DOM Inspector, but that's it. What am I missing?
this is Brian. Since you're already using jQuery and the plugin, you would gain a great deal by using the library to append elements to the DOM within your custom function. I wanted to give you some guidance, since this is probably more work than you were inititally expecting. Here are some hopefully helpful tips:
The plugin calculates some wrapper
element widths based upon the number
of list items. If you add/remove list
items, then you would need to modify
the calculations that were made or
else it won't scroll properly. You'll probably experience the same types of issues for the click events on the next/previous buttons.
If you have events registered on
elements that you add/remove from the
DOM, then you will need to
re-register those events, since when
the elements are gone, so are the
events that were "bound" to them. It
doesn't look like this is your
problem though at this point.
If you're adding form elements to the
DOM on the fly using the "Add" link,
then the user's cursor focus is no
longer on the form elements, and the
slider is no longer really
accessible. As much as I love
plugging my own plugin, it was meant
mostly to demonstrate usable, custom styled accessible
JavaScript, and I'm not sure it is
flexible enough to do what you want
without some rework.
If you have more specific questions about how to do certain things to get you started on the right track, let me know, and I would be happy to help. Depending on how much you plan to use jQuery on your projects (and I highly recommend that you use it), try out the book Learning jQuery.

Moving items between two list boxes. What do you call this type of form?

What do you call a form with two list boxes and buttons to move the list box items from one to the other? I've always called it a "switch list".
Switch List http://img136.imageshack.us/img136/9123/formtypegh0.png
Mutually exclusive list
Double List?
To be very honest, I always thought it was called simply "Moving items between two list boxes".
Subset Selection Dialog
As silly as it may sound, I've always gone with "Dual-list Selector". Highly technical.
Where I work we call it an "Add Remove Box". Don't know why, it just happened that way and it has seem to stick.
Switch list is nice.
Exchange dialog is also fine.
Btw, do you also have a drag/drop interface?
Let's be a bit clearer about the functionality here ..
The way you showed it, it's basically a different way of doing a list that allows multiple selection (then I'd call it a 'chooser').
The more typical usage scenario I've seen is with some ordering functionality (implicit - the new item gets added to the bottom, or explicit with up/down/top/bottom buttons) to put the things in the 'added' list in a certain order.
Not sure what I'd call it then, because it's choosing and ordering .. ordered list chooser or selector.

Resources