LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

colour change to buttons

Solved!
Go to solution

Hello,

 

         I have a series of buttons placed side by side. I'm changing focus from one button to another using navigation keys. Now the problem is the focus is not clearly visible. Is there any option to do it? 

         I got some idea of using colour change option, when focus is on one button change its colour to some specific colour and rest to some other specific colour. But i'm not able to implement it clearly. so please give me some idea..

 

Thanking you,

sushmith

Thanking you,
Sushmith
0 Kudos
Message 1 of 7
(3,408 Views)

Maybe you can use property nodes to see if a button is on focus. I'm not able to check it now, but I think that Key Focus (property) does this job.

Then, create an architecture that see which button is on focus. Write the new colors to this button (also using property nodes, but I don't remember any now).
This isn't the solution, but as you asked, it's an idea.

 

Regards and good luck.

Mondoni
0 Kudos
Message 2 of 7
(3,384 Views)
Solution
Accepted by sushmith_ks

If you want to change the color of a button, you have to watch out which type of button you're using.  Not all buttons can have their colort changed.

If youre looking for a professional look, you don't want to make a colorbook either by changing every button into another color.

What you can do is putting behind each button an LED indicator which is slightly bigger then the button itself.

When the button have the focus, set that indicator to true.  And it will light up.

It's a bit more work, but it look so much nicer.

Personally I don't like to mess with colors.  I love simplicity.  Thats why I use systembuttons, which have a blue surface already when they have focus

 

Hope this helps

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 3 of 7
(3,377 Views)

yes...definitely do not make it look like a "coloring book" Smiley Mad . I would use the disabled property nodes....

0 Kudos
Message 4 of 7
(3,363 Views)

You can use the KeyFocus property with the Object Highlight method to temporarily highlight the control that has the focus. See the attached exemple, use the Tab key to switch focus (LV2012).

 

Ben64

 

Highlight Focus.png

0 Kudos
Message 5 of 7
(3,333 Views)

Try something like this.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 7
(3,332 Views)

Unfortunately blinking doesn't work well with some type of controls like numeric and string because you need to click the enter key before they start blinking.

 

Note: Your use of char = 9 is a good thing, there is no need to check focus for every key pressed.

 

Ben64

0 Kudos
Message 7 of 7
(3,327 Views)