LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the label text on an XControl via a property

Solved!
Go to solution

Hello all

 

I write various programs to assist with debugging of embedded software systems. I often need to convert a byte value into bits and then show which of these bits are true/false. This is easily done using  the convert-to-bool-array VI. However, I would like to create a control which will allow me to show a name for each bit field - much like the way registers are described in data sheets. The control will need to be a cluster of buttons and I can then show which bits are true/false and use the label of the button to contain the bit field name.

 

I have gone some way to creating this functionality in an XControl as this seemed best. My cluster of booleans updates correctly according to the byte value fed into the control. However, I am using a property to set the boolean control label text (bit field names). My debugging shows that the text is assigned to the label of the control, but the control front panel never changes. I have tried synchronous updates and forcing a redraw of the panel using DeferPanelUpdates to no avail.

 

I would be grateful for any help on this - VI and XControl demonstrating the issue is attached.


Thanks


Ray

0 Kudos
Message 1 of 3
(3,056 Views)
Solution
Accepted by topic author Radiator

Probably, because you try to change the label text.  Try to change the caption text....

 

For each boolean, choose "visible items-captions"...

 

XControl.png

Message 2 of 3
(3,050 Views)

Thanks Jean-Marc. I had forgotten that label text changes require a VI recompile. 

0 Kudos
Message 3 of 3
(3,015 Views)