Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Button Click changes button image?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to have a button (on or off) so that when you turn on a device with the button press, the button changes images to the same button of another color so that it indicates state?

Here would be an example. So this shows the device is at 25%. If I were to click 100%, then the 100% button would be in red and the 25% button would revert back to the dark color version.

[Image: Screen-Shot-2019-08-04-at-15-08-36.jpg]
How about a Variable Check Box?

I could always overlay a Field Boolean Image atop the actually button but this seems like overkill
You can set images. If you give the widget a name, it shows up as a target in the action editor. If it supports images, then it should have a command to set the images.
Thanks. I see that now. For some reason I can change the current image in action settings but not another button. That is, I click on HIGH and can change that button image to a Pressed button. Now, I click on MEDIUM and the MEDIUM button changes to the Pressed button.

I need to change the HIGH button back to the Unpressed button but when I add that command in the HIGH button action settings the MEDIUM button image does not change.

The goal is to be able to have the button show as Pressed for the currently selected speed on the fan (ie, show state). The wrinkle is that the fan has Off, High, Medium, and Low so a boolean image will not work.
You are targeting the medium button in the action from the high button and it doesn't update? Keep in mind that you are only setting the image, not the state. The pressed image only shows up when the button is actually pressed. If you want to change the unpressed image of the other button you have to set the unpressed image.

You aren't thinking, by any chance, that you have to set the pressed image only the fly when a buttin s pressed, are you? You don't need to do that. Just set the pressed and unpressed images in the configured widget and the pressed image will be used when the button is pressed.
I can set a Pressed image when I press a button. For fan speed I have HIGH, MEDIUM, LOW, and OFF.

When I press HIGH, I can change the HIGH Unpressed image to the Pressed image.

When I press MEDIUM, I can change the MEDIUM Unpressed image to the Pressed image.

The issue is that the HIGH Pressed image still shows.

I want to only have the Pressed image showing for the button I press or if the state is that of the button (that is if state of that driver field is HIGH and I load the IV, I would expect to have the HIGH Pressed image showing).
You don't want to do it that way. You are going to mess things up. You need to leave the pressed and unpressed images as they are because they are used by the system to indicate pressed state.

If you want to change something like that, use a check box instead. It has separate unpressed images for checked and unchecked states, and you can just toggle the checked state to do what you want to. Use static check boxes since this isn't driven by a field. Static ones just have an internal checked state that you can set via a command.