Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Button Click changes button image?
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.
Dean Roddey
Explorans limites defectum
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.
Dean Roddey
Explorans limites defectum
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.
Dean Roddey
Explorans limites defectum

Possibly Related Threads…
Thread Author Replies Views Last Post
  Increment web image widget NishanF 5 153 10-24-2019, 08:16 AM
Last Post: Dean Roddey
  Display of an Extended Wait for User Image kblagron 4 240 09-20-2019, 02:21 PM
Last Post: kblagron
  Image Browser? gReatAutomation 8 670 06-26-2019, 06:12 PM
Last Post: gReatAutomation
  Image Pack Previews Not Available gReatAutomation 4 460 05-22-2019, 04:51 PM
Last Post: gReatAutomation
  Missing how to tell CQC to read a Lutron keypad button pressed ghurty 7 861 01-08-2019, 09:55 PM
Last Post: Dean Roddey
Question Boolean image is in error state ghurty 4 1,514 05-24-2018, 09:04 PM
Last Post: ghurty
  Using Overlay and Static Image Browser kblagron 2 1,405 03-11-2018, 11:59 PM
Last Post: kblagron
  Russound V2 Driver - no install button bpaetzold 1 1,045 12-24-2017, 07:13 PM
Last Post: Dean Roddey
  How to Import a CQC Image Package KenC 9 3,986 10-28-2017, 04:38 PM
Last Post: KenC
  LoadOverlay helper button error dlmorgan999 9 3,267 09-10-2017, 01:22 PM
Last Post: dlmorgan999

Forum Jump:

Users browsing this thread: 1 Guest(s)