LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Taggart

Get rid of per VI Control Style

Status: New

Every day I learn something new.

 

Why do we have this?

 

Taggart_0-1660164431768.png

I used to always wonder why when I had selected NXG style controls that sometimes creating a control from a subvi terminal gave me weird styling - as in sometimes. Now I know why, but I still don't understand why. Why does this exist? Is there a valid use case? Can we just get rid of it?

 

Taggart_1-1660164571912.png

 

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
6 Comments
rolfk
Knight of NI

I believe that Create control/indicator uses this to determine what style to use, except that the decision also seems to depend on what style other already existing controls on the FP have. And the style is a flag that can’t be changed in a control but you can customize the look that it won’t resemble it’s style flag anymore.

Rolf Kalbermatter
My Blog
Mads
Active Participant

The reason it is as today is probably because it leaves the decision of style/style mixing to the creator of VIs. I have e.g. system style set to be the default for new VIs, but sometimes I need to do customizations or use features that are not available in system controls (coloring for list boxes e.g.), and then I use another style (perhaps even editing it to look like system style as the others, but without the restrictions they sometimes have).

 

I think the best option would be to have the ability to attach or detach a control and/or VI from a common style option. The common style could default to the one set in the LabVIEW options, but should be overridable at several levels:

1. Options, 2. Project override, 3. VI/Library Override, 4. Control Override

 

And then I would like to have the ability to just select a bunch of controls (or VIs in the project window), right click and select: Style override 😊

Taggart
Trusted Enthusiast
If I am on the block diagram and I right click on a subvi terminal and click create control, I want it to match what I specified as the default in my LabVIEW ini. I create that control, wire it to the connector pane (maybe resize how may elements are shown if it is an array) and then I rarely do any more customization. That is of course assuming that the VI I'm working on is a subvi and not intended to be seen by a user. If I do that several times on a single clicking on various different subvis now my front panel looks like a hodge-podge. Some controls are modern, some are classic, even though I have told LabVIEW in the settings/ini that I want them to be NXG style. Why? Why can't LabVIEW honor my request? Because the developer of some subvi in vilib or some 3rd party toolkit decided that every time a create a control what style my controls are? Please explain a scenario where that makes any sense. If I do more customization, it is because the VI I'm working on is going to get shown to the user. In that case I am going to customize way more than just the style. So it makes sense to have to go to the palettes and specify exactly which style I want. If you get rid of it you can still customize things. LabVIEW just now honors the developers preference. If I ever want to override that, it is probably because this particular Vi is going to be seen by the user. In that case
Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
crossrulz
Knight of NI

Sam,

The proper solution for the last scenario would be to match the style preference of the VI.  If I use a really old VI that used "classic" style and I create a control from an input, I would much prefer the resulting control match whatever style I am using.

 

I am not able to get behind the removal of the style preference.  It is there to keep a front panel consistent.  But, as your scenario shows, it breaks when using a subVI with a different style preference.  I think that is what needs fixed.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Taggart
Trusted Enthusiast

It appears to be failing wildly at keeping things consistent.

 

Someone else point out (Christian - I think) that part of the problem is when creating new VIs using the new -> new dynamic method or static method that it starts by copying a VI which may have a different setting than your LV Ini file. I would assume this applies to all scripting tools. 

 

Getting rid of that flag completely would solve the problem. I think this causes more problems than it solves and causes really weird and hard to predict behavior.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Taggart
Trusted Enthusiast

How about an entry to the VI specific setting that just says "Use Global Default" and make that the default value? Then all the masochists who want the existing behaviour can have and it and the rest of us can stop fighting to have LabVIEW honor our preferences.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral