Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bool Button doesn't support runtime changes of the on_image or off_image #2113

Closed
kasemir opened this issue Jan 26, 2022 · 0 comments · Fixed by #2114
Closed

Bool Button doesn't support runtime changes of the on_image or off_image #2113

kasemir opened this issue Jan 26, 2022 · 0 comments · Fixed by #2114

Comments

@kasemir
Copy link
Collaborator

kasemir commented Jan 26, 2022

See

https://epics.anl.gov/tech-talk/2022/msg00092.php

Can be reproduced by adding this script to the "Boolean Button_5" at the bottom of examples/controls_toggle_buttons.bob:

from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil

# Configure script to use pvs[0] "sim://flipflop(2)"

if PVUtil.getDouble(pvs[0]) > 0:
    print("Original images")
    widget.setPropertyValue('off_image', 'pic/switch_off.gif')
    widget.setPropertyValue('on_image', 'pic/switch_on.gif')
else:
    print("Swapped images")
    widget.setPropertyValue('off_image', 'pic/switch_on.gif')
    widget.setPropertyValue('on_image', 'pic/switch_off.gif')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant