LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reference Decoration inside tabs

I have been trying to change color of Decoration boxes. Using the tips suggested in this forum I was about to do that just fine.

Problem arises when I tried to change the color of decoration boxes that are located inside tabs. As soon as I drag decoration boxes from panel to a tab control, the index of the total number of decorations is one less. Yet I do not seem to be able to find the reference of this box anywhere else.

Can someone please help me?

Thanks,

FightonSCTrojan
0 Kudos
Message 1 of 19
(6,791 Views)
Use property Pages[] of Tab control. Index a page (tab) containing a desired decoration an use property Decorations On Page[]. One of the references is of your decoration.
Message 2 of 19
(6,791 Views)
> Use property Pages[] of Tab control. Index a page (tab) containing a
> desired decoration an use property Decorations On Page[]. One of the
> references is of your decoration.

Personally, I find it easier to make the thing being colored a Boolean.
You can customize it to change its shape to match the decoration if
you need to, and then you have a property node build in which doesn't
break when other things are added or removed from the panel.

Use an indicator or disable it to make it do nothing at runtime. You
might also consider locking it if it gets in your way editing.

Greg McKaskle
0 Kudos
Message 3 of 19
(6,789 Views)
hi,

but where is the Decorations On Page[] ?

David
0 Kudos
Message 4 of 19
(6,636 Views)
Pages[] is an array of references. Get one of them and wire it to a generic property node.
You can then select property Decorations On Page[]. This is an array, too.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 5 of 19
(6,631 Views)

Since the index associated with a particular decoration may change in the course of design, I developed the attached LabVIEW 2010 VI.  It shows as "broken" because it has to be embedded in a VI with a front panel which has tabs.  As shown, it tests the second tab on the front panel by turning off the visibility of an object for one second, then back on again, before moving to the next index.  I arbitrarily set the For Loop to 100 loops but you will get an error message when you run out of decorative objects.  The Front Panel of this VI displays a "Now Serving" counter.  When the object your are interested in disappears, its index will show in this indicator/

0 Kudos
Message 6 of 19
(6,085 Views)

I feel stupid as hell because I've been trying to change the color, move and make a decoration visible fo the last two hours.

 

I:

  • took your little vi, added a tab control with two pages,
  • put a while loop around the thing
  • added two decorations to each page of the tab control.
  • added two color controls to the property node and changed the boolean constant to a control.
  • and added an array size and indicator.

when I run it the vi it correctly indicates that there are two decorations on the page, but nothing else changes!   Aaarg!

would someone please explain or provide a complete vi for silly me to run?

 

I got onto this because I have a co-worker who's decorations suddenly changed colors without out her making any program changes. 

I discovered something else new to learn.

 

Thanks!

0 Kudos
Message 7 of 19
(5,714 Views)

Rather than us starting from scratch to make a VI that may or may not do what you want, why don't you attach your VI, we can look at it and figure out what you are trying to do, and fix it so that it works for you.

0 Kudos
Message 8 of 19
(5,708 Views)

feel even more stupid now... 🙂

 

 

thanks

0 Kudos
Message 9 of 19
(5,705 Views)

Do not feel "stupid" ( check the tag "I Hate Tabs":)

 

So, "decoration boxes that are located inside tabs"

 

That is an object inside a pane (not a ctl, not a Global, not a panel... not any type of FP object! that has a method) 

 

I Dislike Tab controls... The "control" is not a "control" as most FP objects-- It is a definition of "Panes,"  that may be interacted with from the main "Pannel"

 

A Tab Control is a series of "Pains"[SIC] It does not define a user interface.

 

The Tab defines the container(s).  Your Decorations, or other objects, cannot be "contained" at a higher level.

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 19
(5,694 Views)