LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you change the color of a raised triangle decoration programmatically?

Placed a raised triangle decoration on the Front Panel.
 
I want it to change color based on certain conditions (value ranges).
I cannot create a Property Node or anything else on this object.
 
I wanted to change its color based on the value of an event.
Message 1 of 11
(10,876 Views)
This is something you learn usually after a lot of sweat and tears...
Chilly Charly    (aka CC)
Message 2 of 11
(10,870 Views)
I second that! Thanks helping on the forums Chilly Charly!
 
Regards,
Prashanth
Message 3 of 11
(10,830 Views)

CC,

You are trully amazing!  You're an encyclopedia of knowledge. 

I didn't think you could actually change the properties of decorations.  And you proved me wrong.

Hope you had a good vacation and it's good to see you back!

RayR

Message 4 of 11
(10,818 Views)

Good day,

 

I haven't been able to learn how this program works!

 

Can you please help me to find out how to call those funcitons and how to assign them to specific decorations? Where do i find docuemntation for that?

 

Thanks a lot.

0 Kudos
Message 5 of 11
(8,364 Views)

On the diagram page of the example, click on the "Help" selection on the tool bar and make sure that "Show Context Help" is enabled. Now hovering your mouse over the components will show help for them. If you click on the help window's "Detailed Help" it will provide more information on these functions. They are located on the "Application Control" tool panel. You can copy, or drag and drop them from the example to where you want to use them as well. The first one, "VI" provides a "reference" the green wire, for the vi's panel, the second one "Pnl", provides an array of references to all the "decorations" on the front panel, which in this case is only the triangle. It gets more interesting if there are other decorations.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 11
(8,356 Views)

Hello ,

I have around three decorations that has to be modified programmatically, but all I could do with above method is change only one all the time.

How to modify decorations if there are multiple instances.

Regards,

ravi

 

 

0 Kudos
Message 7 of 11
(4,410 Views)

Index out other references from the array.  Build the references you want into its own array and feed that to a For Loop.

 

The trickiest part of the whole thing is knowing which references in that array pertain to which decoration.  The references are in order by the z-order of the decorations.

 

 

Note:  After I tested the snippet and cleaned it up, I added the two labels.  Well they also happen to be decorations and the fell within the first two of the z-order causing them to be affected.  So this snippet may not work exactly until the z-orders are rearranged or you pick the correct references out of the array.

 

But this will give you the idea of how to solve your question.

0 Kudos
Message 8 of 11
(4,397 Views)

Hi,

That was a quick reply.

Let me give more information about my requirement.

I have a front panel with both horizontal and vertical splitters. And I have decorations on multiple panes. Every time the decoration in first pane only used to change irrespective of changing the index of the array after property->decos[].

I have used panes property first and then decos[] which helped me to change decorations in that particular pane. I have attached how I implemented the solution and also overview of my front panel.

Panes numbering I have given is obtained by trial and error.

 

I didn't exactly followed your reply, but my problem is resolved.

 

Thanks,

Ravi

Download All
0 Kudos
Message 9 of 11
(4,379 Views)

You can give Panes labels. Then when you get the Pane References you can search by label. It should make it easier to search then by trial and error.

Snap14.pngSnap15.png

Search through the label array to find the pane you want.

 

mcduff

0 Kudos
Message 10 of 11
(4,363 Views)