LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't place tab control in a custom control or typedef?!

This is horrible. I can't define a new type that uses a tab control. So if I want to reuse my tab control I'm screwed.

The biggest question of course is WHY!?! Its a control, just like everything else. Methinks the National R&D folks took some shady shortcuts when they implemented the tab control, and its NOT just another control.

If anyone has figured out how to define a type that does contain a tab, please let me know...
0 Kudos
Message 1 of 5
(3,783 Views)
> This is horrible. I can't define a new type that uses a tab control.
> So if I want to reuse my tab control I'm screwed.
>
> The biggest question of course is WHY!?! Its a control, just like
> everything else. Methinks the National R&D folks took some shady
> shortcuts when they implemented the tab control, and its NOT just
> another control.
>
> If anyone has figured out how to define a type that does contain a
> tab, please let me know...

Define shady. The tab control was a big project, and as the release
date approached, the feature set was trimmed. Part of that meant no
control editor, and that means no typedefs. The development continues
though, and the features that were left out will be available in future
versions.

For a decent workaround, look
at using the Merge feature of the palettes.
Make a VI that contains your tab control and any diagram pieces that you
want to drop easily and quickly. Save the VI. Edit the control palettes
by clicking on the ... button on tacked up palettes or choosing it from
the edit menu. Make a new palete set. Choose which palette you want
the control added. Popup and Add a VI/Control... By default, the file
dialog will be set to show only .ctl files. Change it to also show .vi
files. Navigate to your VI and select it. After making any changes
you like, leave the palette editor saving your new palette set.

What you have now is an icon in the palette so that you can merge and reuse
the contents of the VI with any other VIs that you wish.

The big difference between this and a typedef is that changes to the definition
VI will not be reflected in the VIs where the contents have already been used.
Thus this doesn't completely replace what a typedef provides, but it does
provide some of the sa
me features.

Greg McKaskle
0 Kudos
Message 2 of 5
(3,783 Views)
I've spent a lot of time in commercial application software development, and I understand that features have to get trimmed...but, if the tab control doesn't behave like all the other controls, then it should at least be documented somewhere that "NOTE: Tab controls cannot be customized and cannot be part of a typedef." This note should be prominent on the document for the tab control, otherwise users don't find out until they try create a typedef, and even then, no error, no message, nothing, it just doesn't work.

Some LabVIEW developers design software before they implement. I designed mine thinking that a tab control behaved like all the other controls (because the reference didn't say any differently -- in fact, all the reference gives is a list of properti
es).

Corners get cut, but its "shady" to cut the corner and cover it up. If some of the controls are different, tell the users. Now I have to wonder are there other controls out there with incomplete behavior?

The workaround's fatal problem is your last statement:

"changes to the definition VI will not be reflected in the VIs where the contents have already been used."

This is exactly why I wanted to use a typedef, in fact, I can't think of any other reason to use a typedef really (I can accomplish the same thing as your workaround with simple cut&paste).

Honestly, I expect that I'm in the minority. I'd expect most of your user base will never know this feature is missing because they don't use typedefs. I however am trying very hard to build reusable components with LabVIEW and keep hitting roadblocks.

Any idea when the future versions are coming? I'm new to the National scene, are patches ever issued, or just full versions?
Message 3 of 5
(3,783 Views)
....
> This is exactly why I wanted to use a typedef, in fact, I can't think
> of any other reason to use a typedef really (I can accomplish the same
> thing as your workaround with simple cut&paste).
>
> Honestly, I expect that I'm in the minority. I'd expect most of your
> user base will never know this feature is missing because they don't
> use typedefs. I however am trying very hard to build reusable
> components with LabVIEW and keep hitting roadblocks.
>
> Any idea when the future versions are coming? I'm new to the National
> scene, are patches ever issued, or just full versions?

One benefit of typedefs is the fact they can be placed in palettes.
This aids in large project development since all members on the
development team will use the same building blocks. Typedefs
allow updates when the datatype changes, and strict typedefs allow
updates when other appearance properties change. These allow for
easier global changes to a project once VIs have been written. It
wasn't clear what you were looking for, so I offered a workaround.

Typedefs are used quite a bit by advanced developers, but you are
correct, many users do not need them because of the scope of their
project. We never like leaving features out, and you are correct
that the readme should document this. I don't have a full installation
in front of me, so I can't check whether it is there or not.

As for questioning every other control. There are differences between
the controls. Also, they may appear consistent to one person's view
of them, but inconsistent to another. We do strive to make them
consistent. This will be remedied in a future version of LV.

NI does release patches for software. They are called updates on the
web site, and the current one is 6.02. To minimize introduction
of new bugs, they do not normally contain anything as large as
allowing tabs to be taken into the control editor. The next
major version is always in progress, and I'm not at liberty to announce
a release date. If you are interested, you can contact tech support
and ask about beta testing.

Just so that you know ahead of time, I'm reasonably sure that the
typedef of a tab control will allow for control of the enum type.
A strict typedef will alow for control of the appearance. But
a typedef can contain only one control. Other controls placed inside
of the tab will not be a part of the typedef.

Greg McKaskle
0 Kudos
Message 4 of 5
(3,783 Views)
Has the issue of no typedef tabs been resolved in LV7? I am modifying a LV61 vi and severely broke the panel trying to convert a tab to a typedef. I was able to customize, however there was a compile/save error and all the embedded controls on the tab pages became hidden and un retrievable. I had not seen any documentation about restrictinos until I searched and found this thread. So, going forward, what is the current status?
Jim Henderson
0 Kudos
Message 5 of 5
(3,783 Views)