LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatic changes to front panel objects

I am trying to create a VI that might help a developer in the company to change a VI's front panel to adhere to the company standard look.  I am running into a few issues with some certain items.  I understand that everything I want probably won't be able to be changed from another VI.

 

Does anyone out there have a VI that they have created for this task they can share?  Or is there possibly a document out there that may outline programatic front panel object changing?  Just checking before I dive into the rabbit hole.

 

The first problem I am having is changing a string control or indicator.  I have got the basics of changing the label text.  I want to be able to change the unselected and selected background color of the box.  I also want to be able to change the highlight text color.  Also is it possible to change the border color?

 

Thanks for your help.

0 Kudos
Message 1 of 5
(966 Views)
Highlighted

Create a property node of a string control, referring to Text->Text.color->BG.color and FG-color

StringProperty.png

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 2 of 5
(955 Views)

Yamaeda,

 

Your property nodes didn't exactly get what I needed.

 

"I want to be able to change the unselected and selected background color of the box."

- The color needs to change when the user that is running the VI mouse clicks into the string box

 

"I also want to be able to change the highlight text color."

- Same here.  This is a color change that will happen when the user running the VI highlights text.

 

Sorry for the confusion.

0 Kudos
Message 3 of 5
(942 Views)

@JoeWork wrote:

Yamaeda,

 

Your property nodes didn't exactly get what I needed.

 

"I want to be able to change the unselected and selected background color of the box."

- The color needs to change when the user that is running the VI mouse clicks into the string box

I think to achieve this you will need to have some code running, like when text box selected, change color.  By using an event structure you could achieve this and the code yamaeda provided.

 

"I also want to be able to change the highlight text color."

- Same here.  This is a color change that will happen when the user running the VI highlights text.

Did you want to be able to change the color of the text highlighted or the highlight color? Changing the color of the highlighted text should be possible using the code yamaeda provided. Labview changes the highlight color when the back ground color is changed, but i couldnt find a way to actually set the highlight color.

Sorry for the confusion.


 

Regards,

Matt
0 Kudos
Message 4 of 5
(910 Views)