Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Button Click changes button image?
#1
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]
Reply
#2
How about a Variable Check Box?

I could always overlay a Field Boolean Image atop the actually button but this seems like overkill
Reply
#3
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
Reply
#4
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.
Reply
#5
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
Reply
#6
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).
Reply
#7
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to have an image displayed that is not imported? ghurty 3 1,230 04-28-2020, 04:22 PM
Last Post: Dean Roddey
  How to have a button go through three options? Such as changing floors? ghurty 6 1,770 04-28-2020, 04:21 PM
Last Post: Dean Roddey
  Timers Driver / Field Time Image / Seconds gReatAutomation 1 1,343 03-16-2020, 05:48 PM
Last Post: Dean Roddey
  Issues after Acronis True image clone Ron Haley 4 1,997 02-14-2020, 03:44 PM
Last Post: Dean Roddey
  Changing WebRIVA Splash Image? gReatAutomation 4 1,980 01-07-2020, 05:28 PM
Last Post: gReatAutomation
  Increment web image widget NishanF 5 2,307 10-24-2019, 08:16 AM
Last Post: Dean Roddey
  Display of an Extended Wait for User Image kblagron 4 2,268 09-20-2019, 02:21 PM
Last Post: kblagron
  Image Browser? gReatAutomation 8 3,051 06-26-2019, 06:12 PM
Last Post: gReatAutomation
  Image Pack Previews Not Available gReatAutomation 4 2,167 05-22-2019, 04:51 PM
Last Post: gReatAutomation
  Missing how to tell CQC to read a Lutron keypad button pressed ghurty 7 3,174 01-08-2019, 09:55 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)