09-07-2018 07:29 PM
@mcduff wrote:
I seriously did not see your ancient code,
I doubt I ever posted the old code, but here's how your code would look leveraging radiobuttons. 😄
Arguably simpler... And they even work in edit mode. 😮
(note that I made the container transparent)
09-07-2018 09:55 PM - edited 09-07-2018 09:56 PM
@altenbach wrote:
@mcduff wrote:
I seriously did not see your ancient code,
I doubt I ever posted the old code, but here's how your code would look leveraging radiobuttons. 😄
Arguably simpler... And they even work in edit mode. 😮
(note that I made the container transparent)
How did you change the buttons?
For the life of me I messed around with the Radio Button control and could not change anything besides the text.
09-07-2018
10:06 PM
- last edited on
09-08-2018
12:49 PM
by
altenbach
@altenbach wrote:
I guess I don't understand the question. A radiobutton control is just a special container for booleans (any type, flavor, amount) with some logic that only the last pressed is true.
The type is an enum containing the labels of the Boolean as item names. The value is the current selection.
Like clusters, you can arrange the elements any way you want (turn off autosizing, arrange horizontally, etc.)
Yes, before radiobuttons, we had to make our own logic. (Still need that for special versions. I have one where the last two are true ;))
(Posting by phone, cannot test you snippet)
(And please vote for this old idea :))
OMG shoot me now. I never realized you could just drag booleans in and out of it.
09-08-2018 11:59 AM
I also continue to Learn and Be Amazed by Altenbach -- his "Design Your Own Radio Button" observation of a Feature that NI built into this Boolean Control is simply amazing, and totally new to me. I'm now embarrassed to have my post to this question marked as a "Solution" -- Altenbach's Method is far superior, and I plan to try it out in my Project that I described a few posts ago.
Bob "Still Learning" Schor
09-09-2018 05:07 AM
The "Segmented control" from Flatline Controls is also just a modified radio button with heavily-customized system Boolean controls.
09-09-2018 11:23 AM - edited 09-09-2018 11:31 AM
@Kyle97330 wrote:
Alternately, you could use a tab control with the actual bit of the tab you'd normally put things in resized to zero height. It would eliminate the need to have actual code running that turns off any other Boolean that's part of the cluster that's already on. Not perfect, but it might be simpler.
See my tag cloud for " I hate Tabs " there is a beauty of an example replacing a Tab Container with a custom radio button and a sub panel.
By far more maintainable than A single vi with a "Tabasaurus Wrecks" front panel. Modular and configurable too. Just change the text on the radio button and link to a new vi or vi version to drop in the sub panel. Main UI doesn't have to change a byte to extend features!
Via phone. Kudos for links y'all
09-09-2018 11:30 AM
@Jeff B
https://forums.ni.com/t5/LabVIEW/tab-in-control/m-p/1869263/highlight/true#M633569
https://forums.ni.com/t5/tag/IHateTabs/tg-p/board-id/170
No need for kudos Jeff, next time I flash the Jeff B DAQmx sign, just be listening. 🙂
mcduff
09-09-2018 11:33 AM
Kudos anyway
09-09-2018 12:17 PM
Reduced to the basics, a tab control is basically just a horizontal radio button control with a dedicated area where each state can have an associated set of unique FP elements relevant to just that state. Nothing wrong with that. 😄
09-09-2018 04:28 PM - edited 09-09-2018 04:30 PM
@altenbach
@altenbach wrote:
Reduced to the basics, a tab control is basically just a horizontal radio button control with a dedicated area where each state can have an associated set of unique FP elements relevant to just that state. Nothing wrong with that. 😄
wrote:
Reduced to the basics, a tab control is basically just a horizontal radio button control with a dedicated area where each state can have an associated set of unique FP elements relevant to just that state. Nothing wrong with that. 😄
Except that we associated related controls by logical groups and then smushed all the code for those separate groups on 1 block diagram. I Hate Tabs. They are the Stacked Sequence Structures of the Front panel.
I'm not going to argue the appropriate use of either. :D. Will you?