UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean button with different images and text

Solved!
Go to solution

Hi,

i have attached one image. it shows 2 buttons with its decal and Boolean text. how should i make this as two states of a single button?

 

False state- start icon with text "Test Start"

True state- stop icon with text "Test Stop"

 

when i tried to use image as a decal or picture item, entire button is replaced by the image. here i need the button structure too.

 

help me if you have any idea

 

thank you

 

Krishna_kp_0-1580196665102.png

 

0 Kudos
Message 1 of 8
(6,431 Views)

Hi Krishna,

 

as the decal stays the same for each state of a button you need to replace the whole image of the button for each state…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(6,404 Views)

HI GerdW,

Thank you for your time and effort.

By placing a picture ring on the button and controlling that based on the action?

0 Kudos
Message 3 of 8
(6,374 Views)

Hi Krishna,

 


@Krishna_kp wrote:

By placing a picture ring on the button and controlling that based on the action?


No, by customizing the button and using individual images for each button state…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(6,362 Views)

I'd suggest doing this with two buttons that are the same size and on top of each other.  Then using a property node I'd set the Visible on one, or the other.

 

Another UI design would be to have two buttons, but disable and grey out one and have the other enabled depending on the state of the test.  This does take up more UI space, but it avoids the potential issue of someone double clicking a start button, only for it to hit start, and then stop.  I've had some users do that before. 

 

So if you do go with a single button, or two over top of each other you may want to prevent stopping a test if one was just started less than a second ago or some kind of debounce.

0 Kudos
Message 5 of 8
(6,294 Views)

Hi GerdW,

 i tried this method too. but ending at same point, Only image with Boolean text.

i have attached the control for your reference (LV16).

correct me i i'm doing

Krishna_kp_0-1580274476053.png

any mistake.

0 Kudos
Message 6 of 8
(6,031 Views)
Solution
Accepted by topic author Krishna_kp

Hi Krishna,

 

you have to use the "whole" image as suggested before:

check.png

Boolean button, where I edited the whole image for each state (using a system boolean button and a modern LED to create them).

Not perfect, but sufficient.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(6,012 Views)

Thank you GerdW for your idea.

 I took picture of two states of Boolean button and used those as decal.

as long as we don't have an another direct option, this is perfect.😉

attached control.

 

 

0 Kudos
Message 8 of 8
(5,986 Views)