02-22-2023 01:07 PM
Hello!
I want to programmably change the type of button after pressing (using Labview 2015 SP1, Silver pallet).
What is the parameter responsible for switching the appearance of the button? I want to have the following sequence:
- in the beginning (during initializing), the button looks like a "record button"
- after the first click it should change appearance to "pause button"
- after the next cleck it should change appearance to "play button"
- any next click cycles between "pause button" and "play button" appearance
Is there a parameter to change the icon (only) or type of button in these built-in types of button on the fly?
Or making 3 buttons and later changing their visibility and/or disabling them is the only way?
02-22-2023 02:29 PM
I believe you can have separate decals for each state? So TRUE (pressed) = "Pause" decal, FALSE (not pressed) = "play" decal.
02-22-2023 04:09 PM
Make the button transparent. Put a picture ring underneath it.
(I hate buttons that change their function. I prefer a separate button for each function)
02-22-2023 05:11 PM
@paul_cardinale wrote:
Make the button transparent. Put a picture ring underneath it.
(I hate buttons that change their function. I prefer a separate button for each function)
It's not really changing it's function if you consider TRUE to select one case and FALSE to select the other.
02-23-2023 02:23 AM
Can it be changed as "Property Node"? I can't find where
02-23-2023 02:25 AM
From what I understand you actually need two buttons, best would be three. and you put them on top of each other.
The second one would change the decal between PLAY and PAUSE, that's easy. Or you make one PLAY and PAUSE button and programmatically hide the other one. The first button is also hidden after first push.
02-23-2023 03:14 AM
@YePererva wrote:
Can it be changed as "Property Node"? I can't find where
No! You can not change the "decals" programmatically. Most likely this was done on purpose. Decals in LabVIEW are by default not just bitmap images but LabVIEW specific vector objects. There is no easy way to create them yourself.
You can custom edit a control and replace the decals with another LabVIEW decal from another control or with a bitmap of your own, but this can only be done interactively and at edit time. If you replace it with a bitmap its scaling gets pretty ugly when you resize the button since bitmaps are not easy to scale nicely.
02-23-2023 05:19 AM
You could also use a picture ring and a "Mouse down" event on it.
02-23-2023 06:07 AM
You could put three buttons on different pages of an invisible tab control.
Then change tabs as needed based on which button is pushed.
Simple example attached.
02-23-2023 09:04 AM
@billko wrote:
@paul_cardinale wrote:
Make the button transparent. Put a picture ring underneath it.
(I hate buttons that change their function. I prefer a separate button for each function)
It's not really changing it's function if you consider TRUE to select one case and FALSE to select the other.
Belatedly, I realize this is a THREE button solution. Sorry, Paul.