How to change button color based on external action? #1752
-
I am using a button as an indicating LED and would like to change it's color in real-time. I would like to know how to change values in input fields on the click of another button and how to change the color of a button in real-time on the GUI. Thanks in advance, Hunter Hunter |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
`def callstack(sender, app_data, user_data) -> None:
Solution here is to put the identical |
Beta Was this translation helpful? Give feedback.
`def callstack(sender, app_data, user_data) -> None:
"""Relational connection between GUI and class"""
Solution here is to put the identical
dpg.bind_item_theme
inside the callback function. This apparently overwrites the originaldpg.bind_item_theme
that holds the buttons origonal color.