08-12-2006 07:29 AM
In stuck on LV 7.0, but I don't think that matters; I don't see anything different in 8.0
My policy is for numeric indicators to be BOLD text, and be transparent (no frame, no background). Numeric controls, have the default frame around them, and plain text. I think this makes for a pleasing appearance.
I use STRICT typedefs when possible, but I understand there are times when it is not.
I have a certain cluster (TypeDef) which is arranged to be good looking. It's always been an indicator, so I TypeDefed (is that a word?) it with transparent frame and bold text. It works fine.
Now, I need to make the same cluster into a control, so the user can edit it. So, my question is, how can I use the typedef I have, yet change it to be a different-looking control? I realize that I can make it a non-strict typedef. But then every instance has to be customized. If I add or remove an itme from the master, all the CONTROL instances lose their frames, which I don't want to happen. If I make the master a CONTROL, then all the INDICATOR instances gain their frames, which I also do not want.
I've read this thread, but the advice doesn't work:
1... You can't use a typedef within a typedef unless you change it somehow: put it inside a cluster or array.
2... Even when you do that, if you change the master, one or the other of the slaves gets clobbered.
I suppose the only way is to make TWO typedefs, one fro controls and one for indicators, and add or remove items to BOTH. But that's against the purpose of typedefs.
Any other way out?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-12-2006 08:50 AM
08-12-2006 08:58 AM
Well, the STRICT aspect is not a requirement. It's not the STRICT aspect that's the stumbling block, as far as I can see.
If I could make it work with NON-STRICT typedefs, I would do that. But I don't see how.
I suppose it's a fundamental oxymoron: I want the typedef to force these things to be the same, but they have to be different.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-12-2006 11:34 PM - edited 08-12-2006 11:34 PM
Hi CMB,
While this isn't an answer to your question (which it looks like you figured out) - it is related to managing cluster-type-defs where there's a need to have a Strictly-typed GUI representation.
If you continue using type-defs, you'll probably come to a point where a GUI-friendly representation isn't program friendly. For instance, it may be nice to manage some data as an array of clusters, but present the data to the user in a multi-column list box. Or maybe the program-representation is an Enum, but you want the user to have a Menu Ring. I'll sometimes keep a program-friendly version of clusters and when these clusters need to be presented to the user, a translator-VI converts the program-friendly non-strict representation to (and from) a Strictly-typed GUI representation.
It's probably over-kill in this case - but someday you may find yourself sacrificing an elegant-diagram because the data-representation is [only] GUI friendly!
Cheers.
Message Edited by tbd on 08-12-2006 11:36 PM