# Perspective UI not updating in browser when modifying Drawing elements via message handler

**URL:** <https://forum.inductiveautomation.com/t/perspective-ui-not-updating-in-browser-when-modifying-drawing-elements-via-message-handler/114614>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 23, 2026, 7:17am UTC](https://forum.inductiveautomation.com/t/perspective-ui-not-updating-in-browser-when-modifying-drawing-elements-via-message-handler/114614 "2026-03-23T07:17:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbscada](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jbscada](https://forum.inductiveautomation.com/u/jbscada)\
**Post date:** [March 23, 2026, 7:17am UTC](https://forum.inductiveautomation.com/t/perspective-ui-not-updating-in-browser-when-modifying-drawing-elements-via-message-handler/114614/1 "2026-03-23T07:17:06Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/39679ad7c9b32347834f40dfb38963298cb7b713.png)I I am a beginner of the ignition system. I wrote a simple demo where clicking the button changes the color of the graphic, and then the color is written to the tag.This way, it can work properly. Then I attempted to run the same script in the root's message handler program. The message was successfully received, the tag wrote the correct value, but the graphic color did not change.

button click script:

```python
def runAction(self, event):
    element = self.getSibling("Drawing1").props.elements[0]
    oldColor = element.fill.paint  
    system.tag.writeBlocking(["[default]DrawingTag/OldFill"], [oldColor])
    if oldColor == "yellow":
        newColor = "green"
    else:
        newColor = "yellow"
    element.fill.paint = newColor
    system.tag.writeBlocking(["[default]DrawingTag/NewFill"], [newColor])

```

message handler scripts:

```python
def onMessageReceived(self, payload):
    element = self.getChild("Drawing1").props.elements[0]
    oldColor = element.fill.paint 
    system.tag.writeBlocking(["[default]DrawingTag/OldFill"], [oldColor])
    if oldColor == "yellow":
        newColor = "green"
    else:
        newColor = "yellow"
    element.fill.paint = newColor
    system.tag.writeBlocking(["[default]DrawingTag/NewFill"], [newColor])

```

Add: when the message was received, the color of the graphics in the designer changed, but the web interface remained unchanged.

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [March 23, 2026, 4:52pm UTC](https://forum.inductiveautomation.com/t/perspective-ui-not-updating-in-browser-when-modifying-drawing-elements-via-message-handler/114614/2 "2026-03-23T16:52:16Z")

</div>

```python
element = self.getChild("Drawing1").props.elements[0]
oldColor = element.fill.paint 

element.fill.paint = newColor

```

I'd try switching that to this.

```python
drawing = self.getChild("Drawing1")
oldColor = drawing.props.elements[0].fill.paint

drawing.props.elements[0].fill.paint = newColor

```
