06-26-2013 08:37 AM
I've been (consistently) using Modern controls, but for a new Project (and a spiffier-looking Front Panel), I started using controls and indicators from the Silver palette. So that my sub-VIs have some visual consistency, I wanted to use Silver there, as well (I especially like not having to change the names of the default Error In and Error Out to "Error In" and "Error Out", which has been my own "style" with the Modern controls).
I can't find the Variant control (which I want to put inside a Silver Cluster). Is it simply "not there" (and are there plans to create it, given that this is no longer the Silver Anniversary of LabVIEW?). If so, are there hints on how I could "build my own"? If not, where is it?
Bob Schor
06-26-2013 09:39 AM
The Silver controls were designed for user interfaces, not as a general replacement for Modern controls, so there are some controls that do not have Silver versions. (There are also some Silver controls that we want but haven't gotten staffed to implement yet, e.g. tab controls and radio buttons).
However, someone inside NI wanted a Silver Variant recently and made the attached version. It looks pretty good without the scrollbar visible, but unfortunately the scrollbar is drawing at the wrong size and I don't think I can fix it without making changes to the LabVIEW executable itself.
It is possible to "make your own" Silver style controls using the Control Editor - you can copy/paste the decorations from the Silver controls into the parts of other controls. There are limitations, however, such as not being able to edit some things (such as scrollbar style) in the Control Editor.
06-26-2013 09:49 AM
You might want to read this nugget
Be just a bit careful. There are some versions of TestStand that get confused by leading caps on Error Out. That has since been addressed
06-26-2013 10:31 AM
Thanks for pointing me there. I agree with the general sentiment. I did know about the problems with TestStand (which I consider a "bug" in TestStand), and am glad that there may be some move towards "cleaner style".
I'm a bit of a Style believer (brought on by some of the atrocious-looking code I've seen students, most of whom have "just picked up LabVIEW" with no benefit of even a consultant to ask questions, but some of whom are my colleagues). I like "proper case" on Controls, short descriptive names (for "neatness"), and no defaults on the Label. I also tell students/colleagues to always (a) write Documentation for every VI that, at a minimum, defines all the Inputs and Outputs, with Types and defaults (if not obvious -- I don't bother mentioning the Error defaults, nor those for numerics or Booleans unless they are changed on the Front Panel), (b) make an Icon, if nothing more than a box with the VI's name, and (c) keep it to a "reasonable" size, using sub-VIs if it starts to sprawl. [Not everyone listens -- when I commented to a colleague that his VIs were so large they overflowed his dual-screen setup, instead of encapsulating sprawl in sub-VIs, he went out and bought two much larger monitors!].
BS
06-26-2013 10:35 AM
Oops -- I forgot to make a Shameless Plug. In my early days trying to learn LabVIEW and how to be a better LabVIEW programmer, my Most Influential Book (after Travis and Kring's LabVIEW for Everyone) is Peter Blume's The LabVIEW Style Book.
BS