LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulate Decoration on a Ctrl Programmatically

Can't find a decoration refnum from a ctrl refnum.

 

This is a work around.

 

If you look the other way around, what component of a ctrl can you show/hide programmatically?

Label, Caption, Boolean Text, and Shared Variable/DataSocket, ...

Yes. Text component can have a decoration as background.

For boolean ctrl, the best option is the boolean text.  It offers both visual effects and mouse tracking;

for string ctrl, the best option is the caption...

 

You can show/hide, move, and resize a decoration programmatically.

If your decor is an NI vector, you can also change its color programmatically.

You can also try Vertical Arrangement...

 

The attached example is a spherical boolean ctrl.  It show/hide the decoration when mouse hover/leave the ctrl.

The ctrl itself is made of 2 half spherical decors from the thermometer ctrl.  The bottom half is the button; the top half is a decor.  You can have up to 2 decors which change shape/color when boolean state change.

 

image.png

 

 

George Zou
Download All
Message 1 of 3
(317 Views)

The movie was "interesting", but I'm not certain "why" or "how" (or maybe "where") this would be useful.  I'm also not entirely certain (even having seen the movie and poked around a little with the control -- thank you for including it, by the way) I'd be able to put together something logically/programmatically similar for myself.  

 

How are you using this new "decorated" Control?  What added benefit does it give you?

 

Bob Schor

0 Kudos
Message 2 of 3
(273 Views)

The main purpose of this post is to demonstrate a method to manipulate a decoration on a ctrl.  Any ctrl, not just the spherical button.

It provides a workaround for request like:

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-access-to-embedded-control-decorations/idc-p/4325...

 

The button itself also demonstrate a method to use decor to fill the missing part of a button.

 

 

George Zou
0 Kudos
Message 3 of 3
(261 Views)