12-09-2016 09:11 AM
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.
12-09-2016 09:23 AM
Create a property node of a string control, referring to Text->Text.color->BG.color and FG-color
/Y
12-09-2016 09:35 AM
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.
12-09-2016 10:54 AM
@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.
12-09-2016 11:04 AM
The "Object Highlight" method may be of use.
Ben