# When is a widget representation supposed to invoke a Modified event?

**URL:** https://discourse.vtk.org/t/when-is-a-widget-representation-supposed-to-invoke-a-modified-event/13323
**Category:** Support
**Created:** [February 15, 2024, 5:18pm UTC](https://discourse.vtk.org/t/when-is-a-widget-representation-supposed-to-invoke-a-modified-event/13323 "2024-02-15T17:18:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DrPepperJo](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/0ea827/32.png) [@DrPepperJo](https://discourse.vtk.org/u/DrPepperJo)
#### Post date: [February 15, 2024, 5:18pm UTC](https://discourse.vtk.org/t/when-is-a-widget-representation-supposed-to-invoke-a-modified-event/13323/1 "2024-02-15T17:18:10Z")

</div>

I am currently designing a number of widgets for an application. I try to follow the principles I find in the widgets that are part of the vtk library. I had a closer look at `vtkBorderRepresentation` and found, that while a manual change of the `PositionCoordinate` (i.e. a call to `SetPositionCoordinate( ... )`), which determines a geometric feature of the widget is considered in the `MTime` calculation, it does not invoke a `Modified` event. An interaction with said geometric features does however trigger said event. So does a call to another manual geometric function (`SetWindowLocation( ... )`). On the other hand, changing colors, does also not invoke a `Modified` event.

It seems like all the manual changes that are set up via the vtk macros do just omit the invocation of the `Modified` event, while manually set up functions do explicitly call the `InvokeEvent` function. From a user perspective, this seems to produce inconsistent behavior.

I guess my question is: When does the user expect my widget to invoke a `Modified` event?
